public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/103820] New: [12 Regression] i686 failed to bootstrap with ada by r12-6077
@ 2021-12-23 19:58 hjl.tools at gmail dot com
  2021-12-23 20:00 ` [Bug bootstrap/103820] " hjl.tools at gmail dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2021-12-23 19:58 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103820
           Summary: [12 Regression] i686 failed to bootstrap with ada by
                    r12-6077
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hjl.tools at gmail dot com
                CC: roger at nextmovesoftware dot com, ubizjak at gmail dot com
  Target Milestone: ---
            Target: i686

On Linux/i686, r12-6077 caused:

make[5]: ***
[/export/gnu/import/git/sources/gcc/gcc/ada/gcc-interface/Make-lang.in:167:
ada/exp_cg.o] Error 1
+===========================GNAT BUG DETECTED==============================+
| 12.0.0 20211223 (experimental) (i686-linux) Storage_Error stack overflow or
erroneous memory access|
| Error detected at system.ads:106:30                                      |
| Compiling /export/gnu/import/git/sources/gcc/gcc/ada/exp_ch11.adb        |
| Please submit a bug report; see https://gcc.gnu.org/bugs/ .              |
| Use a subject line meaningful to you and us to track the bug.            |
| Include the entire contents of this bug box in the report.               |
| Include the exact command that you entered.                              |
| Also include sources listed below.                                       |
+==========================================================================+

Please include these source files with error report
Note that list may not be accurate in some cases,
so please double check that the problem can still
be reproduced with the set of files listed.
Consider also -gnatd.n switch (see debug.adb).

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

* [Bug bootstrap/103820] [12 Regression] i686 failed to bootstrap with ada by r12-6077
  2021-12-23 19:58 [Bug bootstrap/103820] New: [12 Regression] i686 failed to bootstrap with ada by r12-6077 hjl.tools at gmail dot com
@ 2021-12-23 20:00 ` hjl.tools at gmail dot com
  2021-12-23 20:06 ` pinskia at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2021-12-23 20:00 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-12-23

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
This patch:

diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 284b9507466..4eb217a93ee 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -8588,7 +8588,8 @@ (define_peephole2
                   (any_mul_highpart:SWI48 (match_dup 2) (match_dup 0)))
              (clobber (match_dup 2))
              (clobber (reg:CC FLAGS_REG))])]
-  "REGNO (operands[0]) != REGNO (operands[2])
+  "TARGET_64BIT
+   && REGNO (operands[0]) != REGNO (operands[2])
    && REGNO (operands[0]) != REGNO (operands[3])
    && (REGNO (operands[0]) == REGNO (operands[4])
        || peep2_reg_dead_p (3, operands[0]))"
@@ -8608,7 +8609,8 @@ (define_peephole2
                     (any_mul_highpart:SI (match_dup 2) (match_dup 0))))
              (clobber (match_dup 2))
              (clobber (reg:CC FLAGS_REG))])]
-  "REGNO (operands[0]) != REGNO (operands[2])
+  "TARGET_64BIT
+   && REGNO (operands[0]) != REGNO (operands[2])
    && REGNO (operands[0]) != REGNO (operands[3])
    && (REGNO (operands[0]) == REGNO (operands[4])
        || peep2_reg_dead_p (3, operands[0]))"

made bootstrap to pass the failed point.

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

* [Bug bootstrap/103820] [12 Regression] i686 failed to bootstrap with ada by r12-6077
  2021-12-23 19:58 [Bug bootstrap/103820] New: [12 Regression] i686 failed to bootstrap with ada by r12-6077 hjl.tools at gmail dot com
  2021-12-23 20:00 ` [Bug bootstrap/103820] " hjl.tools at gmail dot com
@ 2021-12-23 20:06 ` pinskia at gcc dot gnu.org
  2021-12-23 20:42 ` roger at nextmovesoftware dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-23 20:06 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|NEW                         |RESOLVED

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 103785.

