Check that emitted instructions meet their predicates on all targets except ARM…

Description

Check that emitted instructions meet their predicates on all targets except ARM, Mips, and X86.

Summary:

  • ARM is omitted from this patch because this check appears to expose bugs in this target.
  • Mips is omitted from this patch because this check either detects bugs or deliberate emission of instructions that don't satisfy their predicates. One deliberate use is the SYNC instruction where the version with an operand is correctly defined as requiring MIPS32 while the version without an operand is defined as an alias of 'SYNC 0' and requires MIPS2.
  • X86 is omitted from this patch because it doesn't use the tablegen-erated MCCodeEmitter infrastructure.

Patches for ARM and Mips will follow.

Depends on D25617

Reviewers: tstellarAMD, jmolloy

Subscribers: wdng, jmolloy, aemerson, rengolin, arsenm, jyknight, nemanjai, nhaehnle, tstellarAMD, llvm-commits

Differential Revision: https://reviews.llvm.org/D25618