forked from OSchip/llvm-project
Properly enable load clustering.
Operand 2 on a load instruction does not have to be a RegisterSDNode for this to work. llvm-svn: 100497
This commit is contained in:
parent
273c4f53ec
commit
1a9b3f3484
|
@ -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)) &&
|
||||
|
|
Loading…
Reference in New Issue