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
Assertion `!empty() && "empty range"' failed. #45499
Comments
The problematic interval is %4. After coalescing %4 has been promoted from a gpr32 to a gpr128 while merged with the various copy. Yet only the low 32-bit lane is used and the other lanes are empty: The code looks like this after coalescing: I would have expected %4 to define dead refs on 80B instead of keeping the lanes empty. So probably an issue with how we create the subranges when we do rematerialization here. For the record the reason why the option |
I concur the code that updates the subranges when the definition has a subreg, only cleans up unused and not defined empty lanes but doesn't assign the proper dead def to the one that are unused but defined. Attaching a tentative patch. |
With the attached patch, %4 looks much more reasonable after coalescing: |
Fixed in |
Extended Description
llc -mtriple=s390x-linux-gnu -mcpu=z13 -O3 -pre-RA-sched=list-ilp -systemz-subreg-liveness -stress-sched -terminal-rule tc_notempty_emptyrange.ll -o -
llc: /home/ijonpan/llvm-project/llvm/lib/CodeGen/LiveInterval.cpp:447: bool llvm::LiveRange::overlaps(const llvm::LiveRange&, const llvm::CoalescerPair&, const llvm::SlotIndexes&) const: Assertion `!empty() && "empty range"' failed.
...
#11 0x000002aa15de122e (anonymous namespace)::RAGreedy::tryAssign
The text was updated successfully, but these errors were encountered: