Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
hm. This breaks: llvm/test/CodeGen/X86/domain-reassignment.mir
%9:gr32 = INSERT_SUBREG %8:gr32(tied-def 0), %17:gr16, %subreg.sub_8bit_hi_phony
This seems to break tests: http://45.33.8.238/linux/51314/step_12.txt
Please take a look.
One of the two issues in the tests was easily fixable:
https://reviews.llvm.org/D106168
The other issue appears to be much trickier, as it stems from the ARM backend treating MPR regs as if they were ssub subregs. This causes a contradiction in sizes, since ssub's are 32 bits whereas MPR regs are fp16's.
llvm/lib/CodeGen/MachineVerifier.cpp | ||
---|---|---|
1787 | Don't you need to take operand 2's subreg into account here? I'm seeing failures for cases where MI->getOperand(2).getReg() is indeed too big, but MI->getOperand(2).getSubReg() is specifying a subreg of a small enough size so there is no problem. |
llvm/lib/CodeGen/MachineVerifier.cpp | ||
---|---|---|
1787 | This seems to work better for me: unsigned InsertedSize; if (unsigned SubIdx = MI->getOperand(2).getSubReg()) InsertedSize = TRI->getSubRegIdxSize(SubIdx); else InsertedSize = TRI->getRegSizeInBits(MI->getOperand(2).getReg(), *MRI); |
llvm/lib/CodeGen/MachineVerifier.cpp | ||
---|---|---|
1787 | Good call, thanks! |
This is already TRI tin the verifier class