[llvm-branch-commits] [llvm-branch] r110869 - /llvm/branches/Apple/Morbo/lib/Target/X86/X86InstrInfo.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed Aug 11 15:56:46 PDT 2010


Author: stoklund
Date: Wed Aug 11 17:56:46 2010
New Revision: 110869

URL: http://llvm.org/viewvc/llvm-project?rev=110869&view=rev
Log:
Don't fold a sub-register load into instructions. It may change the size of the
load.

<rdar://problem/8282498>

Modified:
    llvm/branches/Apple/Morbo/lib/Target/X86/X86InstrInfo.cpp

Modified: llvm/branches/Apple/Morbo/lib/Target/X86/X86InstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/Target/X86/X86InstrInfo.cpp?rev=110869&r1=110868&r2=110869&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/Target/X86/X86InstrInfo.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/Target/X86/X86InstrInfo.cpp Wed Aug 11 17:56:46 2010
@@ -2607,6 +2607,11 @@
   } else if (Ops.size() != 1)
     return NULL;
 
+  // Make sure the subregisters match.
+  // Otherwise we risk changing the size of the load.
+  if (LoadMI->getOperand(0).getSubReg() != MI->getOperand(Ops[0]).getSubReg())
+    return NULL;
+
   SmallVector<MachineOperand,X86AddrNumOperands> MOs;
   switch (LoadMI->getOpcode()) {
   case X86::V_SET0PS:





More information about the llvm-branch-commits mailing list