[Bug optimization/12525] [tree-ssa] wrong code when using asm with +.

dnovillo at redhat dot com gcc-bugzilla@gcc.gnu.org
Mon Oct 6 19:27:00 GMT 2003


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12525



------- Additional Comments From dnovillo at redhat dot com  2003-10-06 19:27 -------
Subject: Re:  [tree-ssa] wrong code when using asm
	with +.

On Mon, 2003-10-06 at 11:57, amacleod at redhat dot com wrote:

> f ()
> {
>   register int r;
> 
> 
>   # BLOCK 0 (b.c:3).  PRED: -1.  SUCC: -2.
>   r_1 = 1;
>   __asm__("":"+r" r_2:);
> ;
> }

The problem is that r_2 is an ASM_OUTPUTS operands.  The renamer does
not consider it a read-then-write operand, it considers it a write
operand.  So, it happily creates a new SSA name for 'r'.

The front end should stop lying to the SSA renamer and put 'r' both in
ASM_INPUTS and ASM_OUTPUTS.


Diego.



More information about the Gcc-bugs mailing list