public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug inline-asm/15089] New: local register variable with a specified register is bad
@ 2004-04-23  4:30 nico at cam dot org
  2004-04-23  4:56 ` [Bug inline-asm/15089] " nico at cam dot org
                   ` (23 more replies)
  0 siblings, 24 replies; 25+ messages in thread
From: nico at cam dot org @ 2004-04-23  4:30 UTC (permalink / raw)
  To: gcc-bugs

In some cases the specified register for a local variable meant to be
used with inline assembly code is not respected.  This breaks code 
relying on this feature to implement non-standard calling convension.
Provided test case works with all gcc versions tested so far except for all gcc-3.* including current CVS head.

-- 
           Summary: local register variable with a specified register is bad
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: inline-asm
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: nico at cam dot org
                CC: gcc-bugs at gcc dot gnu dot org,rearnsha at arm dot com
GCC target triplet: arm-*-*


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug inline-asm/15089] local register variable with a specified register is bad
  2004-04-23  4:30 [Bug inline-asm/15089] New: local register variable with a specified register is bad nico at cam dot org
  2004-04-23  4:56 ` [Bug inline-asm/15089] " nico at cam dot org
@ 2004-04-23  4:56 ` nico at cam dot org
  2004-04-23  6:28 ` nico at cam dot org
                   ` (21 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: nico at cam dot org @ 2004-04-23  4:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From nico at cam dot org  2004-04-23 04:28 -------
Just to complement the information...
The test case only needs to be modified slightly for gcc to change behavior and generate correct code.
For example, simply removing the loop or assigning a value to l directly will mask the problem.
Also compiling with -O0 produces good code in all cases.

-- 


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug inline-asm/15089] local register variable with a specified register is bad
  2004-04-23  4:30 [Bug inline-asm/15089] New: local register variable with a specified register is bad nico at cam dot org
@ 2004-04-23  4:56 ` nico at cam dot org
  2004-04-23  4:56 ` nico at cam dot org
                   ` (22 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: nico at cam dot org @ 2004-04-23  4:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From nico at cam dot org  2004-04-23 04:10 -------
Created an attachment (id=6147)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6147&action=view)
test case showing the problem

this test case should be compiled with:
gcc -O2 -S test.c
then inspection of the generated test.s file will contain a line like this:
@ __i = r5 (should be r4)


-- 


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug inline-asm/15089] local register variable with a specified register is bad
  2004-04-23  4:30 [Bug inline-asm/15089] New: local register variable with a specified register is bad nico at cam dot org
  2004-04-23  4:56 ` [Bug inline-asm/15089] " nico at cam dot org
  2004-04-23  4:56 ` nico at cam dot org
@ 2004-04-23  6:28 ` nico at cam dot org
  2004-04-28 23:54 ` pb at gcc dot gnu dot org
                   ` (20 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: nico at cam dot org @ 2004-04-23  6:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From nico at cam dot org  2004-04-23 05:34 -------
Here's another data point:
If in the test r4 is changed to r8 which is a totally unused register, the assignment is still done to r5.
But, if r8 is also added to the clobber list for the inline asm, then compilation fails with "error: asm-specifier for variable `__i' conflicts with asm clobber list" even if without this clobber gcc stubbornly refuses to use r8.

-- 


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug inline-asm/15089] local register variable with a specified register is bad
  2004-04-23  4:30 [Bug inline-asm/15089] New: local register variable with a specified register is bad nico at cam dot org
                   ` (2 preceding siblings ...)
  2004-04-23  6:28 ` nico at cam dot org
