Another problem with "Recommit r265547, and r265610, r265639, r265657"

Wei Mi via llvm-commits llvm-commits at
Tue May 10 10:55:58 PDT 2016

>> I plan to push but change the
>> triviallyRematerializable condition to an assertion, i.e., I expect no
>> instruction entering DeadRemat will be non-triviallyRematerializable.
>> For the tied-operand case, could you send me a debug trace like you
>> sent last time, I can look at how a non-triviallyRematerializable inst
>> makes its way to DeadRemat.
> For sure!
> I attached a run when it crashed with -debug -print-before-all
> -print-after-all. I also added a few printouts of my own. Note that this is
> run with -O3, not -O0 which I used to see the other problem.
> Hope you can make something out of it.
> Thanks,
> Mikael
>> Thanks,
>> Wei.

Mikael, thanks for getting the dump. The problem is that in Phoenix
Post Coalescer, the following instruction becomes dead and it is
marked as dead, but it is never deleted until regsplit in regalloc
finds it dead and calls eliminateDeadDef for it.

%vreg51<def,dead,tied1> = addh_nimm5_a32_aNhDst_formatDstN32
%vreg51<tied0>, 4, pred:0, pred:%noreg, pred:0, %CCReg<imp-def,dead>,
%cuc<imp-use>; aNh_0_7:%vreg51

Maybe regalloc should allow IR containing dead instruction as its
input, since itself leaves some dead instructions in the IR for the
sake of better rematerialization.  Quentin, what do you think? If that
is the case, the patch D19486 maybe needed.


More information about the llvm-commits mailing list