Unary token factor nodes are unneeded.
authorChris Lattner <sabre@nondot.org>
Fri, 21 Jan 2005 18:01:22 +0000 (18:01 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 21 Jan 2005 18:01:22 +0000 (18:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19727 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/SelectionDAG.cpp

index c91586b4d4226dc6e4ee00e1083b43fdf2e49b11..3d7d3bfa6fa42435054f2a981f4c6ae6e658369a 100644 (file)
@@ -511,6 +511,8 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT,
 
   unsigned OpOpcode = Operand.Val->getOpcode();
   switch (Opcode) {
+  case ISD::TokenFactor:
+    return Operand;         // Factor of one node?  No factor.
   case ISD::SIGN_EXTEND:
     if (Operand.getValueType() == VT) return Operand;   // noop extension
     if (OpOpcode == ISD::SIGN_EXTEND || OpOpcode == ISD::ZERO_EXTEND)