Fix an infinite loop on x86
authorChris Lattner <sabre@nondot.org>
Mon, 29 Aug 2005 17:30:00 +0000 (17:30 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 29 Aug 2005 17:30:00 +0000 (17:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23129 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

index 624933cd51441c5ae3b344dbd17998b64e669acc..6ff7bccd61aacd24b57d45cb22bbbbd361e1f312 100644 (file)
@@ -1838,7 +1838,7 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
         if (Tmp.Val) {
           AddLegalizedOperand(Op, Tmp);
           NeedsAnotherIteration = true;
-          return Result;
+          return Tmp;
         } else {
           // The target thinks this is legal afterall.
           break;