Properly enable load clustering.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Mon, 5 Apr 2010 23:48:02 +0000 (23:48 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Mon, 5 Apr 2010 23:48:02 +0000 (23:48 +0000)
Operand 2 on a load instruction does not have to be a RegisterSDNode for this to
work.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100497 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86InstrInfo.cpp

index fcb9947423de44bb1cdff7bad2cf314d5f1423be..ccb7b055b07950e77e6d3babe29917f43496f169 100644 (file)
@@ -2961,10 +2961,6 @@ X86InstrInfo::areLoadsFromSameBasePtr(SDNode *Load1, SDNode *Load2,
       Load1->getOperand(2) == Load2->getOperand(2)) {
     if (cast<ConstantSDNode>(Load1->getOperand(1))->getZExtValue() != 1)
       return false;
-    SDValue Op2 = Load1->getOperand(2);
-    if (!isa<RegisterSDNode>(Op2) ||
-        cast<RegisterSDNode>(Op2)->getReg() != 0)
-      return 0;
 
     // Now let's examine the displacements.
     if (isa<ConstantSDNode>(Load1->getOperand(3)) &&