[llvm] [DebugInfo][NaryReassociate] Fix missing debug location updates (PR #92545)
Orlando Cazalet-Hyams via llvm-commits
llvm-commits at lists.llvm.org
Mon May 20 06:19:49 PDT 2024
================
@@ -512,9 +512,11 @@ Instruction *NaryReassociatePass::tryReassociatedBinaryOp(const SCEV *LHSExpr,
switch (I->getOpcode()) {
case Instruction::Add:
NewI = BinaryOperator::CreateAdd(LHS, RHS, "", I->getIterator());
+ NewI->setDebugLoc(I->getDebugLoc());
break;
case Instruction::Mul:
NewI = BinaryOperator::CreateMul(LHS, RHS, "", I->getIterator());
+ NewI->setDebugLoc(I->getDebugLoc());
----------------
OCHyams wrote:
style nit: we could sink this out the switch. I'll leave it up to you.
https://github.com/llvm/llvm-project/pull/92545
More information about the llvm-commits
mailing list