OSDN Git Service

[X86] Correct the memory operand for the FLD emitted in FP_TO_INTHelper for 32-bit...
authorCraig Topper <craig.topper@intel.com>
Mon, 11 Feb 2019 20:38:10 +0000 (20:38 +0000)
committerCraig Topper <craig.topper@intel.com>
Mon, 11 Feb 2019 20:38:10 +0000 (20:38 +0000)
commit55a63572d1d78dd844da0fd40c0d8ad442723618
tree2b5c8d11870b18a2c5e5e6fed75b6be7be99097d
parent1369773f89721a848c0464386359ee76bc53dc84
[X86] Correct the memory operand for the FLD emitted in FP_TO_INTHelper for 32-bit SSE targets.

We were using DstTy, but that represents the integer type we are converting to which is i64 in this
case. The FLD is part of an intermediate step to get from the SSE registers to the x87 registers.
If the floating point type is f32, the memory operand should reflect a 4 byte access not an 8 byte
access. The store we used to get from SSE to the stack is using the corect size.

While there, consistenly use TheVT in place of Op.getOperand(0).getValueType() throughout the function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353745 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp