Oops. Bad typo. Without the check of N1.hasOneUse() bad things can happen.
Suppose the TokenFactor can reach the Op: [Load chain] ^ | [Load] ^ ^ | | / \- / | / [Op] / ^ ^ | .. | | / | [TokenFactor] | ^ | | | \ / \ / [Store] If we move the Load below the TokenFactor, we would have created a cycle in the DAG. llvm-svn: 30040
This commit is contained in:
parent
bad9d2ee49
commit
2c4e0f120f
|
@ -308,8 +308,8 @@ void X86DAGToDAGISel::InstructionSelectPreprocess(SelectionDAG &DAG) {
|
||||||
|
|
||||||
SDOperand N1 = I->getOperand(1);
|
SDOperand N1 = I->getOperand(1);
|
||||||
SDOperand N2 = I->getOperand(2);
|
SDOperand N2 = I->getOperand(2);
|
||||||
if (MVT::isFloatingPoint(N1.getValueType()) &&
|
if (MVT::isFloatingPoint(N1.getValueType()) ||
|
||||||
MVT::isVector(N1.getValueType()) &&
|
MVT::isVector(N1.getValueType()) ||
|
||||||
!N1.hasOneUse())
|
!N1.hasOneUse())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue