MrEven132

Results comments of MrEven132

I tried building the testcase with both `clang -g -O1 -Xclang -disable-llvm-passes` and`clang -g -O0 -Xclang -disable-O0-optnone -gkey-instructions`. In both cases, the IR for the example function and the debugger-observed...

With GDB, the optimized binary still shows a different value for `tmp`. Without `-gkey-instructions`: ``` src.out: break case.c:6 print tmp $1 = 0 tgt.out: break case.c:6 print tmp $1 =...

As a follow-up to this issue, I observed another debugging symptom in the same reproducer. Starting at the entry of `example` in `tgt.out` after `reassociate` and using source-level `next` gives...

Thanks for the explanation. That makes sense to me. I agree that the original `dbg_declare` behavior is likely a known limitation/design issue when optimizations leave the declared storage with stale...

@Bagodiya , just checking in — are you still working on this? I'm happy to let you continue, but if you've moved on, I'd be glad to take it over.

Thanks for looking into this. I believe your Godbolt example exercises a different case from the one reported here. In your example, the entire result of the `xor` instruction is...

Adding a call to `salvageDebugInfo` can recover debug information that directly references the instruction being deleted, but it cannot guarantee that the incorrect replacement will not propagate to other debug...

@daniel-petrovic Sorry, already updated. This is the same one [Godbolt link](https://godbolt.org/z/q3z1G87bq).