aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-10-01 15:11:19 +0000
committerDan Gohman <gohman@apple.com>2008-10-01 15:11:19 +0000
commit38ac062c2f4de93cd4351693f084f0c4474be02c (patch)
tree30c3482f942b01e1616cca34a38988bb1780c9bf /lib/CodeGen
parent10b49489bff3f119ccbfba55df9fb14a8a784078 (diff)
Fold trivial two-operand tokenfactors where the operands are equal
immediately. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56921 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index eba3a2a9ce..3d0a2d6e50 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -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