*** This bug has been marked as a duplicate of bug 103785 ***

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

* [Bug bootstrap/103820] [12 Regression] i686 failed to bootstrap with ada by r12-6077
  2021-12-23 19:58 [Bug bootstrap/103820] New: [12 Regression] i686 failed to bootstrap with ada by r12-6077 hjl.tools at gmail dot com
  2021-12-23 20:00 ` [Bug bootstrap/103820] " hjl.tools at gmail dot com
  2021-12-23 20:06 ` pinskia at gcc dot gnu.org
@ 2021-12-23 20:42 ` roger at nextmovesoftware dot com
  2021-12-23 20:49 ` hjl.tools at gmail dot com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: roger at nextmovesoftware dot com @ 2021-12-23 20:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Roger Sayle <roger at nextmovesoftware dot com> ---
Thanks for investigating this HJ (I'm having difficulty configuring my system
to reproduce this).  Is the TARGET_64BIT guard needed by both peephole2s, or is
one sufficient to restore bootstrap?  Your fix/workaround (disabling the
optimization on -m32) looks good, but I still can't figure out what about this
transformation is unsafe, and therefore perhaps latent on -m64.  Sorry again
for the inconvenience.

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

* [Bug bootstrap/103820] [12 Regression] i686 failed to bootstrap with ada by r12-6077
  2021-12-23 19:58 [Bug bootstrap/103820] New: [12 Regression] i686 failed to bootstrap with ada by r12-6077 hjl.tools at gmail dot com
                   ` (2 preceding siblings ...)
  2021-12-23 20:42 ` roger at nextmovesoftware dot com
@ 2021-12-23 20:49 ` hjl.tools at gmail dot com
  2021-12-23 21:25 ` hjl.tools at gmail dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2021-12-23 20:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Roger Sayle from comment #3)
> Thanks for investigating this HJ (I'm having difficulty configuring my

You can bootstrap 32bit GCC on Linux/x86-64 if 32-bit libraries are
available.

> system to reproduce this).  Is the TARGET_64BIT guard needed by both
> peephole2s, or is one sufficient to restore bootstrap?  Your fix/workaround

I will double check.

> (disabling the optimization on -m32) looks good, but I still can't figure
> out what about this transformation is unsafe, and therefore perhaps latent
> on -m64.  Sorry again for the inconvenience.

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

* [Bug bootstrap/103820] [12 Regression] i686 failed to bootstrap with ada by r12-6077
  2021-12-23 19:58 [Bug bootstrap/103820] New: [12 Regression] i686 failed to bootstrap with ada by r12-6077 hjl.tools at gmail dot com
                   ` (3 preceding siblings ...)
  2021-12-23 20:49 ` hjl.tools at gmail dot com
