[LLVMdev] Dead register (was Re: [llvm-commits] [llvm] r145819)

Hal Finkel hfinkel at anl.gov
Mon Dec 5 13:36:50 PST 2011


On Mon, 2011-12-05 at 13:18 -0800, Jakob Stoklund Olesen wrote:
> On Dec 5, 2011, at 12:56 PM, Hal Finkel wrote:
> 
> > RegScavenger is complaining about use of an undefined register, CTR8, in
> > the BCTR8 instruction, in the following instance (this is from the PPC
> > backend):
> > 
> > BB#38: derived from LLVM BB %for.end50
> >    Predecessors according to CFG: BB#36
> >        %X3<def> = LD 0, <fi#27>; mem:LD8[FixedStack27]
> >        %X4<def> = RLDICR %X3<kill>, 3, 60
> >        %X5<def> = LI8 <jt#0>[TF=4]
> >        %X5<def> = ADDIS8 %X5<kill>, <jt#0>[TF=8]
> >        %X4<def> = LDX %X4<kill>, %X5<kill>; mem:LD8[JumpTable]
> >        MTCTR8 %X4<kill>, %CTR8<imp-def,dead>
> >        BCTR8 %CTR8<imp-use,kill>, %RM<imp-use>
> >    Successors according to CFG: BB#23 BB#15 BB#7 BB#8 BB#9 BB#10 BB#11
> > BB#25 BB#12 BB#16 BB#18 BB#13 BB#17
> > 
> > How could CRT8 be marked implicitly-defined and also dead in the same
> > instruction when it is clearly used in the next instruction?
> 
> This is the kind of sloppy liveness, I was talking about ;-)

Yea, I went looking ;)

> 
> llc -verify-machineinstrs should give you better info.

Thanks!

 -Hal

> 
> /jakob
> 

-- 
Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory




More information about the llvm-dev mailing list