diff --git a/llvm/lib/CodeGen/TargetPassConfig.cpp b/llvm/lib/CodeGen/TargetPassConfig.cpp index de0d2264de22..75a565e898f4 100644 --- a/llvm/lib/CodeGen/TargetPassConfig.cpp +++ b/llvm/lib/CodeGen/TargetPassConfig.cpp @@ -779,9 +779,6 @@ void TargetPassConfig::addMachinePasses() { // Print the instruction selected machine code... printAndVerify("After Instruction Selection"); - if (TM->Options.EnableIPRA) - addPass(createRegUsageInfoPropPass()); - // Expand pseudo-instructions emitted by ISel. addPass(&ExpandISelPseudosID); @@ -794,6 +791,9 @@ void TargetPassConfig::addMachinePasses() { addPass(&LocalStackSlotAllocationID, false); } + if (TM->Options.EnableIPRA) + addPass(createRegUsageInfoPropPass()); + // Run pre-ra passes. addPreRegAlloc();