OSDN Git Service

[X86] Make (f80 (sint_to_fp (i16))) use fistps/fisttps instead of fistpl/fisttpl...
authorCraig Topper <craig.topper@intel.com>
Thu, 14 Feb 2019 01:41:43 +0000 (01:41 +0000)
committerCraig Topper <craig.topper@intel.com>
Thu, 14 Feb 2019 01:41:43 +0000 (01:41 +0000)
commitafc36095627b820e5b6804c6c98aa459bd7837f2
tree01ea945bb38815644dc820d528ae8e01a5c63ed4
parent1854768f0ffbd4d9271fbe29fff380885bc867c7
[X86] Make (f80 (sint_to_fp (i16))) use fistps/fisttps instead of fistpl/fisttpl when SSE is enabled.

When SSE is enabled sint_to_fp with i16 is blindly promoted to i32, but that changes the behavior of f80 conversion.

Move the promotion to i16 to LowerFP_TO_INT so we can limit it based on the floating point type.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354003 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/fp-cvt.ll