By looking at the callers of getUse(), we can see that even though
IVUsers may offer uses, but they may not be interesting to
LSR. It's possible that none of them is interesting.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
I added the crasher. I haven't take a close look at the IR, but it's sufficient to reproduce the crash. Let me know if you think it's helpful to fully study the test and justify the cause.
Comment Actions
I'd debug this a bit further, perhaps with some logging statements to figure out what happened (what use did we discard as non-interesting and why?). But if that looks like too much work then this change as-is is fine too.
llvm/test/CodeGen/X86/lsr-crash-empty-uses.ll | ||
---|---|---|
1 ↗ | (On Diff #154710) | Can't you run LSR directly using opt? |
39 ↗ | (On Diff #154710) | Would be nice to clean up these names. Maybe use opt -metarenamer? |
Comment Actions
TIL -metarenamer.
llvm/test/CodeGen/X86/lsr-crash-empty-uses.ll | ||
---|---|---|
1 ↗ | (On Diff #154710) | It's weird. When I switch to opt it doesn't crash. |
llvm/test/CodeGen/X86/lsr-crash-empty-uses.ll | ||
---|---|---|
1 ↗ | (On Diff #154710) | LSR has lots of target-specific logic, so maybe it makes sense to use llc in this case. |