diff options
author | Craig Topper <craig.topper@gmail.com> | 2020-01-14 22:40:56 -0800 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2020-01-15 00:43:07 -0800 |
commit | be8f217b180e134d568ff491b045d05c137b6234 (patch) | |
tree | f0ae192bb0788e0403d284785aaa10b4ba1d0536 /llvm/lib/Target/X86 | |
parent | 1b264a8263f8656bd9c09c471af9b43422429ef6 (diff) | |
download | bcm5719-llvm-be8f217b180e134d568ff491b045d05c137b6234.tar.gz bcm5719-llvm-be8f217b180e134d568ff491b045d05c137b6234.zip |
[X86] Don't call LowerUINT_TO_FP_i32 for i32->f80 on 32-bit targets with sse2.
We were performing an emulated i32->f64 in the SSE registers, then
storing that value to memory and doing a extload into the X87
domain.
After this patch we'll now just store the i32 to memory along
with an i32 0. Then do a 64-bit FILD to f80 completely in the X87
unit. This matches what we do without SSE.
Diffstat (limited to 'llvm/lib/Target/X86')
-rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index d7593f52573..0f152968ddf 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -19331,7 +19331,7 @@ SDValue X86TargetLowering::LowerUINT_TO_FP(SDValue Op, if (SrcVT == MVT::i64 && DstVT == MVT::f64 && X86ScalarSSEf64) return LowerUINT_TO_FP_i64(Op, DAG, Subtarget); - if (SrcVT == MVT::i32 && X86ScalarSSEf64) + if (SrcVT == MVT::i32 && X86ScalarSSEf64 && DstVT != MVT::f80) return LowerUINT_TO_FP_i32(Op, DAG, Subtarget); if (Subtarget.is64Bit() && SrcVT == MVT::i64 && DstVT == MVT::f32) return SDValue(); |