public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/111407] New: ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge
@ 2023-09-13 16:39 qinzhao at gcc dot gnu.org
  2023-09-13 17:02 ` [Bug tree-optimization/111407] " pinskia at gcc dot gnu.org
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: qinzhao at gcc dot gnu.org @ 2023-09-13 16:39 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111407
           Summary: ICE: SSA corruption due to widening_mul opt on
                    conflict across an abnormal edge
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: qinzhao at gcc dot gnu.org
  Target Milestone: ---

this bug was originally reported against GCC8.5 with profiling feedback. 
there were multiple similar failures due to this issue for our large
application. 

Although we reduced the testing case to a very small size, and changed the
variable names. the failure can only be repeated with -fprofile-use and the
.gcda files. As a result, we cannot expose the testing case.

With the small testing case, and debugging into GCC8, I finally locate the
issue is:

this is a bug in tree-ssa-math-opts.cc, when applying the widening mul
optimization, 
The compiler needs to check whether the operand is in a ABNORMAL PHI, if YES,
we should avoid the transformation.

the following patch against GCC8 can fix the failure very well:

diff -u -r -N -p gcc-8.5.0-20210514-org/gcc/tree-ssa-math-opts.c
gcc-8.5.0-20210514/gcc/tree-ssa-math-opts.c
--- gcc-8.5.0-20210514-org/gcc/tree-ssa-math-opts.c 2023-09-11
21:04:17.891403319 +0000
+++ gcc-8.5.0-20210514/gcc/tree-ssa-math-opts.c 2023-09-13 15:35:44.962336530
+0000
@@ -2346,6 +2346,14 @@ convert_mult_to_widen (gimple *stmt, gim
if (!is_widening_mult_p (stmt, &type1, &rhs1, &type2, &rhs2))
return false;

+ /* if any one of rhs1 and rhs2 is subjust to abnormal coalescing
+ * avoid the tranform. */ 
+ if ((TREE_CODE (rhs1) == SSA_NAME
+ && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (rhs1))
+ || (TREE_CODE (rhs2) == SSA_NAME
+ && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (rhs2)))
+ return false;
+
to_mode = SCALAR_INT_TYPE_MODE (type);
from_mode = SCALAR_INT_TYPE_MODE (type1);
if (to_mode == from_mode)

I checked the latest upstream GCC14, and found that the function
"convert_mult_to_widen" has the same issue, need to be patched as well.

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

* [Bug tree-optimization/111407] ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge
  2023-09-13 16:39 [Bug tree-optimization/111407] New: ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge qinzhao at gcc dot gnu.org
@ 2023-09-13 17:02 ` pinskia at gcc dot gnu.org
  2023-09-13 17:04 ` pinskia at gcc dot gnu.org
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-09-13 17:02 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2023-09-13
             Status|UNCONFIRMED                 |WAITING

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Do you have a testcase?

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

* [Bug tree-optimization/111407] ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge
  2023-09-13 16:39 [Bug tree-optimization/111407] New: ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge qinzhao at gcc dot gnu.org
  2023-09-13 17:02 ` [Bug tree-optimization/111407] " pinskia at gcc dot gnu.org
@ 2023-09-13 17:04 ` pinskia at gcc dot gnu.org
  2023-09-13 17:05 ` qinzhao at gcc dot gnu.org
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-09-13 17:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Also what target is this for?
I suspect aarch64 since x86_64 does not have widening multiply ...

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

* [Bug tree-optimization/111407] ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge
  2023-09-13 16:39 [Bug tree-optimization/111407] New: ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge qinzhao at gcc dot gnu.org
  2023-09-13 17:02 ` [Bug tree-optimization/111407] " pinskia at gcc dot gnu.org
  2023-09-13 17:04 ` pinskia at gcc dot gnu.org