@ 2004-04-28 23:54 ` pb at gcc dot gnu dot org
  2004-04-29  0:15 ` pb at gcc dot gnu dot org
                   ` (19 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: pb at gcc dot gnu dot org @ 2004-04-28 23:54 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pb at gcc dot gnu dot org  2004-04-28 22:03 -------
Created an attachment (id=6182)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6182&action=view)
patch

It looks like the desired value does start out being loaded into r4, but loop
deletes this assignment in the belief that it's redundant.  Does this patch
help?


-- 


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug inline-asm/15089] local register variable with a specified register is bad
  2004-04-23  4:30 [Bug inline-asm/15089] New: local register variable with a specified register is bad nico at cam dot org
                   ` (3 preceding siblings ...)
  2004-04-28 23:54 ` pb at gcc dot gnu dot org
@ 2004-04-29  0:15 ` pb at gcc dot gnu dot org
  2004-04-29 18:00 ` nico at cam dot org
                   ` (18 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: pb at gcc dot gnu dot org @ 2004-04-29  0:15 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pb at nexus dot co dot uk


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug inline-asm/15089] local register variable with a specified register is bad
  2004-04-23  4:30 [Bug inline-asm/15089] New: local register variable with a specified register is bad nico at cam dot org
                   ` (4 preceding siblings ...)
  2004-04-29  0:15 ` pb at gcc dot gnu dot org
@ 2004-04-29 18:00 ` nico at cam dot org
  2004-04-29 19:23 ` pb at gcc dot gnu dot org
                   ` (17 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: nico at cam dot org @ 2004-04-29 18:00 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From nico at cam dot org  2004-04-29 17:18 -------
Yep, proposed patch fixes the bug.

-- 


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug inline-asm/15089] local register variable with a specified register is bad
  2004-04-23  4:30 [Bug inline-asm/15089] New: local register variable with a specified register is bad nico at cam dot org
                   ` (5 preceding siblings ...)
  2004-04-29 18:00 ` nico at cam dot org
@ 2004-04-29 19:23 ` pb at gcc dot gnu dot org
  2004-05-05 13:48 ` pb at gcc dot gnu dot org
                   ` (16 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: pb at gcc dot gnu dot org @ 2004-04-29 19:23 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |pb at gcc dot gnu dot org
                   |dot org                     |
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|                            |1
      Known to fail|                            |3.3.3
      Known to work|                            |2.95
   Last reconfirmed|0000-00-00 00:00:00         |2004-04-29 18:42:31
               date|                            |


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug inline-asm/15089] local register variable with a specified register is bad
  2004-04-23  4:30 [Bug inline-asm/15089] New: local register variable with a specified register is bad nico at cam dot org
                   ` (6 preceding siblings ...)
  2004-04-29 19:23 ` pb at gcc dot gnu dot org
@ 2004-05-05 13:48 ` pb at gcc dot gnu dot org
  2004-05-07  3:19 ` [Bug optimization/15089] [3.3./4/3.5 Regression] [tree-ssa] " pinskia at gcc dot gnu dot org
                   ` (15 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: pb at gcc dot gnu dot org @ 2004-05-05 13:48 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pb at gcc dot gnu dot org  2004-05-05 13:48 -------
submitted the patch as http://gcc.gnu.org/ml/gcc-patches/2004-04/msg01925.html


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|pb at nexus dot co dot uk   |


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug optimization/15089] [3.3./4/3.5 Regression] [tree-ssa] local register variable with a specified register is bad
  2004-04-23  4:30 [Bug inline-asm/15089] New: local register variable with a specified register is bad nico at cam dot org
                   ` (7 preceding siblings ...)
  2004-05-05 13:48 ` pb at gcc dot gnu dot org
@ 2004-05-07  3:19 ` pinskia at gcc dot gnu dot org
  2004-05-17 10:41 ` [Bug tree-optimization/15089] [3.4/3.5 " gdr at gcc dot gnu dot org
                   ` (14 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-07  3:19 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-07 03:19 -------
Note even after your patch, the tree-ssa will fail still, DOM needs not to propagate stores 
past register variables.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|inline-asm                  |optimization
      Known to fail|3.3.3                       |3.3.3 tree-ssa
            Summary|local register variable with|[3.3./4/3.5 Regression]
                   |a specified register is bad |[tree-ssa] local register
                   |                            |variable with a specified
                   |                            |register is bad
   Target Milestone|---                         |3.3.4


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug tree-optimization/15089] [3.4/3.5 Regression] [tree-ssa] local register variable with a specified register is bad
  2004-04-23  4:30 [Bug inline-asm/15089] New: local register variable with a specified register is bad nico at cam dot org
                   ` (8 preceding siblings ...)
  2004-05-07  3:19 ` [Bug optimization/15089] [3.3./4/3.5 Regression] [tree-ssa] " pinskia at gcc dot gnu dot org
