diff options
author | Craig Topper <craig.topper@intel.com> | 2019-02-13 07:42:34 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2019-02-13 07:42:34 +0000 |
commit | 9b61f48e4b747b055211587587cf5a8b02dd3a10 (patch) | |
tree | b2f5e9d4238001711f1adfb7fa85677044007b76 /llvm/test | |
parent | 3099e442a68af907621077272c5e5336e2fc3dc4 (diff) | |
download | bcm5719-llvm-9b61f48e4b747b055211587587cf5a8b02dd3a10.tar.gz bcm5719-llvm-9b61f48e4b747b055211587587cf5a8b02dd3a10.zip |
[X86] Use default expansion for (i64 fp_to_uint f80) when avx512 is enabled on 64-bit targets to match what happens without avx512.
In 64-bit mode prior to avx512 we use Expand, but with avx512 we need to make f32/f64 conversions Legal so we use Custom and then do our own expansion for f80. But this seems to produce codegen differences relative to avx2. This patch corrects this.
llvm-svn: 353921
Diffstat (limited to 'llvm/test')
-rw-r--r-- | llvm/test/CodeGen/X86/scalar-fp-to-i64.ll | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/llvm/test/CodeGen/X86/scalar-fp-to-i64.ll b/llvm/test/CodeGen/X86/scalar-fp-to-i64.ll index a97fc222a80..d7e63ba046c 100644 --- a/llvm/test/CodeGen/X86/scalar-fp-to-i64.ll +++ b/llvm/test/CodeGen/X86/scalar-fp-to-i64.ll @@ -1066,18 +1066,15 @@ define i64 @x_to_u64(x86_fp80 %a) nounwind { ; AVX512_64_WIN-NEXT: flds __real@{{.*}}(%rip) ; AVX512_64_WIN-NEXT: fld %st(1) ; AVX512_64_WIN-NEXT: fsub %st(1), %st -; AVX512_64_WIN-NEXT: xorl %ecx, %ecx +; AVX512_64_WIN-NEXT: xorl %eax, %eax ; AVX512_64_WIN-NEXT: fxch %st(1) ; AVX512_64_WIN-NEXT: fucompi %st(2), %st ; AVX512_64_WIN-NEXT: fcmovnbe %st(1), %st ; AVX512_64_WIN-NEXT: fstp %st(1) ; AVX512_64_WIN-NEXT: fisttpll (%rsp) -; AVX512_64_WIN-NEXT: setbe %cl -; AVX512_64_WIN-NEXT: shll $31, %ecx -; AVX512_64_WIN-NEXT: xorl {{[0-9]+}}(%rsp), %ecx -; AVX512_64_WIN-NEXT: shlq $32, %rcx -; AVX512_64_WIN-NEXT: movl (%rsp), %eax -; AVX512_64_WIN-NEXT: orq %rcx, %rax +; AVX512_64_WIN-NEXT: setbe %al +; AVX512_64_WIN-NEXT: shlq $63, %rax +; AVX512_64_WIN-NEXT: xorq (%rsp), %rax ; AVX512_64_WIN-NEXT: popq %rcx ; AVX512_64_WIN-NEXT: retq ; @@ -1087,18 +1084,15 @@ define i64 @x_to_u64(x86_fp80 %a) nounwind { ; AVX512_64_LIN-NEXT: flds {{.*}}(%rip) ; AVX512_64_LIN-NEXT: fld %st(1) ; AVX512_64_LIN-NEXT: fsub %st(1), %st -; AVX512_64_LIN-NEXT: xorl %ecx, %ecx +; AVX512_64_LIN-NEXT: xorl %eax, %eax ; AVX512_64_LIN-NEXT: fxch %st(1) ; AVX512_64_LIN-NEXT: fucompi %st(2), %st ; AVX512_64_LIN-NEXT: fcmovnbe %st(1), %st ; AVX512_64_LIN-NEXT: fstp %st(1) ; AVX512_64_LIN-NEXT: fisttpll -{{[0-9]+}}(%rsp) -; AVX512_64_LIN-NEXT: setbe %cl -; AVX512_64_LIN-NEXT: shll $31, %ecx -; AVX512_64_LIN-NEXT: xorl -{{[0-9]+}}(%rsp), %ecx -; AVX512_64_LIN-NEXT: shlq $32, %rcx -; AVX512_64_LIN-NEXT: movl -{{[0-9]+}}(%rsp), %eax -; AVX512_64_LIN-NEXT: orq %rcx, %rax +; AVX512_64_LIN-NEXT: setbe %al +; AVX512_64_LIN-NEXT: shlq $63, %rax +; AVX512_64_LIN-NEXT: xorq -{{[0-9]+}}(%rsp), %rax ; AVX512_64_LIN-NEXT: retq ; ; SSE3_32_WIN-LABEL: x_to_u64: |