@ 2023-09-13 17:05 ` qinzhao at gcc dot gnu.org
  2023-09-13 17:06 ` qinzhao at gcc dot gnu.org
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: qinzhao at gcc dot gnu.org @ 2023-09-13 17:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from qinzhao at gcc dot gnu.org ---
(In reply to Andrew Pinski from comment #1)
> Do you have a testcase?

I have, but I cannot expose it to public.
I can provide the Bad IR and Good IR if you think it's okay.

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

* [Bug tree-optimization/111407] ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge
  2023-09-13 16:39 [Bug tree-optimization/111407] New: ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge qinzhao at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-09-13 17:05 ` qinzhao at gcc dot gnu.org
@ 2023-09-13 17:06 ` qinzhao at gcc dot gnu.org
  2023-09-13 17:14 ` pinskia at gcc dot gnu.org
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: qinzhao at gcc dot gnu.org @ 2023-09-13 17:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from qinzhao at gcc dot gnu.org ---
(In reply to Andrew Pinski from comment #2)
> Also what target is this for?
> I suspect aarch64 since x86_64 does not have widening multiply ...

you are right, it's aarch64.

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

* [Bug tree-optimization/111407] ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge
  2023-09-13 16:39 [Bug tree-optimization/111407] New: ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge qinzhao at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2023-09-13 17:06 ` qinzhao at gcc dot gnu.org
@ 2023-09-13 17:14 ` pinskia at gcc dot gnu.org
  2023-09-13 17:26 ` pinskia at gcc dot gnu.org
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-09-13 17:14 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Testcase:
```
enum { SEND_TOFILE } __sigsetjmp();
void fclose();
void foldergets();
void sendpart_stats(int *p1, int a1, int b1) {
  int *a = p1;
  fclose();
  p1 = 0;
  long t = b1;
  if (__sigsetjmp()) {
    {
      long t1 = a1;
      a1+=1;
      fclose(a1*(long)t1);
    }
  }
  if (p1)
    fclose();
}
```

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

* [Bug tree-optimization/111407] ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge
  2023-09-13 16:39 [Bug tree-optimization/111407] New: ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge qinzhao at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2023-09-13 17:14 ` pinskia at gcc dot gnu.org
@ 2023-09-13 17:26 ` pinskia at gcc dot gnu.org
  2023-09-13 18:19 ` qinzhao at gcc dot gnu.org
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-09-13 17:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #5)
> Testcase:

The way I figured out this testcase was trial and error and starting with the
testcase from PR 69167 .

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

* [Bug tree-optimization/111407] ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge
  2023-09-13 16:39 [Bug tree-optimization/111407] New: ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge qinzhao at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2023-09-13 17:26 ` pinskia at gcc dot gnu.org
@ 2023-09-13 18:19 ` qinzhao at gcc dot gnu.org
  2023-09-13 18:52 ` qinzhao at gcc dot gnu.org
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: qinzhao at gcc dot gnu.org @ 2023-09-13 18:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from qinzhao at gcc dot gnu.org ---
(In reply to Andrew Pinski from comment #5)
> Testcase:
thanks a lot for the testing case. GCC8 failed with this, disable
tree-widening_mul fixed the failure.
and my patch for GCC8 also fixed the failure.

will test GCC14 as well.

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

* [Bug tree-optimization/111407] ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge
  2023-09-13 16:39 [Bug tree-optimization/111407] New: ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge qinzhao at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2023-09-13 18:19 ` qinzhao at gcc dot gnu.org
@ 2023-09-13 18:52 ` qinzhao at gcc dot gnu.org
  2023-09-15 13:47 ` cvs-commit at gcc dot gnu.org
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: qinzhao at gcc dot gnu.org @ 2023-09-13 18:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from qinzhao at gcc dot gnu.org ---
the latest GCC14 has the same issue.

with the patch proposed in comment #1, the failure has been fixed.

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

* [Bug tree-optimization/111407] ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge
  2023-09-13 16:39 [Bug tree-optimization/111407] New: ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge qinzhao at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2023-09-13 18:52 ` qinzhao at gcc dot gnu.org
@ 2023-09-15 13:47 ` cvs-commit at gcc dot gnu.org
  2023-09-15 13:56 ` qinzhao at gcc dot gnu.org
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-09-15 13:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Qing Zhao <qinzhao@gcc.gnu.org>:

https://gcc.gnu.org/g:4aca1cfd6235090e48a53dab734437740671bbf3

commit r14-4034-g4aca1cfd6235090e48a53dab734437740671bbf3
Author: Qing Zhao <qing.zhao@oracle.com>
Date:   Fri Sep 15 13:46:52 2023 +0000

    Fix PR111407--SSA corruption due to widening_mul opt on conflict across an
abnormal edge

    This is a bug in tree-ssa-math-opts.cc, when applying the widening mul
    optimization, the compiler needs to check whether the operand is in a
    ABNORMAL PHI, if YES, we should avoid the transformation.

            PR tree-optimization/111407

    gcc/ChangeLog:

            * tree-ssa-math-opts.cc (convert_mult_to_widen): Avoid the
transform
            when one of the operands is subject to abnormal coalescing.

    gcc/testsuite/ChangeLog:

            * gcc.dg/pr111407.c: New test.

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

* [Bug tree-optimization/111407] ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge
  2023-09-13 16:39 [Bug tree-optimization/111407] New: ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge qinzhao at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2023-09-15 13:47 ` cvs-commit at gcc dot gnu.org
@ 2023-09-15 13:56 ` qinzhao at gcc dot gnu.org
  2024-02-29  7:36 ` [Bug tree-optimization/111407] [11/12/13 Regression] " pinskia at gcc dot gnu.org
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: qinzhao at gcc dot gnu.org @ 2023-09-15 13:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from qinzhao at gcc dot gnu.org ---
(In reply to Andrew Pinski from comment #6)
the fix has been in GCC14, shall we backport the patch to previous releases?

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

* [Bug tree-optimization/111407] [11/12/13 Regression] ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge
  2023-09-13 16:39 [Bug tree-optimization/111407] New: ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge qinzhao at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2023-09-15 13:56 ` qinzhao at gcc dot gnu.org
@ 2024-02-29  7:36 ` pinskia at gcc dot gnu.org
  2024-02-29  7:37 ` pinskia at gcc dot gnu.org
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-29  7:36 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|aarch64-linux-gnu           |aarch64-linux-gnu
                   |                            |mips64-linux-gnu
   Target Milestone|---                         |11.5
      Known to work|                            |14.0, 6.4.0
            Summary|ICE: SSA corruption due to  |[11/12/13 Regression] ICE:
                   |widening_mul opt on         |SSA corruption due to
                   |conflict across an abnormal |widening_mul opt on
                   |edge                        |conflict across an abnormal
                   |                            |edge

--- Comment #11 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
For aarch64, this has worked in GCC 6.4.0.

s/long/long long/ it also fails for arm starting in GCC 7.x. Likewise for
mips64 and mips.

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

* [Bug tree-optimization/111407] [11/12/13 Regression] ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge
  2023-09-13 16:39 [Bug tree-optimization/111407] New: ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge qinzhao at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2024-02-29  7:36 ` [Bug tree-optimization/111407] [11/12/13 Regression] " pinskia at gcc dot gnu.org
@ 2024-02-29  7:37 ` pinskia at gcc dot gnu.org
  2024-02-29 14:43 ` qinzhao at gcc dot gnu.org
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-29  7:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to qinzhao from comment #10)
> (In reply to Andrew Pinski from comment #6)
> the fix has been in GCC14, shall we backport the patch to previous releases?

Since it is a regression, yes please.

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

* [Bug tree-optimization/111407] [11/12/13 Regression] ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge
  2023-09-13 16:39 [Bug tree-optimization/111407] New: ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge qinzhao at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2024-02-29  7:37 ` pinskia at gcc dot gnu.org
@ 2024-02-29 14:43 ` qinzhao at gcc dot gnu.org
  2024-04-02 14:50 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: qinzhao at gcc dot gnu.org @ 2024-02-29 14:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from qinzhao at gcc dot gnu.org ---
(In reply to Andrew Pinski from comment #12)
> (In reply to qinzhao from comment #10)
> > (In reply to Andrew Pinski from comment #6)
> > the fix has been in GCC14, shall we backport the patch to previous releases?
> 
> Since it is a regression, yes please.

So, How far back should I add the fix? gcc13, gcc12, till ?

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

* [Bug tree-optimization/111407] [11/12/13 Regression] ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge
  2023-09-13 16:39 [Bug tree-optimization/111407] New: ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge qinzhao at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2024-02-29 14:43 ` qinzhao at gcc dot gnu.org
@ 2024-04-02 14:50 ` cvs-commit at gcc dot gnu.org
  2024-04-02 15:56 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-04-02 14:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Qing Zhao <qinzhao@gcc.gnu.org>:

https://gcc.gnu.org/g:2d9a9488e26233eb9497722fa9ccb88258f7402c

commit r13-8556-g2d9a9488e26233eb9497722fa9ccb88258f7402c
Author: Qing Zhao <qing.zhao@oracle.com>
Date:   Thu Feb 29 15:07:49 2024 +0000

    Fix SSA corruption due to widening_mul opt on conflict across an abnormal
edge [PR111407]

    This is a bug in tree-ssa-math-opts.cc, when applying the widening mul
    optimization, the compiler needs to check whether the operand is in a
    ABNORMAL PHI, if YES, we should avoid the transformation.

            PR tree-optimization/111407

    gcc/ChangeLog:

            * tree-ssa-math-opts.cc (convert_mult_to_widen): Avoid the
transform
            when one of the operands is subject to abnormal coalescing.

    gcc/testsuite/ChangeLog:

            * gcc.dg/pr111407.c: New test.

    (cherry picked from commit 4aca1cfd6235090e48a53dab734437740671bbf3)

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

* [Bug tree-optimization/111407] [11/12/13 Regression] ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge
  2023-09-13 16:39 [Bug tree-optimization/111407] New: ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge qinzhao at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  2024-04-02 14:50 ` cvs-commit at gcc dot gnu.org
@ 2024-04-02 15:56 ` cvs-commit at gcc dot gnu.org
  2024-04-02 16:54 ` cvs-commit at gcc dot gnu.org
  2024-04-02 16:56 ` qinzhao at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-04-02 15:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Qing Zhao <qinzhao@gcc.gnu.org>:

https://gcc.gnu.org/g:5f23f9f141c4b52e8f4a9aadc88b8155cf1959a3

commit r12-10306-g5f23f9f141c4b52e8f4a9aadc88b8155cf1959a3
Author: Qing Zhao <qing.zhao@oracle.com>
Date:   Thu Feb 29 15:07:49 2024 +0000

    Fix SSA corruption due to widening_mul opt on conflict across an abnormal
edge [PR111407]

    This is a bug in tree-ssa-math-opts.cc, when applying the widening mul
    optimization, the compiler needs to check whether the operand is in a
    ABNORMAL PHI, if YES, we should avoid the transformation.

            PR tree-optimization/111407

    gcc/ChangeLog:

            * tree-ssa-math-opts.cc (convert_mult_to_widen): Avoid the
transform
            when one of the operands is subject to abnormal coalescing.

    gcc/testsuite/ChangeLog:

            * gcc.dg/pr111407.c: New test.

    (cherry picked from commit 4aca1cfd6235090e48a53dab734437740671bbf3)

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

* [Bug tree-optimization/111407] [11/12/13 Regression] ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge
  2023-09-13 16:39 [Bug tree-optimization/111407] New: ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge qinzhao at gcc dot gnu.org
                   ` (14 preceding siblings ...)
  2024-04-02 15:56 ` cvs-commit at gcc dot gnu.org
@ 2024-04-02 16:54 ` cvs-commit at gcc dot gnu.org
  2024-04-02 16:56 ` qinzhao at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-04-02 16:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Qing Zhao <qinzhao@gcc.gnu.org>:

https://gcc.gnu.org/g:4de35949e462d89926a171cd1ef7b6f40a308dab

commit r11-11306-g4de35949e462d89926a171cd1ef7b6f40a308dab
Author: Qing Zhao <qing.zhao@oracle.com>
Date:   Mon Mar 25 14:17:56 2024 +0000

    Fix SSA corruption due to widening_mul opt on conflict across an abnormal
edge [PR111407]

    This is a bug in tree-ssa-math-opts.c, when applying the widening mul
    optimization, the compiler needs to check whether the operand is in a
    ABNORMAL PHI, if YES, we should avoid the transformation.

            PR tree-optimization/111407

    gcc/ChangeLog:

            * tree-ssa-math-opts.c (convert_mult_to_widen): Avoid the transform
            when one of the operands is subject to abnormal coalescing.

    gcc/testsuite/ChangeLog:

            * gcc.dg/pr111407.c: New test.

    (cherry picked from commit 4aca1cfd6235090e48a53dab734437740671bbf3)

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

* [Bug tree-optimization/111407] [11/12/13 Regression] ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge
  2023-09-13 16:39 [Bug tree-optimization/111407] New: ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge qinzhao at gcc dot gnu.org
                   ` (15 preceding siblings ...)
  2024-04-02 16:54 ` cvs-commit at gcc dot gnu.org
@ 2024-04-02 16:56 ` qinzhao at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: qinzhao at gcc dot gnu.org @ 2024-04-02 16:56 UTC (permalink / raw)
  To: gcc-bugs

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

qinzhao at gcc dot gnu.org changed:

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

--- Comment #17 from qinzhao at gcc dot gnu.org ---
the patch has been back ported to all supported releases: GCC13, GCC12 and
GCC11.
close it as fixed.

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

end of thread, other threads:[~2024-04-02 16:56 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-13 16:39 [Bug tree-optimization/111407] New: ICE: SSA corruption due to widening_mul opt on conflict across an abnormal edge qinzhao at gcc dot gnu.org
2023-09-13 17:02 ` [Bug tree-optimization/111407] " pinskia at gcc dot gnu.org
2023-09-13 17:04 ` pinskia at gcc dot gnu.org
2023-09-13 17:05 ` qinzhao at gcc dot gnu.org
2023-09-13 17:06 ` qinzhao at gcc dot gnu.org
2023-09-13 17:14 ` pinskia at gcc dot gnu.org
2023-09-13 17:26 ` pinskia at gcc dot gnu.org
2023-09-13 18:19 ` qinzhao at gcc dot gnu.org
2023-09-13 18:52 ` qinzhao at gcc dot gnu.org
2023-09-15 13:47 ` cvs-commit at gcc dot gnu.org
2023-09-15 13:56 ` qinzhao at gcc dot gnu.org
2024-02-29  7:36 ` [Bug tree-optimization/111407] [11/12/13 Regression] " pinskia at gcc dot gnu.org
2024-02-29  7:37 ` pinskia at gcc dot gnu.org
2024-02-29 14:43 ` qinzhao at gcc dot gnu.org
2024-04-02 14:50 ` cvs-commit at gcc dot gnu.org
2024-04-02 15:56 ` cvs-commit at gcc dot gnu.org
2024-04-02 16:54 ` cvs-commit at gcc dot gnu.org
2024-04-02 16:56 ` qinzhao 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).