@ 2004-05-17 10:41 ` gdr at gcc dot gnu dot org
  2004-06-12 22:56 ` mmitchel at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: gdr at gcc dot gnu dot org @ 2004-05-17 10:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From gdr at gcc dot gnu dot org  2004-05-16 22:04 -------
This PR while present on gcc-3_3-branch seems to be of concerns only for
gcc-3.4.x and mainline.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[3.3/3.4/3.5 Regression]    |[3.4/3.5 Regression] [tree-
                   |[tree-ssa] local register   |ssa] local register variable
                   |variable with a specified   |with a specified register is
                   |register is bad             |bad
   Target Milestone|3.3.4                       |3.4.1


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug tree-optimization/15089] [3.4/3.5 Regression] [tree-ssa] local register variable with a specified register is bad
  2004-04-23  4:30 [Bug inline-asm/15089] New: local register variable with a specified register is bad nico at cam dot org
                   ` (9 preceding siblings ...)
  2004-05-17 10:41 ` [Bug tree-optimization/15089] [3.4/3.5 " gdr at gcc dot gnu dot org
@ 2004-06-12 22:56 ` mmitchel at gcc dot gnu dot org
  2004-06-23  2:34 ` mmitchel at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-06-12 22:56 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-06-12 22:56 -------
OK for 3.4.1 if approved for mainline.

-- 


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug tree-optimization/15089] [3.4/3.5 Regression] [tree-ssa] local register variable with a specified register is bad
  2004-04-23  4:30 [Bug inline-asm/15089] New: local register variable with a specified register is bad nico at cam dot org
                   ` (10 preceding siblings ...)
  2004-06-12 22:56 ` mmitchel at gcc dot gnu dot org
@ 2004-06-23  2:34 ` mmitchel at gcc dot gnu dot org
  2004-06-23 18:18 ` ian at wasabisystems dot com
                   ` (11 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-06-23  2:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-06-23 02:34 -------
Jeff Law writes:

"This code is using the "Variables in Specified Registers" extension
to GCC for local variables.  I'll quote from the GCC manual:

  Local register variables in specific registers do not reserve the
  registers.  The compiler's data flow analysis is capable of
  determining where the specified registers contain live values,
  and where they are available for other uses.  Stores into local
  register variables may be deleted when they appear to be dead
  according to dataflow analysis.  References to local register
  variables may be deleted or moved or simplified.

When __l is used in the asm, the writer of the bugzilla report expects
to see register "r0".  However, the value happens to be hanging around
in a different register so GCC uses that other register instead of
"r0".  Similarly for uses of __i.   The behavior of the compiler is
precisely what I would expect."

Therefore, closing this as INVALID.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |INVALID


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug tree-optimization/15089] [3.4/3.5 Regression] [tree-ssa] local register variable with a specified register is bad
  2004-04-23  4:30 [Bug inline-asm/15089] New: local register variable with a specified register is bad nico at cam dot org
                   ` (11 preceding siblings ...)
  2004-06-23  2:34 ` mmitchel at gcc dot gnu dot org
@ 2004-06-23 18:18 ` ian at wasabisystems dot com
  2004-06-23 19:50 ` nico at cam dot org
                   ` (10 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: ian at wasabisystems dot com @ 2004-06-23 18:18 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From ian at wasabisystems dot com  2004-06-23 17:49 -------
Subject: Re:  [3.4/3.5 Regression] [tree-ssa] local register variable with a specified register is bad

"mmitchel at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:

> When __l is used in the asm, the writer of the bugzilla report expects
> to see register "r0".  However, the value happens to be hanging around
> in a different register so GCC uses that other register instead of
> "r0".  Similarly for uses of __i.   The behavior of the compiler is
> precisely what I would expect."

But what about this comment from RTH?
    http://gcc.gnu.org/ml/gcc/2004-05/msg00657.html

He is describing what appears to me to be an undocumented feature, but
one which he says is important.

Isn't this test case pretty much the same sort of thing?
    http://gcc.gnu.org/bugzilla/attachment.cgi?id=6147&action=view

Ian


-- 


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug tree-optimization/15089] [3.4/3.5 Regression] [tree-ssa] local register variable with a specified register is bad
  2004-04-23  4:30 [Bug inline-asm/15089] New: local register variable with a specified register is bad nico at cam dot org
                   ` (12 preceding siblings ...)
  2004-06-23 18:18 ` ian at wasabisystems dot com
@ 2004-06-23 19:50 ` nico at cam dot org
  2004-06-23 22:11 ` mark at codesourcery dot com
                   ` (9 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: nico at cam dot org @ 2004-06-23 19:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From nico at cam dot org  2004-06-23 19:15 -------
Subject: Re:  [3.4/3.5 Regression] [tree-ssa]
 local register variable with a specified register is bad

> Therefore, closing this as INVALID.

I beg to disagree here.

Let's analyse the quoted manual:

   Local register variables in specific registers do not reserve the
   registers.  The compiler's data flow analysis is capable of
   determining where the specified registers contain live values,
   and where they are available for other uses.

This is perfectly sensible, although the current behavior doesn't 
correspond to this, ence this bug report.  The inline asm constitute
a precise point of use which is not respected.

   Stores into local register variables may be deleted when they appear
   to be dead according to dataflow analysis.

This is also perfectly fine, but that's not the case here since the
misassigned register is actually defined to be an input operand to
the inline assembly.  It therefore can't be dead.

   References to local register variables may be deleted or moved
   or simplified.

I still don't see how this sentence could mean "any other register can
be used", otherwise this feature would be completely non sense since no
register specification could ever be relied upon which is completely 
useless.  When the manual says "References to local register variables
may be deleted or moved or simplified", that means the "reference" can be
reordered or discarded with regards to other operations which is again 
perfectly fine, but that doesn't mean the compiler may decide to use
another register for the actual reference at all.

> When __l is used in the asm, the writer of the bugzilla report expects
> to see register "r0". 

Indeed!  That's the expected result of the feature.

> However, the value happens to be hanging around
> in a different register so GCC uses that other register instead of
> "r0".  Similarly for uses of __i.   The behavior of the compiler is
> precisely what I would expect."

This is of course the expected behavior when there is _no_ register 
specification for a given variable, which is absolutely not the case
here.  And yet the value happens to be defined by a constant right
before being used as follows:

                l = 100;
                {
                        register unsigned long long __l asm("r0") = l;
                        register unsigned long long __r asm("r2");
                        asm ( "..." _ "=r" (__r) : "r" (__l) );
                        l = __r;
                }

So there is no reason gcc would have used another register than the one
we asked it to, especially since the original l value has no life passed
the assignment to __l.  And incidentally, when the proposed patch for this 
bug is applied then that's exactly what happens.

Now let's suppose we rework the test case a bit so __l becomes an output as
well as an input to the inline asm, and that both l and __l are referenced
after the inline asm.  Then gcc doesn't have the choice to copy the value of
l into a separate register.  Even in this case the selected register doesn't
respect the register specification, even if that specification is changed to
a completely unused register like, say, r8 instead of r0.

And to further justify the proposed patch: all this is dependent on the 
presence of a surrounding loop.  If the loop is removed from the code,
it's then impossible to make the test case fail.

I'm therefore asking for this bug to be reopened and the proposed fix 
applied.  The reasons for marking this bug as invalid, are, IMHO, themselves 
invalid.  This is a documented feature that has always worked perfectly fine 
in the past, and which has existing bodies of code relying on the documented 
behavior for legitimate purposes.

Thank you.


Nicolas



-- 


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug tree-optimization/15089] [3.4/3.5 Regression] [tree-ssa] local register variable with a specified register is bad
  2004-04-23  4:30 [Bug inline-asm/15089] New: local register variable with a specified register is bad nico at cam dot org
                   ` (13 preceding siblings ...)
  2004-06-23 19:50 ` nico at cam dot org
@ 2004-06-23 22:11 ` mark at codesourcery dot com
  2004-06-23 22:52 ` rth at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: mark at codesourcery dot com @ 2004-06-23 22:11 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mark at codesourcery dot com  2004-06-23 22:08 -------
Subject: Re:  [3.4/3.5 Regression] [tree-ssa]
 local register variable with a specified register is bad

Ian Lance Taylor wrote:

> "mmitchel at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> writes:
> 
> 
>>When __l is used in the asm, the writer of the bugzilla report expects
>>to see register "r0".  However, the value happens to be hanging around
>>in a different register so GCC uses that other register instead of
>>"r0".  Similarly for uses of __i.   The behavior of the compiler is
>>precisely what I would expect."
> 
> 
> But what about this comment from RTH?
>     http://gcc.gnu.org/ml/gcc/2004-05/msg00657.html
> 
> He is describing what appears to me to be an undocumented feature, but
> one which he says is important.

I don't know; I don't have enough experience with these kinds of tricks. 
  (When I need to do these kinds of things, I just write assembly code.)

If Richard and Jeff agree to reopen the bug, that's fine with me.



-- 


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug tree-optimization/15089] [3.4/3.5 Regression] [tree-ssa] local register variable with a specified register is bad
  2004-04-23  4:30 [Bug inline-asm/15089] New: local register variable with a specified register is bad nico at cam dot org
                   ` (14 preceding siblings ...)
  2004-06-23 22:11 ` mark at codesourcery dot com
@ 2004-06-23 22:52 ` rth at gcc dot gnu dot org
  2004-06-25 21:48 ` cvs-commit at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: rth at gcc dot gnu dot org @ 2004-06-23 22:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rth at gcc dot gnu dot org  2004-06-23 22:50 -------
Yes, this should work.  Indeed, the patch looks plausible.

We should update the documentation too, if that hasn't been done already.
I thought it had, last time this came up...

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug tree-optimization/15089] [3.4/3.5 Regression] [tree-ssa] local register variable with a specified register is bad
  2004-04-23  4:30 [Bug inline-asm/15089] New: local register variable with a specified register is bad nico at cam dot org
                   ` (15 preceding siblings ...)
  2004-06-23 22:52 ` rth at gcc dot gnu dot org
@ 2004-06-25 21:48 ` cvs-commit at gcc dot gnu dot org
  2004-06-25 21:49 ` cvs-commit at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-06-25 21:48 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-06-25 21:47 -------
Subject: Bug 15089

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	mmitchel@gcc.gnu.org	2004-06-25 21:47:48

Modified files:
	gcc            : ChangeLog loop.c 

Log message:
	2004-06-25  Philip Blundell  <philb@gnu.org>
	
	PR wrong-code/15089
	* loop.c (scan_loop): Do not move user-specified register
	assignments.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.523&r2=2.2326.2.524
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/loop.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.488.2.3&r2=1.488.2.4



-- 


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug tree-optimization/15089] [3.4/3.5 Regression] [tree-ssa] local register variable with a specified register is bad
  2004-04-23  4:30 [Bug inline-asm/15089] New: local register variable with a specified register is bad nico at cam dot org
                   ` (16 preceding siblings ...)
  2004-06-25 21:48 ` cvs-commit at gcc dot gnu dot org
@ 2004-06-25 21:49 ` cvs-commit at gcc dot gnu dot org
  2004-06-25 21:55 ` mmitchel at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-06-25 21:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-06-25 21:48 -------
Subject: Bug 15089

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2004-06-25 21:48:39

Modified files:
	gcc            : ChangeLog loop.c 

Log message:
	PR wrong-code/15089
	* loop.c (scan_loop): Do not move user-specified register
	assignments.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.4154&r2=2.4155
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/loop.c.diff?cvsroot=gcc&r1=1.499&r2=1.500



-- 


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug tree-optimization/15089] [3.4/3.5 Regression] [tree-ssa] local register variable with a specified register is bad
  2004-04-23  4:30 [Bug inline-asm/15089] New: local register variable with a specified register is bad nico at cam dot org
                   ` (17 preceding siblings ...)
  2004-06-25 21:49 ` cvs-commit at gcc dot gnu dot org
@ 2004-06-25 21:55 ` mmitchel at gcc dot gnu dot org
  2004-09-27  8:32 ` [Bug tree-optimization/15089] [3.4/4.0 " bonzini at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-06-25 21:55 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-06-25 21:51 -------
OK, I applied Phil's patch to 3.4.1 and mainline.  

RTH, I've now assigned this to you to write the docs and add a test case. :-p

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|pb at gcc dot gnu dot org   |rth at gcc dot gnu dot org
             Status|REOPENED                    |ASSIGNED
   Target Milestone|3.4.1                       |3.5.0


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug tree-optimization/15089] [3.4/4.0 Regression] [tree-ssa] local register variable with a specified register is bad
  2004-04-23  4:30 [Bug inline-asm/15089] New: local register variable with a specified register is bad nico at cam dot org
                   ` (18 preceding siblings ...)
  2004-06-25 21:55 ` mmitchel at gcc dot gnu dot org
@ 2004-09-27  8:32 ` bonzini at gcc dot gnu dot org
  2004-09-29  2:50 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: bonzini at gcc dot gnu dot org @ 2004-09-27  8:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bonzini at gcc dot gnu dot org  2004-09-27 08:32 -------
