See Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=44371.
A demanded bits optimisation could result in an incorrect debuginfo variable value for a constant operand. This patch attempts to salvage the value before the optimisation is applied.
Differential D76854
[DebugInfo] Ensure that a demanded bits optimisation in InstCombine does not result in an incorrect debuginfo variable value chrisjackson on Mar 26 2020, 8:35 AM. Authored by
Details See Bugzilla: https://bugs.llvm.org/show_bug.cgi?id=44371. A demanded bits optimisation could result in an incorrect debuginfo variable value for a constant operand. This patch attempts to salvage the value before the optimisation is applied.
Diff Detail
Event TimelineComment Actions LGTM but since we're on the same team (now, woot!) I'd like to give others a chance to have a look.
Comment Actions
Just pointing out that there's no such requirement, but it never hurts to have someone look at a patch who brings in a different perspective. I did find a bug in your test :-)
Comment Actions Simplified the CHECK expression to match only the component of the dbg.value call that is significant for this test. |
As we discussed offline the fact that this dbg.value later becomes undef is unrelated to the behaviour you're checking for (a correct salvage operation) so it'd probably be helpful to either add a comment explaining this, or omit the first dbg.value operand in the CHECK line.