diff options
Diffstat (limited to 'llvm/test/CodeGen')
| -rw-r--r-- | llvm/test/CodeGen/AArch64/arm64-rounding.ll | 193 | ||||
| -rw-r--r-- | llvm/test/CodeGen/AArch64/round-conv.ll | 325 | ||||
| -rw-r--r-- | llvm/test/CodeGen/X86/avx-cvt.ll | 2 | ||||
| -rw-r--r-- | llvm/test/CodeGen/X86/floor-soft-float.ll | 2 | ||||
| -rw-r--r-- | llvm/test/CodeGen/X86/rounding-ops.ll | 24 | ||||
| -rw-r--r-- | llvm/test/CodeGen/X86/stack-folding-fp-avx1.ll | 4 | ||||
| -rw-r--r-- | llvm/test/CodeGen/X86/stack-folding-fp-sse42.ll | 4 |
7 files changed, 172 insertions, 382 deletions
diff --git a/llvm/test/CodeGen/AArch64/arm64-rounding.ll b/llvm/test/CodeGen/AArch64/arm64-rounding.ll index b2686b6b05f..d487aabccc4 100644 --- a/llvm/test/CodeGen/AArch64/arm64-rounding.ll +++ b/llvm/test/CodeGen/AArch64/arm64-rounding.ll @@ -1,13 +1,8 @@ -; 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 +; RUN: llc -O3 < %s -mtriple=arm64 | FileCheck %s -; CHECK-INEXACT-LABEL: test1: -; CHECK-INEXACT-DAG: frintm -; CHECK-INEXACT-DAG: frintx - -; CHECK-FAST-LABEL: test1: -; CHECK-FAST: frintm -; CHECK-FAST-NOT: frintx +; CHECK-LABEL: test1: +; CHECK: frintm +; CHECK-NOT: frintx define float @test1(float %a) #0 { entry: %call = tail call float @floorf(float %a) nounwind readnone @@ -16,13 +11,9 @@ entry: declare float @floorf(float) nounwind readnone -; CHECK-INEXACT-LABEL: test2: -; CHECK-INEXACT: frintm -; CHECK-INEXACT: frintx - -; CHECK-FAST-LABEL: test2: -; CHECK-FAST: frintm -; CHECK-FAST-NOT: frintx +; CHECK-LABEL: test2: +; CHECK: frintm +; CHECK-NOT: frintx define double @test2(double %a) #0 { entry: %call = tail call double @floor(double %a) nounwind readnone @@ -31,11 +22,8 @@ entry: declare double @floor(double) nounwind readnone -; CHECK-INEXACT-LABEL: test3: -; CHECK-INEXACT: frinti - -; CHECK-FAST-LABEL: test3: -; CHECK-FAST: frinti +; CHECK-LABEL: test3: +; CHECK: frinti define float @test3(float %a) #0 { entry: %call = tail call float @nearbyintf(float %a) nounwind readnone @@ -44,11 +32,8 @@ entry: declare float @nearbyintf(float) nounwind readnone -; CHECK-INEXACT-LABEL: test4: -; CHECK-INEXACT: frinti - -; CHECK-FAST-LABEL: test4: -; CHECK-FAST: frinti +; CHECK-LABEL: test4: +; CHECK: frinti define double @test4(double %a) #0 { entry: %call = tail call double @nearbyint(double %a) nounwind readnone @@ -57,13 +42,9 @@ entry: declare double @nearbyint(double) nounwind readnone -; CHECK-INEXACT-LABEL: test5: -; CHECK-INEXACT: frintp -; CHECK-INEXACT: frintx - -; CHECK-FAST-LABEL: test5: -; CHECK-FAST: frintp -; CHECK-FAST-NOT: frintx +; CHECK-LABEL: test5: +; CHECK: frintp +; CHECK-NOT: frintx define float @test5(float %a) #0 { entry: %call = tail call float @ceilf(float %a) nounwind readnone @@ -72,13 +53,9 @@ entry: declare float @ceilf(float) nounwind readnone -; CHECK-INEXACT-LABEL: test6: -; CHECK-INEXACT: frintp -; CHECK-INEXACT: frintx - -; CHECK-FAST-LABEL: test6: -; CHECK-FAST: frintp -; CHECK-FAST-NOT: frintx +; CHECK-LABEL: test6: +; CHECK: frintp +; CHECK-NOT: frintx define double @test6(double %a) #0 { entry: %call = tail call double @ceil(double %a) nounwind readnone @@ -87,11 +64,8 @@ entry: declare double @ceil(double) nounwind readnone -; CHECK-INEXACT-LABEL: test7: -; CHECK-INEXACT: frintx - -; CHECK-FAST-LABEL: test7: -; CHECK-FAST: frintx +; CHECK-LABEL: test7: +; CHECK: frintx define float @test7(float %a) #0 { entry: %call = tail call float @rintf(float %a) nounwind readnone @@ -100,11 +74,8 @@ entry: declare float @rintf(float) nounwind readnone -; CHECK-INEXACT-LABEL: test8: -; CHECK-INEXACT: frintx - -; CHECK-FAST-LABEL: test8: -; CHECK-FAST: frintx +; CHECK-LABEL: test8: +; CHECK: frintx define double @test8(double %a) #0 { entry: %call = tail call double @rint(double %a) nounwind readnone @@ -113,13 +84,9 @@ entry: declare double @rint(double) nounwind readnone -; CHECK-INEXACT-LABEL: test9: -; CHECK-INEXACT: frintz -; CHECK-INEXACT: frintx - -; CHECK-FAST-LABEL: test9: -; CHECK-FAST: frintz -; CHECK-FAST-NOT: frintx +; CHECK-LABEL: test9: +; CHECK: frintz +; CHECK-NOT: frintx define float @test9(float %a) #0 { entry: %call = tail call float @truncf(float %a) nounwind readnone @@ -128,13 +95,9 @@ entry: declare float @truncf(float) nounwind readnone -; CHECK-INEXACT-LABEL: test10: -; CHECK-INEXACT: frintz -; CHECK-INEXACT: frintx - -; CHECK-FAST-LABEL: test10: -; CHECK-FAST: frintz -; CHECK-FAST-NOT: frintx +; CHECK-LABEL: test10: +; CHECK: frintz +; CHECK-NOT: frintx define double @test10(double %a) #0 { entry: %call = tail call double @trunc(double %a) nounwind readnone @@ -143,13 +106,9 @@ entry: declare double @trunc(double) nounwind readnone -; CHECK-INEXACT-LABEL: test11: -; CHECK-INEXACT: frinta -; CHECK-INEXACT: frintx - -; CHECK-FAST-LABEL: test11: -; CHECK-FAST: frinta -; CHECK-FAST-NOT: frintx +; CHECK-LABEL: test11: +; CHECK: frinta +; CHECK-NOT: frintx define float @test11(float %a) #0 { entry: %call = tail call float @roundf(float %a) nounwind readnone @@ -158,13 +117,9 @@ entry: declare float @roundf(float %a) nounwind readnone -; CHECK-INEXACT-LABEL: test12: -; CHECK-INEXACT: frinta -; CHECK-INEXACT: frintx - -; CHECK-FAST-LABEL: test12: -; CHECK-FAST: frinta -; CHECK-FAST-NOT: frintx +; CHECK-LABEL: test12: +; CHECK: frinta +; CHECK-NOT: frintx define double @test12(double %a) #0 { entry: %call = tail call double @round(double %a) nounwind readnone @@ -173,111 +128,77 @@ entry: declare double @round(double %a) nounwind readnone -; CHECK-INEXACT-LABEL: test13: -; CHECK-INEXACT-NOT: frintx -; CHECK-INEXACT: frintm - -; CHECK-FAST-LABEL: test13: -; CHECK-FAST-NOT: frintx -; CHECK-FAST: frintm +; CHECK-LABEL: test13: +; CHECK-NOT: frintx +; CHECK: frintm define float @test13(float %a) #1 { entry: %call = tail call float @floorf(float %a) nounwind readnone ret float %call } -; CHECK-INEXACT-LABEL: test14: -; CHECK-INEXACT-NOT: frintx -; CHECK-INEXACT: frintm - -; CHECK-FAST-LABEL: test14: -; CHECK-FAST-NOT: frintx -; CHECK-FAST: frintm +; CHECK-LABEL: test14: +; CHECK-NOT: frintx +; CHECK: frintm define double @test14(double %a) #1 { entry: %call = tail call double @floor(double %a) nounwind readnone ret double %call } -; CHECK-INEXACT-LABEL: test15: -; CHECK-INEXACT-NOT: frintx -; CHECK-INEXACT: frintp - -; CHECK-FAST-LABEL: test15: -; CHECK-FAST-NOT: frintx -; CHECK-FAST: frintp +; CHECK-LABEL: test15: +; CHECK-NOT: frintx +; CHECK: frintp define float @test15(float %a) #1 { entry: %call = tail call float @ceilf(float %a) nounwind readnone ret float %call } -; CHECK-INEXACT-LABEL: test16: -; CHECK-INEXACT-NOT: frintx -; CHECK-INEXACT: frintp - -; CHECK-FAST-LABEL: test16: -; CHECK-FAST-NOT: frintx -; CHECK-FAST: frintp +; CHECK-LABEL: test16: +; CHECK-NOT: frintx +; CHECK: frintp define double @test16(double %a) #1 { entry: %call = tail call double @ceil(double %a) nounwind readnone ret double %call } -; CHECK-INEXACT-LABEL: test17: -; CHECK-INEXACT-NOT: frintx -; CHECK-INEXACT: frintz - -; CHECK-FAST-LABEL: test17: -; CHECK-FAST-NOT: frintx -; CHECK-FAST: frintz +; CHECK-LABEL: test17: +; CHECK-NOT: frintx +; CHECK: frintz define float @test17(float %a) #1 { entry: %call = tail call float @truncf(float %a) nounwind readnone ret float %call } -; CHECK-INEXACT-LABEL: test18: -; CHECK-INEXACT-NOT: frintx -; CHECK-INEXACT: frintz - -; CHECK-FAST-LABEL: test18: -; CHECK-FAST-NOT: frintx -; CHECK-FAST: frintz +; CHECK-LABEL: test18: +; CHECK-NOT: frintx +; CHECK: frintz define double @test18(double %a) #1 { entry: %call = tail call double @trunc(double %a) nounwind readnone ret double %call } -; CHECK-INEXACT-LABEL: test19: -; CHECK-INEXACT-NOT: frintx -; CHECK-INEXACT: frinta - -; CHECK-FAST-LABEL: test19: -; CHECK-FAST-NOT: frintx -; CHECK-FAST: frinta +; CHECK-LABEL: test19: +; CHECK-NOT: frintx +; CHECK: frinta define float @test19(float %a) #1 { entry: %call = tail call float @roundf(float %a) nounwind readnone ret float %call } -; CHECK-INEXACT-LABEL: test20: -; CHECK-INEXACT-NOT: frintx -; CHECK-INEXACT: frinta - -; CHECK-FAST-LABEL: test20: -; CHECK-FAST-NOT: frintx -; CHECK-FAST: frinta +; CHECK-LABEL: test20: +; CHECK-NOT: frintx +; CHECK: frinta define double @test20(double %a) #1 { entry: %call = tail call double @round(double %a) nounwind readnone ret double %call } - - attributes #0 = { nounwind } attributes #1 = { nounwind "unsafe-fp-math"="true" } diff --git a/llvm/test/CodeGen/AArch64/round-conv.ll b/llvm/test/CodeGen/AArch64/round-conv.ll index 1dcdb3f4935..5ed7d9409e3 100644 --- a/llvm/test/CodeGen/AArch64/round-conv.ll +++ b/llvm/test/CodeGen/AArch64/round-conv.ll @@ -1,14 +1,8 @@ -; RUN: llc < %s -mtriple=arm64-apple-ios7.0 | FileCheck %s --check-prefix=CHECK-INEXACT -; RUN: llc < %s -mtriple=arm64-apple-ios7.0 -enable-unsafe-fp-math | FileCheck %s --check-prefix=CHECK-FAST -; RUN: llc < %s -mtriple=aarch64-linux-gnu | FileCheck %s --check-prefix=CHECK-FAST +; RUN: llc < %s -mtriple=arm64 | FileCheck %s -; CHECK-INEXACT-LABEL: testmsws: -; CHECK-INEXACT: fcvtms w0, s0 -; CHECK-INEXACT: frintx {{s[0-9]+}}, s0 - -; CHECK-FAST-LABEL: testmsws: -; CHECK-FAST: fcvtms w0, s0 -; CHECK-FAST-NOT: frintx {{s[0-9]+}}, s0 +; CHECK-LABEL: testmsws: +; CHECK: fcvtms w0, s0 +; CHECK-NOT: frintx {{s[0-9]+}}, s0 define i32 @testmsws(float %a) { entry: %call = call float @floorf(float %a) nounwind readnone @@ -16,13 +10,9 @@ entry: ret i32 %conv } -; CHECK-INEXACT-LABEL: testmsxs: -; CHECK-INEXACT: fcvtms x0, s0 -; CHECK-INEXACT: frintx {{s[0-9]+}}, s0 - -; CHECK-FAST-LABEL: testmsxs: -; CHECK-FAST: fcvtms x0, s0 -; CHECK-FAST-NOT: frintx {{s[0-9]+}}, s0 +; CHECK-LABEL: testmsxs: +; CHECK: fcvtms x0, s0 +; CHECK-NOT: frintx {{s[0-9]+}}, s0 define i64 @testmsxs(float %a) { entry: %call = call float @floorf(float %a) nounwind readnone @@ -30,13 +20,9 @@ entry: ret i64 %conv } -; CHECK-INEXACT-LABEL: testmswd: -; CHECK-INEXACT: fcvtms w0, d0 -; CHECK-INEXACT: frintx {{d[0-9]+}}, d0 - -; CHECK-FAST-LABEL: testmswd: -; CHECK-FAST: fcvtms w0, d0 -; CHECK-FAST-NOT: frintx {{d[0-9]+}}, d0 +; CHECK-LABEL: testmswd: +; CHECK: fcvtms w0, d0 +; CHECK-NOT: frintx {{d[0-9]+}}, d0 define i32 @testmswd(double %a) { entry: %call = call double @floor(double %a) nounwind readnone @@ -44,13 +30,9 @@ entry: ret i32 %conv } -; CHECK-INEXACT-LABEL: testmsxd: -; CHECK-INEXACT: fcvtms x0, d0 -; CHECK-INEXACT: frintx {{d[0-9]+}}, d0 - -; CHECK-FAST-LABEL: testmsxd: -; CHECK-FAST: fcvtms x0, d0 -; CHECK-FAST-NOT: frintx {{d[0-9]+}}, d0 +; CHECK-LABEL: testmsxd: +; CHECK: fcvtms x0, d0 +; CHECK-NOT: frintx {{d[0-9]+}}, d0 define i64 @testmsxd(double %a) { entry: %call = call double @floor(double %a) nounwind readnone @@ -58,13 +40,9 @@ entry: ret i64 %conv } -; CHECK-INEXACT-LABEL: testmuws: -; CHECK-INEXACT: fcvtmu w0, s0 -; CHECK-INEXACT: frintx {{s[0-9]+}}, s0 - -; CHECK-FAST-LABEL: testmuws: -; CHECK-FAST: fcvtmu w0, s0 -; CHECK-FAST-NOT: frintx {{s[0-9]+}}, s0 +; CHECK-LABEL: testmuws: +; CHECK: fcvtmu w0, s0 +; CHECK-NOT: frintx {{s[0-9]+}}, s0 define i32 @testmuws(float %a) { entry: %call = call float @floorf(float %a) nounwind readnone @@ -72,13 +50,9 @@ entry: ret i32 %conv } -; CHECK-INEXACT-LABEL: testmuxs: -; CHECK-INEXACT: fcvtmu x0, s0 -; CHECK-INEXACT: frintx {{s[0-9]+}}, s0 - -; CHECK-FAST-LABEL: testmuxs: -; CHECK-FAST: fcvtmu x0, s0 -; CHECK-FAST-NOT: frintx {{s[0-9]+}}, s0 +; CHECK-LABEL: testmuxs: +; CHECK: fcvtmu x0, s0 +; CHECK-NOT: frintx {{s[0-9]+}}, s0 define i64 @testmuxs(float %a) { entry: %call = call float @floorf(float %a) nounwind readnone @@ -86,13 +60,9 @@ entry: ret i64 %conv } -; CHECK-INEXACT-LABEL: testmuwd: -; CHECK-INEXACT: fcvtmu w0, d0 -; CHECK-INEXACT: frintx {{d[0-9]+}}, d0 - -; CHECK-FAST-LABEL: testmuwd: -; CHECK-FAST: fcvtmu w0, d0 -; CHECK-FAST-NOT: frintx {{d[0-9]+}}, d0 +; CHECK-LABEL: testmuwd: +; CHECK: fcvtmu w0, d0 +; CHECK-NOT: frintx {{d[0-9]+}}, d0 define i32 @testmuwd(double %a) { entry: %call = call double @floor(double %a) nounwind readnone @@ -100,13 +70,9 @@ entry: ret i32 %conv } -; CHECK-INEXACT-LABEL: testmuxd: -; CHECK-INEXACT: fcvtmu x0, d0 -; CHECK-INEXACT: frintx {{d[0-9]+}}, d0 - -; CHECK-FAST-LABEL: testmuxd: -; CHECK-FAST: fcvtmu x0, d0 -; CHECK-FAST-NOT: frintx {{d[0-9]+}}, d0 +; CHECK-LABEL: testmuxd: +; CHECK: fcvtmu x0, d0 +; CHECK-NOT: frintx {{d[0-9]+}}, d0 define i64 @testmuxd(double %a) { entry: %call = call double @floor(double %a) nounwind readnone @@ -114,13 +80,9 @@ entry: ret i64 %conv } -; CHECK-INEXACT-LABEL: testpsws: -; CHECK-INEXACT: fcvtps w0, s0 -; CHECK-INEXACT: frintx {{s[0-9]+}}, s0 - -; CHECK-FAST-LABEL: testpsws: -; CHECK-FAST: fcvtps w0, s0 -; CHECK-FAST-NOT: frintx {{s[0-9]+}}, s0 +; CHECK-LABEL: testpsws: +; CHECK: fcvtps w0, s0 +; CHECK-NOT: frintx {{s[0-9]+}}, s0 define i32 @testpsws(float %a) { entry: %call = call float @ceilf(float %a) nounwind readnone @@ -128,13 +90,9 @@ entry: ret i32 %conv } -; CHECK-INEXACT-LABEL: testpsxs: -; CHECK-INEXACT: fcvtps x0, s0 -; CHECK-INEXACT: frintx {{s[0-9]+}}, s0 - -; CHECK-FAST-LABEL: testpsxs: -; CHECK-FAST: fcvtps x0, s0 -; CHECK-FAST-NOT: frintx {{s[0-9]+}}, s0 +; CHECK-LABEL: testpsxs: +; CHECK: fcvtps x0, s0 +; CHECK-NOT: frintx {{s[0-9]+}}, s0 define i64 @testpsxs(float %a) { entry: %call = call float @ceilf(float %a) nounwind readnone @@ -142,13 +100,9 @@ entry: ret i64 %conv } -; CHECK-INEXACT-LABEL: testpswd: -; CHECK-INEXACT: fcvtps w0, d0 -; CHECK-INEXACT: frintx {{d[0-9]+}}, d0 - -; CHECK-FAST-LABEL: testpswd: -; CHECK-FAST: fcvtps w0, d0 -; CHECK-FAST-NOT: frintx {{d[0-9]+}}, d0 +; CHECK-LABEL: testpswd: +; CHECK: fcvtps w0, d0 +; CHECK-NOT: frintx {{d[0-9]+}}, d0 define i32 @testpswd(double %a) { entry: %call = call double @ceil(double %a) nounwind readnone @@ -156,13 +110,9 @@ entry: ret i32 %conv } -; CHECK-INEXACT-LABEL: testpsxd: -; CHECK-INEXACT: fcvtps x0, d0 -; CHECK-INEXACT: frintx {{d[0-9]+}}, d0 - -; CHECK-FAST-LABEL: testpsxd: -; CHECK-FAST: fcvtps x0, d0 -; CHECK-FAST-NOT: frintx {{d[0-9]+}}, d0 +; CHECK-LABEL: testpsxd: +; CHECK: fcvtps x0, d0 +; CHECK-NOT: frintx {{d[0-9]+}}, d0 define i64 @testpsxd(double %a) { entry: %call = call double @ceil(double %a) nounwind readnone @@ -170,13 +120,9 @@ entry: ret i64 %conv } -; CHECK-INEXACT-LABEL: testpuws: -; CHECK-INEXACT: fcvtpu w0, s0 -; CHECK-INEXACT: frintx {{s[0-9]+}}, s0 - -; CHECK-FAST-LABEL: testpuws: -; CHECK-FAST: fcvtpu w0, s0 -; CHECK-FAST-NOT: frintx {{s[0-9]+}}, s0 +; CHECK-LABEL: testpuws: +; CHECK: fcvtpu w0, s0 +; CHECK-NOT: frintx {{s[0-9]+}}, s0 define i32 @testpuws(float %a) { entry: %call = call float @ceilf(float %a) nounwind readnone @@ -184,13 +130,9 @@ entry: ret i32 %conv } -; CHECK-INEXACT-LABEL: testpuxs: -; CHECK-INEXACT: fcvtpu x0, s0 -; CHECK-INEXACT: frintx {{s[0-9]+}}, s0 - -; CHECK-FAST-LABEL: testpuxs: -; CHECK-FAST: fcvtpu x0, s0 -; CHECK-FAST-NOT: frintx {{s[0-9]+}}, s0 +; CHECK-LABEL: testpuxs: +; CHECK: fcvtpu x0, s0 +; CHECK-NOT: frintx {{s[0-9]+}}, s0 define i64 @testpuxs(float %a) { entry: %call = call float @ceilf(float %a) nounwind readnone @@ -198,13 +140,9 @@ entry: ret i64 %conv } -; CHECK-INEXACT-LABEL: testpuwd: -; CHECK-INEXACT: fcvtpu w0, d0 -; CHECK-INEXACT: frintx {{d[0-9]+}}, d0 - -; CHECK-FAST-LABEL: testpuwd: -; CHECK-FAST: fcvtpu w0, d0 -; CHECK-FAST-NOT: frintx {{d[0-9]+}}, d0 +; CHECK-LABEL: testpuwd: +; CHECK: fcvtpu w0, d0 +; CHECK-NOT: frintx {{d[0-9]+}}, d0 define i32 @testpuwd(double %a) { entry: %call = call double @ceil(double %a) nounwind readnone @@ -212,13 +150,9 @@ entry: ret i32 %conv } -; CHECK-INEXACT-LABEL: testpuxd: -; CHECK-INEXACT: fcvtpu x0, d0 -; CHECK-INEXACT: frintx {{d[0-9]+}}, d0 - -; CHECK-FAST-LABEL: testpuxd: -; CHECK-FAST: fcvtpu x0, d0 -; CHECK-FAST-NOT: frintx {{d[0-9]+}}, d0 +; CHECK-LABEL: testpuxd: +; CHECK: fcvtpu x0, d0 +; CHECK-NOT: frintx {{d[0-9]+}}, d0 define i64 @testpuxd(double %a) { entry: %call = call double @ceil(double %a) nounwind readnone @@ -226,13 +160,9 @@ entry: ret i64 %conv } -; CHECK-INEXACT-LABEL: testzsws: -; CHECK-INEXACT: fcvtzs w0, s0 -; CHECK-INEXACT: frintx {{s[0-9]+}}, s0 - -; CHECK-FAST-LABEL: testzsws: -; CHECK-FAST: fcvtzs w0, s0 -; CHECK-FAST-NOT: frintx {{s[0-9]+}}, s0 +; CHECK-LABEL: testzsws: +; CHECK: fcvtzs w0, s0 +; CHECK-NOT: frintx {{s[0-9]+}}, s0 define i32 @testzsws(float %a) { entry: %call = call float @truncf(float %a) nounwind readnone @@ -240,13 +170,9 @@ entry: ret i32 %conv } -; CHECK-INEXACT-LABEL: testzsxs: -; CHECK-INEXACT: fcvtzs x0, s0 -; CHECK-INEXACT: frintx {{s[0-9]+}}, s0 - -; CHECK-FAST-LABEL: testzsxs: -; CHECK-FAST: fcvtzs x0, s0 -; CHECK-FAST-NOT: frintx {{s[0-9]+}}, s0 +; CHECK-LABEL: testzsxs: +; CHECK: fcvtzs x0, s0 +; CHECK-NOT: frintx {{s[0-9]+}}, s0 define i64 @testzsxs(float %a) { entry: %call = call float @truncf(float %a) nounwind readnone @@ -254,13 +180,9 @@ entry: ret i64 %conv } -; CHECK-INEXACT-LABEL: testzswd: -; CHECK-INEXACT: fcvtzs w0, d0 -; CHECK-INEXACT: frintx {{d[0-9]+}}, d0 - -; CHECK-FAST-LABEL: testzswd: -; CHECK-FAST: fcvtzs w0, d0 -; CHECK-FAST-NOT: frintx {{d[0-9]+}}, d0 +; CHECK-LABEL: testzswd: +; CHECK: fcvtzs w0, d0 +; CHECK-NOT: frintx {{d[0-9]+}}, d0 define i32 @testzswd(double %a) { entry: %call = call double @trunc(double %a) nounwind readnone @@ -268,13 +190,9 @@ entry: ret i32 %conv } -; CHECK-INEXACT-LABEL: testzsxd: -; CHECK-INEXACT: fcvtzs x0, d0 -; CHECK-INEXACT: frintx {{d[0-9]+}}, d0 - -; CHECK-FAST-LABEL: testzsxd: -; CHECK-FAST: fcvtzs x0, d0 -; CHECK-FAST-NOT: frintx {{d[0-9]+}}, d0 +; CHECK-LABEL: testzsxd: +; CHECK: fcvtzs x0, d0 +; CHECK-NOT: frintx {{d[0-9]+}}, d0 define i64 @testzsxd(double %a) { entry: %call = call double @trunc(double %a) nounwind readnone @@ -282,13 +200,9 @@ entry: ret i64 %conv } -; CHECK-INEXACT-LABEL: testzuws: -; CHECK-INEXACT: fcvtzu w0, s0 -; CHECK-INEXACT: frintx {{s[0-9]+}}, s0 - -; CHECK-FAST-LABEL: testzuws: -; CHECK-FAST: fcvtzu w0, s0 -; CHECK-FAST-NOT: frintx {{s[0-9]+}}, s0 +; CHECK-LABEL: testzuws: +; CHECK: fcvtzu w0, s0 +; CHECK-NOT: frintx {{s[0-9]+}}, s0 define i32 @testzuws(float %a) { entry: %call = call float @truncf(float %a) nounwind readnone @@ -296,13 +210,9 @@ entry: ret i32 %conv } -; CHECK-INEXACT-LABEL: testzuxs: -; CHECK-INEXACT: fcvtzu x0, s0 -; CHECK-INEXACT: frintx {{s[0-9]+}}, s0 - -; CHECK-FAST-LABEL: testzuxs: -; CHECK-FAST: fcvtzu x0, s0 -; CHECK-FAST-NOT: frintx {{s[0-9]+}}, s0 +; CHECK-LABEL: testzuxs: +; CHECK: fcvtzu x0, s0 +; CHECK-NOT: frintx {{s[0-9]+}}, s0 define i64 @testzuxs(float %a) { entry: %call = call float @truncf(float %a) nounwind readnone @@ -310,13 +220,9 @@ entry: ret i64 %conv } -; CHECK-INEXACT-LABEL: testzuwd: -; CHECK-INEXACT: fcvtzu w0, d0 -; CHECK-INEXACT: frintx {{d[0-9]+}}, d0 - -; CHECK-FAST-LABEL: testzuwd: -; CHECK-FAST: fcvtzu w0, d0 -; CHECK-FAST-NOT: frintx {{d[0-9]+}}, d0 +; CHECK-LABEL: testzuwd: +; CHECK: fcvtzu w0, d0 +; CHECK-NOT: frintx {{d[0-9]+}}, d0 define i32 @testzuwd(double %a) { entry: %call = call double @trunc(double %a) nounwind readnone @@ -324,13 +230,9 @@ entry: ret i32 %conv } -; CHECK-INEXACT-LABEL: testzuxd: -; CHECK-INEXACT: fcvtzu x0, d0 -; CHECK-INEXACT: frintx {{d[0-9]+}}, d0 - -; CHECK-FAST-LABEL: testzuxd: -; CHECK-FAST: fcvtzu x0, d0 -; CHECK-FAST-NOT: frintx {{d[0-9]+}}, d0 +; CHECK-LABEL: testzuxd: +; CHECK: fcvtzu x0, d0 +; CHECK-NOT: frintx {{d[0-9]+}}, d0 define i64 @testzuxd(double %a) { entry: %call = call double @trunc(double %a) nounwind readnone @@ -338,13 +240,9 @@ entry: ret i64 %conv } -; CHECK-INEXACT-LABEL: testasws: -; CHECK-INEXACT: fcvtas w0, s0 -; CHECK-INEXACT: frintx {{s[0-9]+}}, s0 - -; CHECK-FAST-LABEL: testasws: -; CHECK-FAST: fcvtas w0, s0 -; CHECK-FAST-NOT: frintx {{s[0-9]+}}, s0 +; CHECK-LABEL: testasws: +; CHECK: fcvtas w0, s0 +; CHECK-NOT: frintx {{s[0-9]+}}, s0 define i32 @testasws(float %a) { entry: %call = call float @roundf(float %a) nounwind readnone @@ -352,13 +250,9 @@ entry: ret i32 %conv } -; CHECK-INEXACT-LABEL: testasxs: -; CHECK-INEXACT: fcvtas x0, s0 -; CHECK-INEXACT: frintx {{s[0-9]+}}, s0 - -; CHECK-FAST-LABEL: testasxs: -; CHECK-FAST: fcvtas x0, s0 -; CHECK-FAST-NOT: frintx {{s[0-9]+}}, s0 +; CHECK-LABEL: testasxs: +; CHECK: fcvtas x0, s0 +; CHECK-NOT: frintx {{s[0-9]+}}, s0 define i64 @testasxs(float %a) { entry: %call = call float @roundf(float %a) nounwind readnone @@ -366,13 +260,9 @@ entry: ret i64 %conv } -; CHECK-INEXACT-LABEL: testaswd: -; CHECK-INEXACT: fcvtas w0, d0 -; CHECK-INEXACT: frintx {{d[0-9]+}}, d0 - -; CHECK-FAST-LABEL: testaswd: -; CHECK-FAST: fcvtas w0, d0 -; CHECK-FAST-NOT: frintx {{d[0-9]+}}, d0 +; CHECK-LABEL: testaswd: +; CHECK: fcvtas w0, d0 +; CHECK-NOT: frintx {{d[0-9]+}}, d0 define i32 @testaswd(double %a) { entry: %call = call double @round(double %a) nounwind readnone @@ -380,13 +270,9 @@ entry: ret i32 %conv } -; CHECK-INEXACT-LABEL: testasxd: -; CHECK-INEXACT: fcvtas x0, d0 -; CHECK-INEXACT: frintx {{d[0-9]+}}, d0 - -; CHECK-FAST-LABEL: testasxd: -; CHECK-FAST: fcvtas x0, d0 -; CHECK-FAST-NOT: frintx {{d[0-9]+}}, d0 +; CHECK-LABEL: testasxd: +; CHECK: fcvtas x0, d0 +; CHECK-NOT: frintx {{d[0-9]+}}, d0 define i64 @testasxd(double %a) { entry: %call = call double @round(double %a) nounwind readnone @@ -394,13 +280,9 @@ entry: ret i64 %conv } -; CHECK-INEXACT-LABEL: testauws: -; CHECK-INEXACT: fcvtau w0, s0 -; CHECK-INEXACT: frintx {{s[0-9]+}}, s0 - -; CHECK-FAST-LABEL: testauws: -; CHECK-FAST: fcvtau w0, s0 -; CHECK-FAST-NOT: frintx {{s[0-9]+}}, s0 +; CHECK-LABEL: testauws: +; CHECK: fcvtau w0, s0 +; CHECK-NOT: frintx {{s[0-9]+}}, s0 define i32 @testauws(float %a) { entry: %call = call float @roundf(float %a) nounwind readnone @@ -408,13 +290,9 @@ entry: ret i32 %conv } -; CHECK-INEXACT-LABEL: testauxs: -; CHECK-INEXACT: fcvtau x0, s0 -; CHECK-INEXACT: frintx {{s[0-9]+}}, s0 - -; CHECK-FAST-LABEL: testauxs: -; CHECK-FAST: fcvtau x0, s0 -; CHECK-FAST-NOT: frintx {{s[0-9]+}}, s0 +; CHECK-LABEL: testauxs: +; CHECK: fcvtau x0, s0 +; CHECK-NOT: frintx {{s[0-9]+}}, s0 define i64 @testauxs(float %a) { entry: %call = call float @roundf(float %a) nounwind readnone @@ -422,13 +300,9 @@ entry: ret i64 %conv } -; CHECK-INEXACT-LABEL: testauwd: -; CHECK-INEXACT: fcvtau w0, d0 -; CHECK-INEXACT: frintx {{d[0-9]+}}, d0 - -; CHECK-FAST-LABEL: testauwd: -; CHECK-FAST: fcvtau w0, d0 -; CHECK-FAST-NOT: frintx {{d[0-9]+}}, d0 +; CHECK-LABEL: testauwd: +; CHECK: fcvtau w0, d0 +; CHECK-NOT: frintx {{d[0-9]+}}, d0 define i32 @testauwd(double %a) { entry: %call = call double @round(double %a) nounwind readnone @@ -436,13 +310,9 @@ entry: ret i32 %conv } -; CHECK-INEXACT-LABEL: testauxd: -; CHECK-INEXACT: fcvtau x0, d0 -; CHECK-INEXACT: frintx {{d[0-9]+}}, d0 - -; CHECK-FAST-LABEL: testauxd: -; CHECK-FAST: fcvtau x0, d0 -; CHECK-FAST-NOT: frintx {{d[0-9]+}}, d0 +; CHECK-LABEL: testauxd: +; CHECK: fcvtau x0, d0 +; CHECK-NOT: frintx {{d[0-9]+}}, d0 define i64 @testauxd(double %a) { entry: %call = call double @round(double %a) nounwind readnone @@ -450,7 +320,6 @@ entry: ret i64 %conv } - declare float @floorf(float) nounwind readnone declare double @floor(double) nounwind readnone declare float @ceilf(float) nounwind readnone diff --git a/llvm/test/CodeGen/X86/avx-cvt.ll b/llvm/test/CodeGen/X86/avx-cvt.ll index 2f039862b36..84aee16a988 100644 --- a/llvm/test/CodeGen/X86/avx-cvt.ll +++ b/llvm/test/CodeGen/X86/avx-cvt.ll @@ -137,7 +137,7 @@ declare double @llvm.nearbyint.f64(double %p) define float @floor_f32(float %a) { ; CHECK-LABEL: floor_f32: ; CHECK: # BB#0: -; CHECK-NEXT: vroundss $1, %xmm0, %xmm0, %xmm0 +; CHECK-NEXT: vroundss $9, %xmm0, %xmm0, %xmm0 ; CHECK-NEXT: retq %res = call float @llvm.floor.f32(float %a) ret float %res diff --git a/llvm/test/CodeGen/X86/floor-soft-float.ll b/llvm/test/CodeGen/X86/floor-soft-float.ll index 7bb738513f5..3b28ecc6379 100644 --- a/llvm/test/CodeGen/X86/floor-soft-float.ll +++ b/llvm/test/CodeGen/X86/floor-soft-float.ll @@ -6,7 +6,7 @@ target triple = "x86_64-unknown-linux-gnu" declare float @llvm.floor.f32(float) ; CHECK-SOFT-FLOAT: callq floorf -; CHECK-HARD-FLOAT: roundss $1, %xmm0, %xmm0 +; CHECK-HARD-FLOAT: roundss $9, %xmm0, %xmm0 define float @myfloor(float %a) { %val = tail call float @llvm.floor.f32(float %a) ret float %val diff --git a/llvm/test/CodeGen/X86/rounding-ops.ll b/llvm/test/CodeGen/X86/rounding-ops.ll index 69f4bfb9f47..15a11d1d6a9 100644 --- a/llvm/test/CodeGen/X86/rounding-ops.ll +++ b/llvm/test/CodeGen/X86/rounding-ops.ll @@ -6,10 +6,10 @@ define float @test1(float %x) nounwind { ret float %call ; CHECK-SSE-LABEL: test1: -; CHECK-SSE: roundss $1 +; CHECK-SSE: roundss $9 ; CHECK-AVX-LABEL: test1: -; CHECK-AVX: vroundss $1 +; CHECK-AVX: vroundss $9 } declare float @floorf(float) nounwind readnone @@ -19,10 +19,10 @@ define double @test2(double %x) nounwind { ret double %call ; CHECK-SSE-LABEL: test2: -; CHECK-SSE: roundsd $1 +; CHECK-SSE: roundsd $9 ; CHECK-AVX-LABEL: test2: -; CHECK-AVX: vroundsd $1 +; CHECK-AVX: vroundsd $9 } declare double @floor(double) nounwind readnone @@ -58,10 +58,10 @@ define float @test5(float %x) nounwind { ret float %call ; CHECK-SSE-LABEL: test5: -; CHECK-SSE: roundss $2 +; CHECK-SSE: roundss $10 ; CHECK-AVX-LABEL: test5: -; CHECK-AVX: vroundss $2 +; CHECK-AVX: vroundss $10 } declare float @ceilf(float) nounwind readnone @@ -71,10 +71,10 @@ define double @test6(double %x) nounwind { ret double %call ; CHECK-SSE-LABEL: test6: -; CHECK-SSE: roundsd $2 +; CHECK-SSE: roundsd $10 ; CHECK-AVX-LABEL: test6: -; CHECK-AVX: vroundsd $2 +; CHECK-AVX: vroundsd $10 } declare double @ceil(double) nounwind readnone @@ -110,10 +110,10 @@ define float @test9(float %x) nounwind { ret float %call ; CHECK-SSE-LABEL: test9: -; CHECK-SSE: roundss $3 +; CHECK-SSE: roundss $11 ; CHECK-AVX-LABEL: test9: -; CHECK-AVX: vroundss $3 +; CHECK-AVX: vroundss $11 } declare float @truncf(float) nounwind readnone @@ -123,10 +123,10 @@ define double @test10(double %x) nounwind { ret double %call ; CHECK-SSE-LABEL: test10: -; CHECK-SSE: roundsd $3 +; CHECK-SSE: roundsd $11 ; CHECK-AVX-LABEL: test10: -; CHECK-AVX: vroundsd $3 +; CHECK-AVX: vroundsd $11 } declare double @trunc(double) nounwind readnone diff --git a/llvm/test/CodeGen/X86/stack-folding-fp-avx1.ll b/llvm/test/CodeGen/X86/stack-folding-fp-avx1.ll index 63aa742bdf0..7ac17067a69 100644 --- a/llvm/test/CodeGen/X86/stack-folding-fp-avx1.ll +++ b/llvm/test/CodeGen/X86/stack-folding-fp-avx1.ll @@ -1411,7 +1411,7 @@ declare <8 x float> @llvm.x86.avx.round.ps.256(<8 x float>, i32) nounwind readno define double @stack_fold_roundsd(double %a0) optsize { ;CHECK-LABEL: stack_fold_roundsd - ;CHECK: vroundsd $1, {{-?[0-9]*}}(%rsp), {{%xmm[0-9][0-9]*}}, {{%xmm[0-9][0-9]*}} {{.*#+}} 8-byte Folded Reload + ;CHECK: vroundsd $9, {{-?[0-9]*}}(%rsp), {{%xmm[0-9][0-9]*}}, {{%xmm[0-9][0-9]*}} {{.*#+}} 8-byte Folded Reload %1 = tail call <2 x i64> asm sideeffect "nop", "=x,~{xmm1},~{xmm2},~{xmm3},~{xmm4},~{xmm5},~{xmm6},~{xmm7},~{xmm8},~{xmm9},~{xmm10},~{xmm11},~{xmm12},~{xmm13},~{xmm14},~{xmm15},~{flags}"() %2 = call double @llvm.floor.f64(double %a0) ret double %2 @@ -1423,7 +1423,7 @@ declare <2 x double> @llvm.x86.sse41.round.sd(<2 x double>, <2 x double>, i32) n define float @stack_fold_roundss(float %a0) optsize { ;CHECK-LABEL: stack_fold_roundss - ;CHECK: vroundss $1, {{-?[0-9]*}}(%rsp), {{%xmm[0-9][0-9]*}}, {{%xmm[0-9][0-9]*}} {{.*#+}} 4-byte Folded Reload + ;CHECK: vroundss $9, {{-?[0-9]*}}(%rsp), {{%xmm[0-9][0-9]*}}, {{%xmm[0-9][0-9]*}} {{.*#+}} 4-byte Folded Reload %1 = tail call <2 x i64> asm sideeffect "nop", "=x,~{xmm1},~{xmm2},~{xmm3},~{xmm4},~{xmm5},~{xmm6},~{xmm7},~{xmm8},~{xmm9},~{xmm10},~{xmm11},~{xmm12},~{xmm13},~{xmm14},~{xmm15},~{flags}"() %2 = call float @llvm.floor.f32(float %a0) ret float %2 diff --git a/llvm/test/CodeGen/X86/stack-folding-fp-sse42.ll b/llvm/test/CodeGen/X86/stack-folding-fp-sse42.ll index 8ee23a1048f..8086f06bf1b 100644 --- a/llvm/test/CodeGen/X86/stack-folding-fp-sse42.ll +++ b/llvm/test/CodeGen/X86/stack-folding-fp-sse42.ll @@ -886,7 +886,7 @@ declare <4 x float> @llvm.x86.sse41.round.ps(<4 x float>, i32) nounwind readnone define double @stack_fold_roundsd(double %a0) optsize { ;CHECK-LABEL: stack_fold_roundsd - ;CHECK: roundsd $1, {{-?[0-9]*}}(%rsp), {{%xmm[0-9][0-9]*}} {{.*#+}} 8-byte Folded Reload + ;CHECK: roundsd $9, {{-?[0-9]*}}(%rsp), {{%xmm[0-9][0-9]*}} {{.*#+}} 8-byte Folded Reload %1 = tail call <2 x i64> asm sideeffect "nop", "=x,~{xmm1},~{xmm2},~{xmm3},~{xmm4},~{xmm5},~{xmm6},~{xmm7},~{xmm8},~{xmm9},~{xmm10},~{xmm11},~{xmm12},~{xmm13},~{xmm14},~{xmm15},~{flags}"() %2 = call double @llvm.floor.f64(double %a0) ret double %2 @@ -898,7 +898,7 @@ declare <2 x double> @llvm.x86.sse41.round.sd(<2 x double>, <2 x double>, i32) n define float @stack_fold_roundss(float %a0) minsize { ;CHECK-LABEL: stack_fold_roundss - ;CHECK: roundss $1, {{-?[0-9]*}}(%rsp), {{%xmm[0-9][0-9]*}} {{.*#+}} 4-byte Folded Reload + ;CHECK: roundss $9, {{-?[0-9]*}}(%rsp), {{%xmm[0-9][0-9]*}} {{.*#+}} 4-byte Folded Reload %1 = tail call <2 x i64> asm sideeffect "nop", "=x,~{xmm1},~{xmm2},~{xmm3},~{xmm4},~{xmm5},~{xmm6},~{xmm7},~{xmm8},~{xmm9},~{xmm10},~{xmm11},~{xmm12},~{xmm13},~{xmm14},~{xmm15},~{flags}"() %2 = call float @llvm.floor.f32(float %a0) ret float %2 |

