[X86] Prevent fast isel from folding loads into the instructions listed in hasPartial...
authorCraig Topper <craig.topper@intel.com>
Wed, 1 Nov 2017 18:10:06 +0000 (18:10 +0000)
committerCraig Topper <craig.topper@intel.com>
Wed, 1 Nov 2017 18:10:06 +0000 (18:10 +0000)
commit949005a477d54bcc9c7ea097852ecc81b77ebac2
treef583d6698b5c65fbe9ce56e9038a9cd8e0b75cad
parent3031a585fbf4a10174a14192eaeeaa96fdd0e6a2
[X86] Prevent fast isel from folding loads into the instructions listed in hasPartialRegUpdate.

This patch moves the check for opt size and hasPartialRegUpdate into the lower level implementation of foldMemoryOperandImpl to catch the entry point that fast isel uses.

We're still folding undef register instructions in AVX that we should also probably disable, but that's a problem for another patch.

Unfortunately, this requires reordering a bunch of functions which is why the diff is so large. I can do the function reordering separately if we want.

Differential Revision: https://reviews.llvm.org/D39402

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317112 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86InstrInfo.cpp
test/CodeGen/X86/fast-isel-fptrunc-fpext.ll
test/CodeGen/X86/fast-isel-int-float-conversion-x86-64.ll
test/CodeGen/X86/fast-isel-int-float-conversion.ll