[PATCH] D27174: [LiveRangeEdit] Handle instructions with no defs correctly.

Geoff Berry via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 28 12:23:46 PST 2016


gberry added a comment.

I ran into this issue when making some other changes, and I'm not sure how to test it in isolation.  There are a handful of lit tests that hit this case.  For example, if the test added above were instead made an assert(isDef()) inside the body of the if, it would fire.  But I don't think there is a case that triggers any testable change in output because of the other conditions checked along with isOrigDef.

For some context, the change I was working on that led to this was adding support for re-materializing COPY XZR on AArch64.  When this is done, eliminateDeadDef can be called on a KILL XZR instruction, which leads to an assert in VRM->getOriginal(Dest) on line 277 since XZR isn't a vreg.

I could combine this fix with my change to enable COPY XZR re-materialization if that makes more sense.


https://reviews.llvm.org/D27174





More information about the llvm-commits mailing list