> Note even after your patch, the tree-ssa will fail still, DOM needs not to
> propagate stores past register variables.

And CCP as well (strange that PRE does not catch it!)

-- 


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug tree-optimization/15089] [3.4/4.0 Regression] [tree-ssa] local register variable with a specified register is bad
  2004-04-23  4:30 [Bug inline-asm/15089] New: local register variable with a specified register is bad nico at cam dot org
                   ` (19 preceding siblings ...)
  2004-09-27  8:32 ` [Bug tree-optimization/15089] [3.4/4.0 " bonzini at gcc dot gnu dot org
@ 2004-09-29  2:50 ` cvs-commit at gcc dot gnu dot org
  2004-10-28 13:31 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  23 siblings, 0 replies; 25+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-09-29  2:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-09-29 02:50 -------
Subject: Bug 15089

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	rth@gcc.gnu.org	2004-09-29 02:50:47

Modified files:
	gcc            : ChangeLog tree-flow.h tree-ssa-ccp.c 
	                 tree-ssa-copy.c tree-ssa-dom.c 
Added files:
	gcc/testsuite/gcc.dg/tree-ssa: asm-2.c 

Log message:
	PR 15089
	* tree-ssa-copy.c (may_propagate_copy_into_asm): New.
	* tree-flow.h (may_propagate_copy_into_asm): Declare.
	* tree-ssa-ccp.c (replace_uses_in): Use it.
	* tree-ssa-dom.c (cprop_operand): Likewise.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5673&r2=2.5674
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-flow.h.diff?cvsroot=gcc&r1=2.48&r2=2.49
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-ccp.c.diff?cvsroot=gcc&r1=2.45&r2=2.46
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-copy.c.diff?cvsroot=gcc&r1=2.16&r2=2.17
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-dom.c.diff?cvsroot=gcc&r1=2.55&r2=2.56
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/tree-ssa/asm-2.c.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug tree-optimization/15089] [3.4/4.0 Regression] [tree-ssa] local register variable with a specified register is bad
  2004-04-23  4:30 [Bug inline-asm/15089] New: local register variable with a specified register is bad nico at cam dot org
                   ` (20 preceding siblings ...)
  2004-09-29  2:50 ` cvs-commit at gcc dot gnu dot org
@ 2004-10-28 13:31 ` pinskia at gcc dot gnu dot org
  2004-11-27  0:44 ` [Bug tree-optimization/15089] " pinskia at gcc dot gnu dot org
  2005-03-31 21:36 ` rth at gcc dot gnu dot org
  23 siblings, 0 replies; 25+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-28 13:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-28 13:31 -------
The only thing left is documentation.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |documentation


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug tree-optimization/15089] local register variable with a specified register is bad
  2004-04-23  4:30 [Bug inline-asm/15089] New: local register variable with a specified register is bad nico at cam dot org
                   ` (21 preceding siblings ...)
  2004-10-28 13:31 ` pinskia at gcc dot gnu dot org
@ 2004-11-27  0:44 ` pinskia at gcc dot gnu dot org
  2005-03-31 21:36 ` rth at gcc dot gnu dot org
  23 siblings, 0 replies; 25+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-27  0:44 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-27 00:44 -------
Removing the regression markes but not removing the target milestone. Richard you want to add the 
documenation or should someone else do it?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |minor
           Keywords|wrong-code                  |
            Summary|[3.4/4.0 Regression] [tree- |local register variable with
                   |ssa] local register variable|a specified register is bad
                   |with a specified register is|
                   |bad                         |


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

* [Bug tree-optimization/15089] local register variable with a specified register is bad
  2004-04-23  4:30 [Bug inline-asm/15089] New: local register variable with a specified register is bad nico at cam dot org
                   ` (22 preceding siblings ...)
  2004-11-27  0:44 ` [Bug tree-optimization/15089] " pinskia at gcc dot gnu dot org
@ 2005-03-31 21:36 ` rth at gcc dot gnu dot org
  23 siblings, 0 replies; 25+ messages in thread
From: rth at gcc dot gnu dot org @ 2005-03-31 21:36 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rth at gcc dot gnu dot org  2005-03-31 21:36 -------
I've just re-read the Extended Asm section and find that the approprate docs
have been present since revision 1.222 (hp 29-Sep-04).

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2005-03-31 21:36 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-04-23  4:30 [Bug inline-asm/15089] New: local register variable with a specified register is bad nico at cam dot org
2004-04-23  4:56 ` [Bug inline-asm/15089] " nico at cam dot org
2004-04-23  4:56 ` nico at cam dot org
2004-04-23  6:28 ` nico at cam dot org
2004-04-28 23:54 ` pb at gcc dot gnu dot org
2004-04-29  0:15 ` pb at gcc dot gnu dot org
2004-04-29 18:00 ` nico at cam dot org
2004-04-29 19:23 ` pb at gcc dot gnu dot org
2004-05-05 13:48 ` pb at gcc dot gnu dot org
2004-05-07  3:19 ` [Bug optimization/15089] [3.3./4/3.5 Regression] [tree-ssa] " pinskia at gcc dot gnu dot org
2004-05-17 10:41 ` [Bug tree-optimization/15089] [3.4/3.5 " gdr at gcc dot gnu dot org
2004-06-12 22:56 ` mmitchel at gcc dot gnu dot org
2004-06-23  2:34 ` mmitchel at gcc dot gnu dot org
2004-06-23 18:18 ` ian at wasabisystems dot com
2004-06-23 19:50 ` nico at cam dot org
2004-06-23 22:11 ` mark at codesourcery dot com
2004-06-23 22:52 ` rth at gcc dot gnu dot org
2004-06-25 21:48 ` cvs-commit at gcc dot gnu dot org
2004-06-25 21:49 ` cvs-commit at gcc dot gnu dot org
2004-06-25 21:55 ` mmitchel at gcc dot gnu dot org
2004-09-27  8:32 ` [Bug tree-optimization/15089] [3.4/4.0 " bonzini at gcc dot gnu dot org
2004-09-29  2:50 ` cvs-commit at gcc dot gnu dot org
2004-10-28 13:31 ` pinskia at gcc dot gnu dot org
2004-11-27  0:44 ` [Bug tree-optimization/15089] " pinskia at gcc dot gnu dot org
2005-03-31 21:36 ` rth at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).