Subregister ranges need to be updated even when the instruction being moved does not explicitly use/define the particular subregister (due to the fact that a def of a subregister is treated as a use of all the other lanes for the purposes of liveness tracking). Make sure that the update is done correctly.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
This should have a test in unittests/MI/LiveIntervalTest.cpp. Hopefully you can remodel the situation from the example that way.
(And just to warn you: I am in vacation for the next two weeks and will only get back to this after that time).
lib/CodeGen/LiveIntervalAnalysis.cpp | ||
---|---|---|
1049–1050 | Why does the liverange for sub2 end at 1008B in this example? This is about the subregister liverange not about the main liverange is it? Then nothing seems to be reading the value at 1008 so I don't see why the liverange ends there. |
lib/CodeGen/LiveIntervalAnalysis.cpp | ||
---|---|---|
1049–1050 | The def of sub1 reads sub2. |
Hi Krzysztof,
I am not seeing a unitest in unittests/MI/LiveIntervalTest.cpp like Matthias suggested.
Also, could you use "opt -instnamer" on the ll test cases.
Other than that, LGTM just one nitpick, see inlined comment.
Cheers,
-Quentin
lib/CodeGen/LiveIntervalAnalysis.cpp | ||
---|---|---|
1004 | Document the extra parameters. |
The problem is somewhere else: live subranges should not be extended to other subregs' defs.
lib/CodeGen/LiveIntervalAnalysis.cpp | ||
---|---|---|
1049–1050 | Actually, you are right. My comment is incorrect. |
Document the extra parameters.