[llvm-commits] [llvm] r122581 - /llvm/trunk/lib/CodeGen/MachineVerifier.cpp
Jakob Stoklund Olesen
stoklund at 2pi.dk
Tue Dec 28 12:51:54 PST 2010
On Dec 27, 2010, at 5:43 PM, Cameron Zwarich wrote:
> On Dec 27, 2010, at 4:11 PM, Jakob Stoklund Olesen wrote:
>
>>
>> On Dec 27, 2010, at 1:56 PM, Cameron Zwarich wrote:
>>
>>> On Dec 27, 2010, at 1:30 PM, Jakob Stoklund Olesen wrote:
>>>
>>>>> + if (VNI->isPHIDef() && VNI->def == LiveInts->getMBBStartIdx(MFI)) {
>>>>
>>>> One thing is still missing: In this case, it is also legal for the live interval not to be live out of the predecessor. That can happen if a PHI operand was <undef>.
>>>
>>> What's an easy test-case for this? I don't think I saw it trigger on any of the existing tests.
>>
>> It usually shows up when you are using bugpoint. It tends to insert lots of undefs.
>
> There's one in CodeGen/X86/2008-05-21-CoalescerBug.ll, but it never triggers the false error. After phi elimination (either normal or strong), there is no live range or VN for the undef value, so the error is never emitted.
You get this code after coalescing:
********** INTERVALS **********
%reg16393,0.000000e+00 = [76d,96L:0)[96L,188d:1) 0 at 76d-phikill 1 at 96L-phidef
%reg16385,0.000000e+00 = [48L,76d:0)[100d,152L:0) 0 at 100d
%reg16392,0.000000e+00 = [12d,48L:0)[60d,96L:2)[96L,100d:1) 0 at 12d-phikill 1 at 96L-phidef 2 at 60d-phikill
%reg16394,0.000000e+00 = [4d,48L:0)[52d,96L:2)[96L,156d:1) 0 at 4d-phikill 1 at 96L-phidef 2 at 52d-phikill
********** MACHINEINSTRS **********
# Machine code for function tree_redirect_edge_and_branch:
Frame Objects:
fi#-2: size=4, align=4, fixed, at location [SP+8]
fi#-1: size=4, align=16, fixed, at location [SP+4]
0L BB#0: derived from LLVM BB %entry
4L %reg16394<def> = MOV8ri 1; GR8:%reg16394
12L %reg16392<def> = MOV32r0 %EFLAGS<imp-def,dead>; GR32:%reg16392
36L JMP_4 <BB#2>
Successors according to CFG: BB#2
48L BB#1: derived from LLVM BB %bb483
Predecessors according to CFG: BB#2
52L %reg16394<def> = MOV8r0 %EFLAGS<imp-def,dead>; GR8:%reg16394
60L %reg16392<def> = MOV32rm %reg0, 1, %reg0, 0, %reg0; mem:LD4[null] GR32:%reg16392
76L %reg16393<def> = COPY %reg16385<kill>; GR32:%reg16393,16385
Successors according to CFG: BB#2
96L BB#2: derived from LLVM BB %bb497
Predecessors according to CFG: BB#0 BB#1
100L %reg16385<def> = COPY %reg16392<kill>; GR32:%reg16385,16392
124L TEST8ri %reg16394, 1, %EFLAGS<imp-def>; GR8:%reg16394
132L JNE_4 <BB#1>, %EFLAGS<imp-use,kill>
140L JMP_4 <BB#3>
Successors according to CFG: BB#1 BB#3
Note the live range for %reg16393: Valno 0 is live out of BB#1, but there is no value live out of BB#0.
I don't know why the verifier fails to falsely report this.
/jakob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1929 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20101228/b74627e7/attachment.bin>
More information about the llvm-commits
mailing list