[llvm-commits] [PATCH] Fix Bug 4657: register scavenger asserts with subreg lowering

Jakob Stoklund Olesen stoklund at 2pi.dk
Sun Aug 2 10:26:53 PDT 2009


On 02/08/2009, at 15.01, Jakob Stoklund Olesen wrote:

> %Q1<def> = INSERT_SUBREG %Q1<undef>, %D1<kill>, 5
> %Q1<def> = INSERT_SUBREG %Q1, %D0<kill>, 6
> ...
> subreg: CONVERTING: %Q1<def> = INSERT_SUBREG %Q1<undef>, %D1<kill>, 5
> subreg: %D2<def> = FCPYD %D1, 14, %reg0
>
> The original INSERT_SUBREG instruction defines %Q1, the replacement  
> FCPYD does not. The <undef> flag means that %Q1 may not be live, and  
> the register scavenger asserts later when %Q1 is used.

Something similar happens in the coalescer when the <undef> register  
is virtual. After INSERT_SUBREG <undef>, ... is coalesced, the super- 
register in no longer defined.





More information about the llvm-commits mailing list