[X86] Don't call LowerUINT_TO_FP_i32 for i32->f80 on 32-bit targets with sse2.
authorCraig Topper <craig.topper@gmail.com>
Wed, 15 Jan 2020 06:40:56 +0000 (22:40 -0800)
committerCraig Topper <craig.topper@gmail.com>
Wed, 15 Jan 2020 08:43:07 +0000 (00:43 -0800)
commitbe8f217b180e134d568ff491b045d05c137b6234
treef0ae192bb0788e0403d284785aaa10b4ba1d0536
parent1b264a8263f8656bd9c09c471af9b43422429ef6
[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.
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/scalar-int-to-fp.ll