Fold trivial two-operand tokenfactors where the operands are equal

immediately.

llvm-svn: 56921
This commit is contained in:
Dan Gohman 2008-10-01 15:11:19 +00:00
parent fbd67be50e
commit 94798d31dd
1 changed files with 1 additions and 0 deletions

View File

@ -2320,6 +2320,7 @@ SDValue SelectionDAG::getNode(unsigned Opcode, MVT VT,
// Fold trivial token factors.
if (N1.getOpcode() == ISD::EntryToken) return N2;
if (N2.getOpcode() == ISD::EntryToken) return N1;
if (N1 == N2) return N1;
break;
case ISD::CONCAT_VECTORS:
// A CONCAT_VECTOR with all operands BUILD_VECTOR can be simplified to