For the given test case, when the 'int Four = Two;' is sunk into the 'case 0:'
block, the debug value for 'Three' is set incorrectly to 'poison'.
... int Four = Two; switch (One) { case 0: Three = Four; break; ...
Paths
| Differential D158171
[instcombine] Sunk instruction introduces unnecessary poison dbg.value ClosedPublic Authored by CarlosAlbertoEnciso on Aug 17 2023, 3:58 AM.
Details Summary For the given test case, when the 'int Four = Two;' is sunk into the 'case 0:' ... int Four = Two; switch (One) { case 0: Three = Four; break; ...
Diff Detail
Event Timeline
This revision is now accepted and ready to land.Aug 18 2023, 1:18 PM Closed by commit rGbf69217baecb: [instcombine] Sunk instructions with invalid source location. (authored by CarlosAlbertoEnciso). · Explain WhyAug 20 2023, 10:25 PM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 551901 llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
llvm/test/Transforms/InstCombine/sink-instruction-introduces-unnecessary-poison-value.ll
|
Looking at the testcase, this seems good, I just have trouble parsing the comment: what does "preserved from any salvage debug use" mean?