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
Diff Detail
- Build Status
Buildable 20369 Build 20369: arc lint + arc unit
Event Timeline
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.
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 | ||
---|---|---|
2 | Can't you run LSR directly using opt? | |
40 | Would be nice to clean up these names. Maybe use opt -metarenamer? |
TIL -metarenamer.
llvm/test/CodeGen/X86/lsr-crash-empty-uses.ll | ||
---|---|---|
2 | It's weird. When I switch to opt it doesn't crash. |
llvm/test/CodeGen/X86/lsr-crash-empty-uses.ll | ||
---|---|---|
2 | LSR has lots of target-specific logic, so maybe it makes sense to use llc in this case. |
Can't you run LSR directly using opt?