Open arsenm opened 4 years ago
A related case also hits this asserT:
error: inline assembly requires more registers than available llc: /home/matt/src/llvm-project/llvm/include/llvm/MC/MCRegisterInfo.h:677: llvm::MCRegUnitIterator::MCRegUnitIterator(llvm::MCRegister, const llvm::MCRegisterInfo *): Assertion `Reg && "Null register has no regunits"' failed.
Seems partially fixed, still hits this:
*** Bad machine code: Using an undefined physical register ***
- function: too_many_regs
- basic block: %bb.0 (0x80f9eb0) [0B;1040B)
- instruction: 544B SI_SPILL_V256_SAVE killed $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7, %stack.1, $sgpr32, 0, implicit $exec :: (store (s256) into %stack.1, align 4, addrspace 5)
- operand 0: killed $vgpr0_vgpr1_vgpr2_vgpr3_vgpr4_vgpr5_vgpr6_vgpr7
LLVM ERROR: Found 1 machine code errors.
Extended Description
The register allocator currently produces MIR that fails the verifier when it can't handle inline assembly. It produces the user error in the context, and then has to produce something and keep going. The MIR should pass the verifier so the compilation can reach the end successfully. I'm not sure whether it would be better to hack up the code to avoid failing the verifier, or to change the verifier check for the error and disable the liveness checks.
llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -verify-machineinstrs