[llvm-commits] [llvm] r56921 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Dan Gohman
gohman at apple.com
Wed Oct 1 08:11:19 PDT 2008
Author: djg
Date: Wed Oct 1 10:11:19 2008
New Revision: 56921
URL: http://llvm.org/viewvc/llvm-project?rev=56921&view=rev
Log:
Fold trivial two-operand tokenfactors where the operands are equal
immediately.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=56921&r1=56920&r2=56921&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Wed Oct 1 10:11:19 2008
@@ -2320,6 +2320,7 @@
// 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
More information about the llvm-commits
mailing list