Greedy regalloc

Hi,

I get strange code when using regalloc=greedy.

A value spill is redundant and cleared, as another spill of same value is inserted. The former spill is however not NOP:ed, but KILL:ed, thus the operands get a kill status. The code becomes:

%vreg301 = mv32Imm 200000000, pred:0, pred:%noreg, %CCReg<imp-def,dead>, %ac0, %ac1; aN32_0_7:%vreg301
Store32FI %vreg301, <fi#93>, pred:0, pred:%noreg, %CCReg; mem:ST4[FixedStack93] aN32_0_7:%vreg301
KILL %vreg301, <fi#93>, 0, %noreg, %CCReg; mem:ST4[FixedStack93] aN32_0_7:%vreg301
%a0_32 = COPY %vreg301; aN32_0_7:%vreg301

This results in abort:

“Assertion `MI->allDefsAreDead() && “Def isn’t really dead”’ failed.”

What is the purpose of having the KILL opcode there, and do you know what might be the cause for this error?

Are all the register allocators currently of high standard, or are one or more less mature, meaning things might break?

/Jonas

Hi Jonas,
This is an unexpected failure. I suggest filing a bug report at http://llvm.org/bugs. When Clang crashed it should have provided a stack trace, preprocessed source, and a script to reproduce the error. Please include these items in the bug report.

Chad