[X86] Prevent folding a load into an AND if that AND is really a ZEXT_INREG that...
authorCraig Topper <craig.topper@intel.com>
Wed, 24 Apr 2019 19:28:38 +0000 (19:28 +0000)
committerCraig Topper <craig.topper@intel.com>
Wed, 24 Apr 2019 19:28:38 +0000 (19:28 +0000)
commitaf194e938008262bb8a99514d21705eb06b953b5
treec37b49edc5fbd62cd45680d8abc0abd6912779c7
parent1591693c7cca772c3b7129d2a4f9469da208d881
[X86] Prevent folding a load into an AND if that AND is really a ZEXT_INREG that should use movzx.

This can save a 32-bit immediate move.

We would shrink the load and fold it if it was non-volatile, but that's trickier to check for.

llvm-svn: 359129
llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
llvm/test/CodeGen/X86/2008-09-29-VolatileBug.ll
llvm/test/CodeGen/X86/fold-and-shift.ll