[PATCH] D119973: RegAllocGreedy: Fix last chance recolor assert in impossible case

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 18 07:16:14 PDT 2022


qcolombet added a comment.

The complicated cases are indeed not well tested since it is very hard to hit them. I was hoping Matt's fix would avoid falling in one of them, while not preventing actual success. Looks like it wasn't the case.

> So e.g. if one of the evicted vregs get splitted, then the allocator may end up in a corrupted state after the physreg is restored to the splitted vreg. The vreg may then have an empty live range but still have a physreg allocated, and this may later lead to a number of different assertions and crashes.

Is this what is happening here?
Would it be enough to drop the attempted recolored vreg when it has an empty range? (At this point, its live-range should be covered by the new split vregs)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119973/new/

https://reviews.llvm.org/D119973



More information about the llvm-commits mailing list