[llvm-commits] [llvm] r78421 - /llvm/trunk/lib/CodeGen/RegisterScavenging.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Sat Aug 8 01:07:39 PDT 2009


On 08/08/2009, at 00.39, Evan Cheng wrote:
>
> -    // Allow free CSRs to be processed as uses.
> -    assert((isUsed(Reg) || !CalleeSavedRegs[Reg]) &&
> -           "Using an undefined register!");
> +    assert(isUsed(Reg) && "Using an undefined register!");

After this assert got its teeth back, PR4686's regscav2.ll is failing  
again. There were two separate issues, and the toothless assert masked  
one of them.

The problem is this sequence:

	BL <ga:bar>, %S0<imp-def>, ..., %D0<imp-def,dead>, ...
	...
	%D0<def> = FCVTDS %S0<kill>, 14, %reg0

The %D0<imp-def,dead> operand also leaves the sub-register %S0 dead. I  
think this is a bug in the scavenger. The BL instruction should leave  
%D0 and %S1 dead, but %S0 live. In particular, the semantics should  
not be dependent on the order of operands like it is now.

I will fix it.




More information about the llvm-commits mailing list