[llvm] [LiveRange] Verify Other LiveRange in Join API (PR #66809)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 19 13:15:19 PDT 2023
annamthomas wrote:
Just for context, this came up because we saw a crash in LiveRange::join() which cannot be reproduced and we do not have debugInfo on the core.
When cross-referencing the asm of the function to the source code, we see the crash is in this code, with S.valno being null:
```
// Rewrite Other values before changing the VNInfo ids.
// This can leave Other in an invalid state because we're not coalescing
// touching segments that now have identical values. That's OK since Other is
// not supposed to be valid after calling join();
for (Segment &S : Other.segments)
S.valno = NewVNInfo[RHSValNoAssignments[S.valno->id]];
```
With Verify() run on`Other` LiveRange, this will be caught.
https://github.com/llvm/llvm-project/pull/66809
More information about the llvm-commits
mailing list