public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/21223] Output register variable is reloaded into the wrong register for asm
       [not found] <bug-21223-4@http.gcc.gnu.org/bugzilla/>
@ 2021-08-08 21:25 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-08 21:25 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=21223

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=87600,
                   |                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=86939,
                   |                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=87899
      Known to fail|                            |4.9.0, 8.1.0
   Target Milestone|---                         |9.0
             Status|NEW                         |RESOLVED
      Known to work|                            |9.1.0

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
So this is fully fixed in GCC 9+. LRA fixes the problems that reload had.  (LRA
had a similar bug but had been fixes see the linked bug reports).

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

* [Bug middle-end/21223] Output register variable is reloaded into the wrong register for asm
  2005-04-25 20:49 [Bug rtl-optimization/21223] New: " drow at gcc dot gnu dot org
  2005-04-25 21:10 ` [Bug middle-end/21223] " pinskia at gcc dot gnu dot org
@ 2005-04-25 21:13 ` drow at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: drow at gcc dot gnu dot org @ 2005-04-25 21:13 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From drow at gcc dot gnu dot org  2005-04-25 21:12 -------
The problem is in reg_is_set or its caller.

Because the output is an earlyclobber operand, it needs to be marked as born
before the insn, to conflict with its inputs.  I do not see an obvious way to
get from note_stores to the recog alternative.

I reproduced this bug in 3.4.3 (csl-arm-branch) also.

-- 


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


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

* [Bug middle-end/21223] Output register variable is reloaded into the wrong register for asm
  2005-04-25 20:49 [Bug rtl-optimization/21223] New: " drow at gcc dot gnu dot org
@ 2005-04-25 21:10 ` pinskia at gcc dot gnu dot org
  2005-04-25 21:13 ` drow at gcc dot gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-25 21:10 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-04-25 21:09 -------
And here is an x86 testcase:
int bar(int *mem)
{
  return ({ register int a_oldval asm ("eax");
            register int a_tmp asm ("ebx");
            int a_oldval2 = 3;
            __asm__ __volatile__ ("# Should be eax - %0\n\t"
                                  "# Should be ebx - %1\n\t"
                                  "# unknown - %2"
                                  : "=&r" (a_oldval), "=&r" (a_tmp)
                                  : "r" (a_oldval2));
            a_tmp; });
}

Which shows this fails at -O2 and above too.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|rtl-optimization            |middle-end
 GCC target triplet|arm-none-linux-gnueabi,     |
                   |powerpc-darwin              |
      Known to fail|3.3.3 4.1.0                 |3.3.3 4.1.0 2.95.3


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


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

end of thread, other threads:[~2021-08-08 21:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-21223-4@http.gcc.gnu.org/bugzilla/>
2021-08-08 21:25 ` [Bug middle-end/21223] Output register variable is reloaded into the wrong register for asm pinskia at gcc dot gnu.org
2005-04-25 20:49 [Bug rtl-optimization/21223] New: " drow at gcc dot gnu dot org
2005-04-25 21:10 ` [Bug middle-end/21223] " pinskia at gcc dot gnu dot org
2005-04-25 21:13 ` drow 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).