Issue |
146621
|
Summary |
[DebugInfo][LICM] Debug value loss caused by hoisting the cmp instructions
|
Labels |
loopoptim,
debuginfo,
llvm:transforms
|
Assignees |
|
Reporter |
Apochens
|
In the function `hoistMinMax()` in LICM, after replacing the comparisons in loop with the hoisted compared result, the optimization erases the replaced comparison (i.e., `Cond1` and `Cond2` in the following code, which are the two operands of the logical operation instruction `I`) without salvaging the debug values.
https://github.com/llvm/llvm-project/blob/2599a9aeb543f01cb20e3fdc2713aa8c8cb20fbf/llvm/lib/Transforms/Scalar/LICM.cpp#L2491-L2494
**Here is an example:** https://godbolt.org/z/M38xhTY3a
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs