From: Nate Begeman Date: Sat, 5 Jan 2008 20:47:37 +0000 (+0000) Subject: If custom lowering of insert element fails, the result Val will be 0. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=2281a991414f681c482157265461b29a923ef620;p=oota-llvm.git If custom lowering of insert element fails, the result Val will be 0. Don't overwrite a variable used by the fallthrough code path in this case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45630 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 688e4f9fea0..f1cd2cab249 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -1243,9 +1243,9 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) { case TargetLowering::Legal: break; case TargetLowering::Custom: - Tmp3 = TLI.LowerOperation(Result, DAG); - if (Tmp3.Val) { - Result = Tmp3; + Tmp4 = TLI.LowerOperation(Result, DAG); + if (Tmp4.Val) { + Result = Tmp4; break; } // FALLTHROUGH