Issue 97388
Summary [DebugInfo][SimplifyCFGPass] Missing the debug location update for the new br instruction
Labels new issue
Assignees
Reporter Apochens
    [**SimplifyCFGPass-L146**](https://github.com/llvm/llvm-project/blob/7ee421d29612ae919edfe7250b87e3c738d66a26/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp#L146)

The new br instruction, which replaces the old terminator `Term` of the same block, should inherent the debug location of `Term`.

```cpp
 auto *Term = BB->getTerminator();
    ...
 Term->eraseFromParent();
->  BranchInst::Create(CanonicalBB, BB);
```
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to