New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LICM behaving differently with and without debug information present #55915
Comments
Looking at -print-before-all -print-after-all -print-module-scope printouts, we starts seeing differences with/without the dbg-declare when LICM run:
|
@llvm/issue-subscribers-debuginfo |
cc @djtodoro it would be great if you could take a look |
I am not sure how much is it related with this patch (this may just have revealed a hidden problem), and how much is it related with the debugging information. Let me think/debug out loud. I've taken a look, and what is different in these 2 cases is following. When entering the
The loop
with debug-info:
Even though the function is the same for both:
The reason the order of the |
Adding --enable-new-pm=0 to the |
The weird thing is that, in the debug info case, it somehow changes the loop form (but the LLVM IR Function is the same) outside the LICM Pass itself (may be in the |
Hmm, is there a material difference or is the order of the blocks just different here? The order of the blocks may not necessarily be deterministic and is basically meaningless, as long as the identified blocks (header, latch , exiting) are the same. It might be possible that we hit a limit in some utility due to the extra dbg instructions. |
The identified blocks are different.
May be something like that... I suspect that something around the |
@fhahn this bug has been fixed recently. After we started checking if the |
llvm commit: 19647e5
Reproduce with:
opt -opaque-pointers=0 -passes="default<O2>" bbi-70612_typed.ll -S -o -
Result:
If we comment out the call to llvm.dbg.declare we instead get these corresponding loads:
Note that we load in a different order.
This starts happening with commit 2cdc6f2
bbi-70612_typed.ll.gz
The text was updated successfully, but these errors were encountered: