summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/AArch64/arm64-rounding.ll
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2015-07-16 21:30:21 +0000
committerTim Northover <tnorthover@apple.com>2015-07-16 21:30:21 +0000
commitca0ffc356193e319d07d1f5db49db4cc61f45b59 (patch)
tree47feaa00a3ed8ec7f41414d296e8f26aee60127a /llvm/test/CodeGen/AArch64/arm64-rounding.ll
parent9e694e590cdbd751e026833a042e871b66f192cf (diff)
downloadbcm5719-llvm-ca0ffc356193e319d07d1f5db49db4cc61f45b59.tar.gz
bcm5719-llvm-ca0ffc356193e319d07d1f5db49db4cc61f45b59.zip
AArch64: make inexact signalling on round Darwin-specific
C11 leaves the choice on whether round-to-integer operations set the inexact flag implementation-defined. Darwin does expect it to be set, but this seems to be against the intent of the IEEE document and slower to implement anyway. So it should be opt-in. llvm-svn: 242446
Diffstat (limited to 'llvm/test/CodeGen/AArch64/arm64-rounding.ll')
-rw-r--r--llvm/test/CodeGen/AArch64/arm64-rounding.ll193
1 files changed, 134 insertions, 59 deletions
diff --git a/llvm/test/CodeGen/AArch64/arm64-rounding.ll b/llvm/test/CodeGen/AArch64/arm64-rounding.ll
index 931114447ad..b2686b6b05f 100644
--- a/llvm/test/CodeGen/AArch64/arm64-rounding.ll
+++ b/llvm/test/CodeGen/AArch64/arm64-rounding.ll
@@ -1,10 +1,13 @@
-; RUN: llc -O3 < %s -mcpu=cyclone | FileCheck %s
-target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-n32:64"
-target triple = "arm64-apple-ios6.0.0"
+; RUN: llc -O3 < %s -mtriple=arm64-apple-ios7.0 | FileCheck %s --check-prefix=CHECK-INEXACT
+; RUN: llc -O3 < %s -mtriple=aarch64-linux-gnu | FileCheck %s --check-prefix=CHECK-FAST
-; CHECK: test1
-; CHECK: frintx
-; CHECK: frintm
+; CHECK-INEXACT-LABEL: test1:
+; CHECK-INEXACT-DAG: frintm
+; CHECK-INEXACT-DAG: frintx
+
+; CHECK-FAST-LABEL: test1:
+; CHECK-FAST: frintm
+; CHECK-FAST-NOT: frintx
define float @test1(float %a) #0 {
entry:
%call = tail call float @floorf(float %a) nounwind readnone
@@ -13,9 +16,13 @@ entry:
declare float @floorf(float) nounwind readnone
-; CHECK: test2
-; CHECK: frintx
-; CHECK: frintm
+; CHECK-INEXACT-LABEL: test2:
+; CHECK-INEXACT: frintm
+; CHECK-INEXACT: frintx
+
+; CHECK-FAST-LABEL: test2:
+; CHECK-FAST: frintm
+; CHECK-FAST-NOT: frintx
define double @test2(double %a) #0 {
entry:
%call = tail call double @floor(double %a) nounwind readnone
@@ -24,8 +31,11 @@ entry:
declare double @floor(double) nounwind readnone
-; CHECK: test3
-; CHECK: frinti
+; CHECK-INEXACT-LABEL: test3:
+; CHECK-INEXACT: frinti
+
+; CHECK-FAST-LABEL: test3:
+; CHECK-FAST: frinti
define float @test3(float %a) #0 {
entry:
%call = tail call float @nearbyintf(float %a) nounwind readnone
@@ -34,8 +44,11 @@ entry:
declare float @nearbyintf(float) nounwind readnone
-; CHECK: test4
-; CHECK: frinti
+; CHECK-INEXACT-LABEL: test4:
+; CHECK-INEXACT: frinti
+
+; CHECK-FAST-LABEL: test4:
+; CHECK-FAST: frinti
define double @test4(double %a) #0 {
entry:
%call = tail call double @nearbyint(double %a) nounwind readnone
@@ -44,9 +57,13 @@ entry:
declare double @nearbyint(double) nounwind readnone
-; CHECK: test5
-; CHECK: frintx
-; CHECK: frintp
+; CHECK-INEXACT-LABEL: test5:
+; CHECK-INEXACT: frintp
+; CHECK-INEXACT: frintx
+
+; CHECK-FAST-LABEL: test5:
+; CHECK-FAST: frintp
+; CHECK-FAST-NOT: frintx
define float @test5(float %a) #0 {
entry:
%call = tail call float @ceilf(float %a) nounwind readnone
@@ -55,9 +72,13 @@ entry:
declare float @ceilf(float) nounwind readnone
-; CHECK: test6
-; CHECK: frintx
-; CHECK: frintp
+; CHECK-INEXACT-LABEL: test6:
+; CHECK-INEXACT: frintp
+; CHECK-INEXACT: frintx
+
+; CHECK-FAST-LABEL: test6:
+; CHECK-FAST: frintp
+; CHECK-FAST-NOT: frintx
define double @test6(double %a) #0 {
entry:
%call = tail call double @ceil(double %a) nounwind readnone
@@ -66,8 +87,11 @@ entry:
declare double @ceil(double) nounwind readnone
-; CHECK: test7
-; CHECK: frintx
+; CHECK-INEXACT-LABEL: test7:
+; CHECK-INEXACT: frintx
+
+; CHECK-FAST-LABEL: test7:
+; CHECK-FAST: frintx
define float @test7(float %a) #0 {
entry:
%call = tail call float @rintf(float %a) nounwind readnone
@@ -76,8 +100,11 @@ entry:
declare float @rintf(float) nounwind readnone
-; CHECK: test8
-; CHECK: frintx
+; CHECK-INEXACT-LABEL: test8:
+; CHECK-INEXACT: frintx
+
+; CHECK-FAST-LABEL: test8:
+; CHECK-FAST: frintx
define double @test8(double %a) #0 {
entry:
%call = tail call double @rint(double %a) nounwind readnone
@@ -86,9 +113,13 @@ entry:
declare double @rint(double) nounwind readnone
-; CHECK: test9
-; CHECK: frintx
-; CHECK: frintz
+; CHECK-INEXACT-LABEL: test9:
+; CHECK-INEXACT: frintz
+; CHECK-INEXACT: frintx
+
+; CHECK-FAST-LABEL: test9:
+; CHECK-FAST: frintz
+; CHECK-FAST-NOT: frintx
define float @test9(float %a) #0 {
entry:
%call = tail call float @truncf(float %a) nounwind readnone
@@ -97,9 +128,13 @@ entry:
declare float @truncf(float) nounwind readnone
-; CHECK: test10
-; CHECK: frintx
-; CHECK: frintz
+; CHECK-INEXACT-LABEL: test10:
+; CHECK-INEXACT: frintz
+; CHECK-INEXACT: frintx
+
+; CHECK-FAST-LABEL: test10:
+; CHECK-FAST: frintz
+; CHECK-FAST-NOT: frintx
define double @test10(double %a) #0 {
entry:
%call = tail call double @trunc(double %a) nounwind readnone
@@ -108,9 +143,13 @@ entry:
declare double @trunc(double) nounwind readnone
-; CHECK: test11
-; CHECK: frintx
-; CHECK: frinta
+; CHECK-INEXACT-LABEL: test11:
+; CHECK-INEXACT: frinta
+; CHECK-INEXACT: frintx
+
+; CHECK-FAST-LABEL: test11:
+; CHECK-FAST: frinta
+; CHECK-FAST-NOT: frintx
define float @test11(float %a) #0 {
entry:
%call = tail call float @roundf(float %a) nounwind readnone
@@ -119,9 +158,13 @@ entry:
declare float @roundf(float %a) nounwind readnone
-; CHECK: test12
-; CHECK: frintx
-; CHECK: frinta
+; CHECK-INEXACT-LABEL: test12:
+; CHECK-INEXACT: frinta
+; CHECK-INEXACT: frintx
+
+; CHECK-FAST-LABEL: test12:
+; CHECK-FAST: frinta
+; CHECK-FAST-NOT: frintx
define double @test12(double %a) #0 {
entry:
%call = tail call double @round(double %a) nounwind readnone
@@ -130,72 +173,104 @@ entry:
declare double @round(double %a) nounwind readnone
-; CHECK: test13
-; CHECK-NOT: frintx
-; CHECK: frintm
+; CHECK-INEXACT-LABEL: test13:
+; CHECK-INEXACT-NOT: frintx
+; CHECK-INEXACT: frintm
+
+; CHECK-FAST-LABEL: test13:
+; CHECK-FAST-NOT: frintx
+; CHECK-FAST: frintm
define float @test13(float %a) #1 {
entry:
%call = tail call float @floorf(float %a) nounwind readnone
ret float %call
}
-; CHECK: test14
-; CHECK-NOT: frintx
-; CHECK: frintm
+; CHECK-INEXACT-LABEL: test14:
+; CHECK-INEXACT-NOT: frintx
+; CHECK-INEXACT: frintm
+
+; CHECK-FAST-LABEL: test14:
+; CHECK-FAST-NOT: frintx
+; CHECK-FAST: frintm
define double @test14(double %a) #1 {
entry:
%call = tail call double @floor(double %a) nounwind readnone
ret double %call
}
-; CHECK: test15
-; CHECK-NOT: frintx
-; CHECK: frintp
+; CHECK-INEXACT-LABEL: test15:
+; CHECK-INEXACT-NOT: frintx
+; CHECK-INEXACT: frintp
+
+; CHECK-FAST-LABEL: test15:
+; CHECK-FAST-NOT: frintx
+; CHECK-FAST: frintp
define float @test15(float %a) #1 {
entry:
%call = tail call float @ceilf(float %a) nounwind readnone
ret float %call
}
-; CHECK: test16
-; CHECK-NOT: frintx
-; CHECK: frintp
+; CHECK-INEXACT-LABEL: test16:
+; CHECK-INEXACT-NOT: frintx
+; CHECK-INEXACT: frintp
+
+; CHECK-FAST-LABEL: test16:
+; CHECK-FAST-NOT: frintx
+; CHECK-FAST: frintp
define double @test16(double %a) #1 {
entry:
%call = tail call double @ceil(double %a) nounwind readnone
ret double %call
}
-; CHECK: test17
-; CHECK-NOT: frintx
-; CHECK: frintz
+; CHECK-INEXACT-LABEL: test17:
+; CHECK-INEXACT-NOT: frintx
+; CHECK-INEXACT: frintz
+
+; CHECK-FAST-LABEL: test17:
+; CHECK-FAST-NOT: frintx
+; CHECK-FAST: frintz
define float @test17(float %a) #1 {
entry:
%call = tail call float @truncf(float %a) nounwind readnone
ret float %call
}
-; CHECK: test18
-; CHECK-NOT: frintx
-; CHECK: frintz
+; CHECK-INEXACT-LABEL: test18:
+; CHECK-INEXACT-NOT: frintx
+; CHECK-INEXACT: frintz
+
+; CHECK-FAST-LABEL: test18:
+; CHECK-FAST-NOT: frintx
+; CHECK-FAST: frintz
define double @test18(double %a) #1 {
entry:
%call = tail call double @trunc(double %a) nounwind readnone
ret double %call
}
-; CHECK: test19
-; CHECK-NOT: frintx
-; CHECK: frinta
+; CHECK-INEXACT-LABEL: test19:
+; CHECK-INEXACT-NOT: frintx
+; CHECK-INEXACT: frinta
+
+; CHECK-FAST-LABEL: test19:
+; CHECK-FAST-NOT: frintx
+; CHECK-FAST: frinta
define float @test19(float %a) #1 {
entry:
%call = tail call float @roundf(float %a) nounwind readnone
ret float %call
}
-; CHECK: test20
-; CHECK-NOT: frintx
-; CHECK: frinta
+; CHECK-INEXACT-LABEL: test20:
+; CHECK-INEXACT-NOT: frintx
+; CHECK-INEXACT: frinta
+
+; CHECK-FAST-LABEL: test20:
+; CHECK-FAST-NOT: frintx
+; CHECK-FAST: frinta
define double @test20(double %a) #1 {
entry:
%call = tail call double @round(double %a) nounwind readnone
OpenPOWER on IntegriCloud