From c087a435109cdc943da094a21371f7d66d5b0e54 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 13 Jul 2005 02:00:04 +0000 Subject: [PATCH] Fix Alpha/2005-07-12-TwoMallocCalls.ll and PR593. It is not safe to call LegalizeOp on something that has already been legalized. Instead, just force another iteration of legalization. This could affect all platforms but X86, as this codepath is dynamically dead on X86 (ISD::MEMSET and friends are legal). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22419 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index a05e5937a66..16d4eeb9414 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -972,7 +972,8 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) { std::pair CallResult = TLI.LowerCallTo(Tmp1, Type::VoidTy, false, CallingConv::C, false, DAG.getExternalSymbol(FnName, IntPtr), Args, DAG); - Result = LegalizeOp(CallResult.second); + Result = CallResult.second; + NeedsAnotherIteration = true; break; } case TargetLowering::Custom: -- 2.34.1