[PATCH] MachineVerifier

Ulrich Weigand via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 9 03:33:33 PDT 2015


Jonas Paulsson <paulsson at linux.vnet.ibm.com> wrote on 09.10.2015 12:22:26:

> MachineVerifier asserted on SystemZ/xor-01.ll, while analyzing a frame
> index, saying
> *** Bad machine code: Instruction loads from dead spill slot ***
>
> This was a mem-to-mem instruction which was in fact storing to the spill
> slot, so the code was correct.
>
> To help verifier with this, one option might be to analyze the
> memoperands of the MI and see
> if the FI is used for storing or loading. I however simplified this a
> bit, and in this case only checked
> for liveness at the reg-slot index of MI. Memoperands are only checked
> loosely in the verifier, so I hesitated
> on verifying the liveness based on them.
>
> So, with this patch, a mem-to-mem move that loads / stores using a frame
> index gets a check that the spill slot is live.
> For the case where this MI loads from the FI, we don't check that the
> early-clobber index is live, which it should be
> for a simple load.
>
> Can I commit this?

Since this a non-SystemZ back-end change, you should post the patch
to the list ... maybe someone more familar with this piece of common
code will review.

Bye,
Ulrich



More information about the llvm-commits mailing list