diff options
author | Dan Gohman <gohman@apple.com> | 2008-10-01 15:11:19 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-10-01 15:11:19 +0000 |
commit | 94798d31ddf28976048688699de008397b5e0d2a (patch) | |
tree | b50f556490dfd22b4bb07ad615b88f0dcbc2f134 /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | fbd67be50e1fdb98ef63b3f7a65e0979bac7a331 (diff) | |
download | bcm5719-llvm-94798d31ddf28976048688699de008397b5e0d2a.tar.gz bcm5719-llvm-94798d31ddf28976048688699de008397b5e0d2a.zip |
Fold trivial two-operand tokenfactors where the operands are equal
immediately.
llvm-svn: 56921
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index eba3a2a9ce4..3d0a2d6e50c 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/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 |