[PATCH] D34394: [MachineVerifier] Add check that tied physregs aren't different.

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 20 10:08:47 PDT 2017


qcolombet added inline comments.


================
Comment at: lib/CodeGen/MachineVerifier.cpp:993
+        else if (!TargetRegisterInfo::isPhysicalRegister(MOTied.getReg()))
+          report("Tied counterpart must also be physical", &MOTied, TiedTo);
+        else if (MO->getReg() != MOTied.getReg())
----------------
I'm not sure about that one.
Theoretically, you could have a not yet allocated vreg here. As long as the allocation does the right thing with the tie, that isn't an error.


================
Comment at: test/CodeGen/MIR/X86/subregister-index-operands.mir:27
+    %0 = EXTRACT_SUBREG %eax, %subreg.sub_8bit_hi
+    %ax = REG_SEQUENCE %0, %subreg.sub_8bit, %0, %subreg.sub_8bit_hi
     RETQ %ax
----------------
I would expect we add a new test instead of modifying this one.
In particular I don't think this one is going to fail when you modify the isPhysicalRegister check that I mentioned earlier. 


https://reviews.llvm.org/D34394





More information about the llvm-commits mailing list