@ 2021-12-23 21:25 ` hjl.tools at gmail dot com
  2022-01-11  8:24 ` cvs-commit at gcc dot gnu.org
  2022-01-11  8:36 ` luoxhu at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: hjl.tools at gmail dot com @ 2021-12-23 21:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> ---
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 284b9507466..9d6786c5c2e 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -8588,7 +8588,8 @@ (define_peephole2
         (any_mul_highpart:SWI48 (match_dup 2) (match_dup 0)))
         (clobber (match_dup 2))
         (clobber (reg:CC FLAGS_REG))])]
-  "REGNO (operands[0]) != REGNO (operands[2])
+  "TARGET_64BIT
+   && REGNO (operands[0]) != REGNO (operands[2])
    && REGNO (operands[0]) != REGNO (operands[3])
    && (REGNO (operands[0]) == REGNO (operands[4])
        || peep2_reg_dead_p (3, operands[0]))"

is sufficient to restore bootstrap.

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

* [Bug bootstrap/103820] [12 Regression] i686 failed to bootstrap with ada by r12-6077
  2021-12-23 19:58 [Bug bootstrap/103820] New: [12 Regression] i686 failed to bootstrap with ada by r12-6077 hjl.tools at gmail dot com
                   ` (4 preceding siblings ...)
  2021-12-23 21:25 ` hjl.tools at gmail dot com
@ 2022-01-11  8:24 ` cvs-commit at gcc dot gnu.org
  2022-01-11  8:36 ` luoxhu at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-11  8:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Xiong Hu Luo <luoxhu@gcc.gnu.org>:

https://gcc.gnu.org/g:0552605b7b27dc6beed62e71bd05bc1efd191c0d

commit r12-6430-g0552605b7b27dc6beed62e71bd05bc1efd191c0d
Author: Xionghu Luo <luoxhu@linux.ibm.com>
Date:   Mon Jan 10 20:05:56 2022 -0600

    testsuite: Fix regression on m32 by r12-6087 [PR103820]

    r12-6087 will avoid move cold bb out of hot loop, while the original
    intent of this testcase is to hoist divides out of loop and CSE them to
    only one divide.  So increase the loop count to turn the cold bb to hot
    bb again.  Then the 3 divides could be rewritten with same reciptmp.

    Tested pass on Power-Linux {32,64}, x86 {64,32} and i686-linux.

    gcc/testsuite/ChangeLog:

            PR testsuite/103820
            * gcc.dg/tree-ssa/recip-3.c: Adjust.

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

* [Bug bootstrap/103820] [12 Regression] i686 failed to bootstrap with ada by r12-6077
  2021-12-23 19:58 [Bug bootstrap/103820] New: [12 Regression] i686 failed to bootstrap with ada by r12-6077 hjl.tools at gmail dot com
                   ` (5 preceding siblings ...)
  2022-01-11  8:24 ` cvs-commit at gcc dot gnu.org
@ 2022-01-11  8:36 ` luoxhu at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: luoxhu at gcc dot gnu.org @ 2022-01-11  8:36 UTC (permalink / raw)
  To: gcc-bugs

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

luoxhu at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |luoxhu at gcc dot gnu.org

--- Comment #7 from luoxhu at gcc dot gnu.org ---
(In reply to CVS Commits from comment #6)
> The master branch has been updated by Xiong Hu Luo <luoxhu@gcc.gnu.org>:
> 
> https://gcc.gnu.org/g:0552605b7b27dc6beed62e71bd05bc1efd191c0d
> 
> commit r12-6430-g0552605b7b27dc6beed62e71bd05bc1efd191c0d
> Author: Xionghu Luo <luoxhu@linux.ibm.com>
> Date:   Mon Jan 10 20:05:56 2022 -0600
> 
>     testsuite: Fix regression on m32 by r12-6087 [PR103820]
>     
>     r12-6087 will avoid move cold bb out of hot loop, while the original
>     intent of this testcase is to hoist divides out of loop and CSE them to
>     only one divide.  So increase the loop count to turn the cold bb to hot
>     bb again.  Then the 3 divides could be rewritten with same reciptmp.
>     
>     Tested pass on Power-Linux {32,64}, x86 {64,32} and i686-linux.
>     
>     gcc/testsuite/ChangeLog:
>     
>             PR testsuite/103820
>             * gcc.dg/tree-ssa/recip-3.c: Adjust.

Typo. should be PR103802.

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

end of thread, other threads:[~2022-01-11  8:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-23 19:58 [Bug bootstrap/103820] New: [12 Regression] i686 failed to bootstrap with ada by r12-6077 hjl.tools at gmail dot com
2021-12-23 20:00 ` [Bug bootstrap/103820] " hjl.tools at gmail dot com
2021-12-23 20:06 ` pinskia at gcc dot gnu.org
2021-12-23 20:42 ` roger at nextmovesoftware dot com
2021-12-23 20:49 ` hjl.tools at gmail dot com
2021-12-23 21:25 ` hjl.tools at gmail dot com
2022-01-11  8:24 ` cvs-commit at gcc dot gnu.org
2022-01-11  8:36 ` luoxhu at gcc dot gnu.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).