[X86] Add avx512f command line to rounding-ops.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317988 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper 2017-11-11 21:44:48 +00:00
parent 758e6564c6
commit 54c9ba4c53

View File

@ -1,6 +1,7 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s -mtriple=x86_64-apple-macosx -mattr=+sse4.1 | FileCheck -check-prefix=CHECK-SSE %s
; RUN: llc < %s -mtriple=x86_64-apple-macosx -mattr=+avx | FileCheck -check-prefix=CHECK-AVX %s
; RUN: llc < %s -mtriple=x86_64-apple-macosx -mattr=+avx512f | FileCheck -check-prefix=CHECK-AVX512 %s
define float @test1(float %x) nounwind {
; CHECK-SSE-LABEL: test1:
@ -12,6 +13,11 @@ define float @test1(float %x) nounwind {
; CHECK-AVX: ## BB#0:
; CHECK-AVX-NEXT: vroundss $9, %xmm0, %xmm0, %xmm0
; CHECK-AVX-NEXT: retq
;
; CHECK-AVX512-LABEL: test1:
; CHECK-AVX512: ## BB#0:
; CHECK-AVX512-NEXT: vrndscaless $9, %xmm0, %xmm0, %xmm0
; CHECK-AVX512-NEXT: retq
%call = tail call float @floorf(float %x) nounwind readnone
ret float %call
}
@ -28,6 +34,11 @@ define double @test2(double %x) nounwind {
; CHECK-AVX: ## BB#0:
; CHECK-AVX-NEXT: vroundsd $9, %xmm0, %xmm0, %xmm0
; CHECK-AVX-NEXT: retq
;
; CHECK-AVX512-LABEL: test2:
; CHECK-AVX512: ## BB#0:
; CHECK-AVX512-NEXT: vrndscalesd $9, %xmm0, %xmm0, %xmm0
; CHECK-AVX512-NEXT: retq
%call = tail call double @floor(double %x) nounwind readnone
ret double %call
}
@ -44,6 +55,11 @@ define float @test3(float %x) nounwind {
; CHECK-AVX: ## BB#0:
; CHECK-AVX-NEXT: vroundss $12, %xmm0, %xmm0, %xmm0
; CHECK-AVX-NEXT: retq
;
; CHECK-AVX512-LABEL: test3:
; CHECK-AVX512: ## BB#0:
; CHECK-AVX512-NEXT: vrndscaless $12, %xmm0, %xmm0, %xmm0
; CHECK-AVX512-NEXT: retq
%call = tail call float @nearbyintf(float %x) nounwind readnone
ret float %call
}
@ -60,6 +76,11 @@ define double @test4(double %x) nounwind {
; CHECK-AVX: ## BB#0:
; CHECK-AVX-NEXT: vroundsd $12, %xmm0, %xmm0, %xmm0
; CHECK-AVX-NEXT: retq
;
; CHECK-AVX512-LABEL: test4:
; CHECK-AVX512: ## BB#0:
; CHECK-AVX512-NEXT: vrndscalesd $12, %xmm0, %xmm0, %xmm0
; CHECK-AVX512-NEXT: retq
%call = tail call double @nearbyint(double %x) nounwind readnone
ret double %call
}
@ -76,6 +97,11 @@ define float @test5(float %x) nounwind {
; CHECK-AVX: ## BB#0:
; CHECK-AVX-NEXT: vroundss $10, %xmm0, %xmm0, %xmm0
; CHECK-AVX-NEXT: retq
;
; CHECK-AVX512-LABEL: test5:
; CHECK-AVX512: ## BB#0:
; CHECK-AVX512-NEXT: vrndscaless $10, %xmm0, %xmm0, %xmm0
; CHECK-AVX512-NEXT: retq
%call = tail call float @ceilf(float %x) nounwind readnone
ret float %call
}
@ -92,6 +118,11 @@ define double @test6(double %x) nounwind {
; CHECK-AVX: ## BB#0:
; CHECK-AVX-NEXT: vroundsd $10, %xmm0, %xmm0, %xmm0
; CHECK-AVX-NEXT: retq
;
; CHECK-AVX512-LABEL: test6:
; CHECK-AVX512: ## BB#0:
; CHECK-AVX512-NEXT: vrndscalesd $10, %xmm0, %xmm0, %xmm0
; CHECK-AVX512-NEXT: retq
%call = tail call double @ceil(double %x) nounwind readnone
ret double %call
}
@ -108,6 +139,11 @@ define float @test7(float %x) nounwind {
; CHECK-AVX: ## BB#0:
; CHECK-AVX-NEXT: vroundss $4, %xmm0, %xmm0, %xmm0
; CHECK-AVX-NEXT: retq
;
; CHECK-AVX512-LABEL: test7:
; CHECK-AVX512: ## BB#0:
; CHECK-AVX512-NEXT: vrndscaless $4, %xmm0, %xmm0, %xmm0
; CHECK-AVX512-NEXT: retq
%call = tail call float @rintf(float %x) nounwind readnone
ret float %call
}
@ -124,6 +160,11 @@ define double @test8(double %x) nounwind {
; CHECK-AVX: ## BB#0:
; CHECK-AVX-NEXT: vroundsd $4, %xmm0, %xmm0, %xmm0
; CHECK-AVX-NEXT: retq
;
; CHECK-AVX512-LABEL: test8:
; CHECK-AVX512: ## BB#0:
; CHECK-AVX512-NEXT: vrndscalesd $4, %xmm0, %xmm0, %xmm0
; CHECK-AVX512-NEXT: retq
%call = tail call double @rint(double %x) nounwind readnone
ret double %call
}
@ -140,6 +181,11 @@ define float @test9(float %x) nounwind {
; CHECK-AVX: ## BB#0:
; CHECK-AVX-NEXT: vroundss $11, %xmm0, %xmm0, %xmm0
; CHECK-AVX-NEXT: retq
;
; CHECK-AVX512-LABEL: test9:
; CHECK-AVX512: ## BB#0:
; CHECK-AVX512-NEXT: vrndscaless $11, %xmm0, %xmm0, %xmm0
; CHECK-AVX512-NEXT: retq
%call = tail call float @truncf(float %x) nounwind readnone
ret float %call
}
@ -156,6 +202,11 @@ define double @test10(double %x) nounwind {
; CHECK-AVX: ## BB#0:
; CHECK-AVX-NEXT: vroundsd $11, %xmm0, %xmm0, %xmm0
; CHECK-AVX-NEXT: retq
;
; CHECK-AVX512-LABEL: test10:
; CHECK-AVX512: ## BB#0:
; CHECK-AVX512-NEXT: vrndscalesd $11, %xmm0, %xmm0, %xmm0
; CHECK-AVX512-NEXT: retq
%call = tail call double @trunc(double %x) nounwind readnone
ret double %call
}