[MachineVerifier] Improve checks of target instructions operands.
authorJonas Paulsson <paulsson@linux.vnet.ibm.com>
Fri, 1 Nov 2019 09:14:22 +0000 (10:14 +0100)
committerJonas Paulsson <paulsson@linux.vnet.ibm.com>
Tue, 3 Dec 2019 09:20:52 +0000 (10:20 +0100)
commit4fd8f11901b5bfb13a5fef597626dde31835873b
tree4dbcbad9e34c305d0e94dae3f90aff833f400b67
parent9091f06994f09fceb079aa01e0fa3e1ea5c9e9f0
[MachineVerifier]  Improve checks of target instructions operands.

While working with a patch for instruction selection, the splitting of a
large immediate ended up begin treated incorrectly by the backend. Where a
register operand should have been created, it instead became an immediate. To
my surprise the machine verifier failed to report this, which at the time
would have been helpful.

This patch improves the verifier so that it will report this type of error.

This patch XFAILs CodeGen/SPARC/fp128.ll, which has been reported at
https://bugs.llvm.org/show_bug.cgi?id=44091

Review: thegameg, arsenm, fhahn
https://reviews.llvm.org/D63973
llvm/lib/CodeGen/MachineVerifier.cpp
llvm/test/CodeGen/SPARC/fp128.ll
llvm/test/MachineVerifier/verify-regops.mir [new file with mode: 0644]