[PATCH] D37775: Add a verifier test to check the access on both sides of COPY are the same

Alexander Ivchenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 19 02:26:28 PST 2018


aivchenk added a comment.

5



================
Comment at: lib/CodeGen/MachineVerifier.cpp:977
+    const MachineOperand &DstOp = MI->getOperand(0);
+    const MachineOperand &SrcOp = MI->getOperand(1);
+    LLT DstTy = MRI->getType(DstOp.getReg());
----------------
Here we rely on having operands in MI, while previously in MachineVerifier::visitMachineInstrBefore we could discover that there are not enough operands given.  Should we guard that with foundErrors?

test/CodeGen/MIR/X86/machine-verifier.mir
fails due to that reason


https://reviews.llvm.org/D37775





More information about the llvm-commits mailing list