[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)
commitca1aa83cbe22e5b3aa7345a6fd7d0e4d4b1f1d64
tree6f6e721f11d79808c898ac7c43493005625463c1
parent671526148c547c453d320075ec619f5519499de2
[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

llvm-svn: 317112
llvm/lib/Target/X86/X86InstrInfo.cpp
llvm/test/CodeGen/X86/fast-isel-fptrunc-fpext.ll
llvm/test/CodeGen/X86/fast-isel-int-float-conversion-x86-64.ll
llvm/test/CodeGen/X86/fast-isel-int-float-conversion.ll