Issue 91716
Summary [DebugInfo][LICM] Missing debug location updates
Labels new issue
Assignees
Reporter Apochens
    LICM[-L932](https://github.com/llvm/llvm-project/blob/6aac30fa43f094ac25269bda163dc89a88cb8da7/llvm/lib/Transforms/Scalar/LICM.cpp#L932), [-L937](https://github.com/llvm/llvm-project/blob/6aac30fa43f094ac25269bda163dc89a88cb8da7/llvm/lib/Transforms/Scalar/LICM.cpp#L937): Newly created FDiv `ReciprocalDivisor` is inserted before the instruction `I` replaced by new FMul `Product`.
```cpp
->  auto ReciprocalDivisor = BinaryOperator::CreateFDiv(One, Divisor);
| ReciprocalDivisor->setFastMathFlags(I.getFastMathFlags());
| SafetyInfo->insertInstructionTo(ReciprocalDivisor, I.getParent());
|_ ReciprocalDivisor->insertBefore(&I);

->  auto Product =
| BinaryOperator::CreateFMul(I.getOperand(0), ReciprocalDivisor);
| Product->setFastMathFlags(I.getFastMathFlags());
| SafetyInfo->insertInstructionTo(Product, I.getParent());
| Product->insertAfter(&I);
|   I.replaceAllUsesWith(Product);
|_ eraseInstruction(I, *SafetyInfo, MSSAU);
```

I will give the patch later.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to