* [Bug tree-optimization/32533] [4.2 regression] miscompilation at -O3 -ffast-math -ftree-vectorize -march=native
2007-06-28 6:07 [Bug middle-end/32533] New: [4.2] miscompilation at -O3 -ffast-math -ftree-vectorize -march=native jv244 at cam dot ac dot uk
@ 2007-06-28 8:13 ` ubizjak at gmail dot com
2007-06-28 8:14 ` ubizjak at gmail dot com
` (14 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: ubizjak at gmail dot com @ 2007-06-28 8:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from ubizjak at gmail dot com 2007-06-28 08:13 -------
Looks like problems in tree ifcvt pass. Before ifcvt, we have:
M.2_16 = (int4) D.1257_15;
if (M.2_16 > 1) goto <L7>; else goto <L9>;
<L7>:;
if (M.2_16 > 20) goto <L10>; else goto <L9>;
# M.2_64 = PHI <M.2_16(6), 1(5)>;
<L9>:;
pretmp.118_78 = (real8) M.2_64;
# prephitmp.119_79 = PHI <2.0e+1(6), pretmp.118_78(7)>;
# M.2_4 = PHI <20(6), M.2_64(7)>;
<L10>:;
But ifcvt creates:
D.1446_84 = M.2_16 > 1;
D.1447_85 = M.2_16 > 20;
_ifc_.127_86 = D.1446_84 && D.1447_85;
D.1449_87 = M.2_16 > 1;
D.1450_88 = M.2_16 <= 20;
_ifc_.128_89 = D.1449_87 && D.1450_88;
M.2_64 = M.2_16 > 1 ? M.2_16 : 1;
pretmp.118_78 = (real8) M.2_64;
prephitmp.119_79 = M.2_16 > 1 ? 2.0e+1 : pretmp.118_78;
M.2_4 = M.2_16 > 1 ? 20 : M.2_64;
Note the last two lines, where we compare "M.2_16 > 1" instead of "M.2_16 >
20".
This bug could be hidden in 4.3.0 as we use MIN_EXPR and MAX_EXPR here.
--
ubizjak at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|middle-end |tree-optimization
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-06-28 08:13:14
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32533
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/32533] [4.2 regression] miscompilation at -O3 -ffast-math -ftree-vectorize -march=native
2007-06-28 6:07 [Bug middle-end/32533] New: [4.2] miscompilation at -O3 -ffast-math -ftree-vectorize -march=native jv244 at cam dot ac dot uk
2007-06-28 8:13 ` [Bug tree-optimization/32533] [4.2 regression] " ubizjak at gmail dot com
@ 2007-06-28 8:14 ` ubizjak at gmail dot com
2007-06-28 8:36 ` rguenth at gcc dot gnu dot org
` (13 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: ubizjak at gmail dot com @ 2007-06-28 8:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from ubizjak at gmail dot com 2007-06-28 08:14 -------
(In reply to comment #1)
> This bug could be hidden in 4.3.0 as we use MIN_EXPR and MAX_EXPR here.
To clear the typo - we use MIN_EXPR and MAX_EXPR in 4.3.0.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32533
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/32533] [4.2 regression] miscompilation at -O3 -ffast-math -ftree-vectorize -march=native
2007-06-28 6:07 [Bug middle-end/32533] New: [4.2] miscompilation at -O3 -ffast-math -ftree-vectorize -march=native jv244 at cam dot ac dot uk
2007-06-28 8:13 ` [Bug tree-optimization/32533] [4.2 regression] " ubizjak at gmail dot com
2007-06-28 8:14 ` ubizjak at gmail dot com
@ 2007-06-28 8:36 ` rguenth at gcc dot gnu dot org
2007-06-29 7:13 ` jv244 at cam dot ac dot uk
` (12 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-06-28 8:36 UTC (permalink / raw)
To: gcc-bugs
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu dot
| |org
Known to fail|4.0.2 |4.2.0
Target Milestone|--- |4.2.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32533
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/32533] [4.2 regression] miscompilation at -O3 -ffast-math -ftree-vectorize -march=native
2007-06-28 6:07 [Bug middle-end/32533] New: [4.2] miscompilation at -O3 -ffast-math -ftree-vectorize -march=native jv244 at cam dot ac dot uk
` (2 preceding siblings ...)
2007-06-28 8:36 ` rguenth at gcc dot gnu dot org
@ 2007-06-29 7:13 ` jv244 at cam dot ac dot uk
2007-06-29 7:51 ` [Bug tree-optimization/32533] [4.1/4.2 " jv244 at cam dot ac dot uk
` (11 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: jv244 at cam dot ac dot uk @ 2007-06-29 7:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jv244 at cam dot ac dot uk 2007-06-29 07:13 -------
I'm wondering if it is still required to turn fortran testcases in the
equivalent C testcase in order to mark this kind of bugs as P1. This does seem
a bit of a waste of time... and just think about the engineers using Fortran to
design nuclear power plants... ;-)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32533
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/32533] [4.1/4.2 regression] miscompilation at -O3 -ffast-math -ftree-vectorize -march=native
2007-06-28 6:07 [Bug middle-end/32533] New: [4.2] miscompilation at -O3 -ffast-math -ftree-vectorize -march=native jv244 at cam dot ac dot uk
` (3 preceding siblings ...)
2007-06-29 7:13 ` jv244 at cam dot ac dot uk
@ 2007-06-29 7:51 ` jv244 at cam dot ac dot uk
2007-06-29 8:06 ` jv244 at cam dot ac dot uk
` (10 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: jv244 at cam dot ac dot uk @ 2007-06-29 7:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jv244 at cam dot ac dot uk 2007-06-29 07:50 -------
also fails with 4.1.3
gfortran -march=k8 -mtune=k8 -ftree-vectorize -ffast-math -O3 test.f90
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: /data03/vondele/gcc_4_1_branch/gcc/configure
--prefix=/data03/vondele/gcc_4_1_branch/build --with-gmp=/data03/vondele/
--with-mpfr=/data03/vondele/ --enable-languages=c,fortran
Thread model: posix
gcc version 4.1.3 20070629 (prerelease)
--
jv244 at cam dot ac dot uk changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail|4.2.0 |4.2.0 4.1.3
Summary|[4.2 regression] |[4.1/4.2 regression]
|miscompilation at -O3 - |miscompilation at -O3 -
|ffast-math -ftree-vectorize |ffast-math -ftree-vectorize
|-march=native |-march=native
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32533
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/32533] [4.1/4.2 regression] miscompilation at -O3 -ffast-math -ftree-vectorize -march=native
2007-06-28 6:07 [Bug middle-end/32533] New: [4.2] miscompilation at -O3 -ffast-math -ftree-vectorize -march=native jv244 at cam dot ac dot uk
` (4 preceding siblings ...)
2007-06-29 7:51 ` [Bug tree-optimization/32533] [4.1/4.2 " jv244 at cam dot ac dot uk
@ 2007-06-29 8:06 ` jv244 at cam dot ac dot uk
2007-06-30 15:40 ` ubizjak at gmail dot com
` (9 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: jv244 at cam dot ac dot uk @ 2007-06-29 8:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jv244 at cam dot ac dot uk 2007-06-29 08:06 -------
works correctly with 4.0.4, so it is a regression:
gfortran -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: /data03/vondele/gcc_4_0_branch/gcc/configure
--prefix=/data03/vondele/gcc_4_0_branch/build --with-gmp=/data03/vondele/
--with-mpfr=/data03/vondele/ --enable-languages=c,fortran
Thread model: posix
gcc version 4.0.4
--
jv244 at cam dot ac dot uk changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work|4.3.0 |4.3.0 4.0.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32533
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/32533] [4.1/4.2 regression] miscompilation at -O3 -ffast-math -ftree-vectorize -march=native
2007-06-28 6:07 [Bug middle-end/32533] New: [4.2] miscompilation at -O3 -ffast-math -ftree-vectorize -march=native jv244 at cam dot ac dot uk
` (5 preceding siblings ...)
2007-06-29 8:06 ` jv244 at cam dot ac dot uk
@ 2007-06-30 15:40 ` ubizjak at gmail dot com
2007-07-01 8:51 ` dorit at gcc dot gnu dot org
` (8 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: ubizjak at gmail dot com @ 2007-06-30 15:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from ubizjak at gmail dot com 2007-06-30 15:39 -------
Hm, in the dump (gcc-4.1.3), preceeding ifcvt, we have:
<L4>:;
D.985_28 = iftmp.5_4 + D.964_27;
M.2_29 = (int4) D.985_28;
if (M.2_29 > 1) goto <L7>; else goto <L9>;
<L7>:;
if (M.2_29 > 20) goto <L10>; else goto <L9>;
# M.2_61 = PHI <M.2_29(4), 1(3)>; <<<<<<---- here
<L9>:;
pretmp.98_1 = (real8) M.2_61;
# prephitmp.99_39 = PHI <2.0e+1(4), pretmp.98_1(5)>;
# M.2_3 = PHI <20(4), M.2_61(5)>;
<L10>:;
Isn't marked statement unreachable?
Comparing _.ssa dumps between 4.1 (wrong result) and 4.3 (correct result), we
have:
(4.1)
--cut here--
<L5>:;
M.1_36 = D.966_29;
goto <bb 8> (<L7>);
<L6>:;
M.1_35 = 1;
# M.1_2 = PHI <M.1_36(6), M.1_35(7)>; <<<< here (4.1)
<L7>:;
if (M.1_2 > 20) goto <L8>; else goto <L9>;
<L8>:;
M.2_34 = 20;
goto <bb 11> (<L10>);
--cut here--
versus
(4.3)
--cut here--
<bb 8>:
M.1_17 = D.1365_16;
goto <bb 10>;
<bb 9>:
M.1_18 = 1;
<bb 10>:
# M.1_1 = PHI <M.1_17(8), M.1_18(9)> <<<< here (4.3)
if (20 < M.1_1)
goto <bb 11>;
else
goto <bb 12>;
<bb 11>:
M.2_19 = 20;
goto <bb 13>;
---cut here---
--
ubizjak at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ubizjak at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32533
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/32533] [4.1/4.2 regression] miscompilation at -O3 -ffast-math -ftree-vectorize -march=native
2007-06-28 6:07 [Bug middle-end/32533] New: [4.2] miscompilation at -O3 -ffast-math -ftree-vectorize -march=native jv244 at cam dot ac dot uk
` (6 preceding siblings ...)
2007-06-30 15:40 ` ubizjak at gmail dot com
@ 2007-07-01 8:51 ` dorit at gcc dot gnu dot org
2007-07-01 9:40 ` ubizjak at gmail dot com
` (7 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: dorit at gcc dot gnu dot org @ 2007-07-01 8:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from dorit at gcc dot gnu dot org 2007-07-01 08:51 -------
PR31966 is also wrong code which seems to be a result of the tree-level
if-conversion (nothing gets vectorized these, and if tree-if-conversion is
disabled everything works ok).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32533
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/32533] [4.1/4.2 regression] miscompilation at -O3 -ffast-math -ftree-vectorize -march=native
2007-06-28 6:07 [Bug middle-end/32533] New: [4.2] miscompilation at -O3 -ffast-math -ftree-vectorize -march=native jv244 at cam dot ac dot uk
` (7 preceding siblings ...)
2007-07-01 8:51 ` dorit at gcc dot gnu dot org
@ 2007-07-01 9:40 ` ubizjak at gmail dot com
2007-07-02 9:41 ` ubizjak at gmail dot com
` (6 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: ubizjak at gmail dot com @ 2007-07-01 9:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from ubizjak at gmail dot com 2007-07-01 09:40 -------
(In reply to comment #6)
> Hm, in the dump (gcc-4.1.3), preceeding ifcvt, we have:
> Isn't marked statement unreachable?
The problem is in ifcvt pass, as confirmed by a c testcase in PR31966. This
problem is also present in 4.3 branch, but (as explained in Comment #1), not
triggered by the fortran testcase in this PR.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32533
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/32533] [4.1/4.2 regression] miscompilation at -O3 -ffast-math -ftree-vectorize -march=native
2007-06-28 6:07 [Bug middle-end/32533] New: [4.2] miscompilation at -O3 -ffast-math -ftree-vectorize -march=native jv244 at cam dot ac dot uk
` (8 preceding siblings ...)
2007-07-01 9:40 ` ubizjak at gmail dot com
@ 2007-07-02 9:41 ` ubizjak at gmail dot com
2007-07-02 10:21 ` jv244 at cam dot ac dot uk
` (5 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: ubizjak at gmail dot com @ 2007-07-02 9:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from ubizjak at gmail dot com 2007-07-02 09:40 -------
Created an attachment (id=13822)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13822&action=view)
The patch to fix tree-if-conv.c
Joost, could you please test this 4.2 patch with CP2K? It fixes the testcase
you provided (and PR31966, FWIW).
BTW: Could you create the testcase that would be suitable for gfortran
testsuite?
--
ubizjak at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |ubizjak at gmail dot com
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32533
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/32533] [4.1/4.2 regression] miscompilation at -O3 -ffast-math -ftree-vectorize -march=native
2007-06-28 6:07 [Bug middle-end/32533] New: [4.2] miscompilation at -O3 -ffast-math -ftree-vectorize -march=native jv244 at cam dot ac dot uk
` (9 preceding siblings ...)
2007-07-02 9:41 ` ubizjak at gmail dot com
@ 2007-07-02 10:21 ` jv244 at cam dot ac dot uk
2007-07-02 14:26 ` uros at gcc dot gnu dot org
` (4 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: jv244 at cam dot ac dot uk @ 2007-07-02 10:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from jv244 at cam dot ac dot uk 2007-07-02 10:21 -------
> Joost, could you please test this 4.2 patch with CP2K? It fixes the testcase
> you provided (and PR31966, FWIW).
>
the testcase passes, the CP2K tests that were previously failing now seem to
pass as well .... many thanks for fixing this issue
> BTW: Could you create the testcase that would be suitable for gfortran
> testsuite?
this aborts before and passes after the patch:
SUBROUTINE T(nsubcell,sab_max,subcells)
INTEGER, PARAMETER :: dp=KIND(0.0D0)
REAL(dp) :: sab_max(3), subcells,nsubcell(3)
nsubcell(:) = MIN(MAX(1,NINT(0.5_dp*subcells/sab_max(:))),20)
END SUBROUTINE
INTEGER, PARAMETER :: dp=KIND(0.0D0)
REAL(dp) :: sab_max(3), subcells,nsubcell(3)
subcells=2.0_dp
sab_max=0.590060749244805_dp
CALL T(nsubcell,sab_max,subcells)
IF (ANY(nsubcell.NE.2.0_dp)) CALL ABORT()
END
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32533
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/32533] [4.1/4.2 regression] miscompilation at -O3 -ffast-math -ftree-vectorize -march=native
2007-06-28 6:07 [Bug middle-end/32533] New: [4.2] miscompilation at -O3 -ffast-math -ftree-vectorize -march=native jv244 at cam dot ac dot uk
` (10 preceding siblings ...)
2007-07-02 10:21 ` jv244 at cam dot ac dot uk
@ 2007-07-02 14:26 ` uros at gcc dot gnu dot org
2007-07-04 3:31 ` mmitchel at gcc dot gnu dot org
` (3 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: uros at gcc dot gnu dot org @ 2007-07-02 14:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from uros at gcc dot gnu dot org 2007-07-02 14:26 -------
Subject: Bug 32533
Author: uros
Date: Mon Jul 2 14:26:11 2007
New Revision: 126206
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126206
Log:
PR tree-optimization/31966
PR tree-optimization/32533
* tree-if-conv.c (add_to_dst_predicate_list): Use "edge", not
"basic_block" description as its third argument. Update function
calls to get destination bb from "edge" argument. Save "cond" into
aux field of the edge. Update prototype for changed arguments.
(find_phi_replacement_condition): Operate on incoming edges, not
on predecessor blocks. If there is a condition saved in the
incoming edge aux field, AND it with incoming bb predicate.
Return source bb of the first edge.
(clean_predicate_lists): Clean aux field of outgoing node edges.
(tree_if_conversion): Do not initialize cond variable. Move
variable declaration into the loop.
(replace_phi_with_cond_gimple_modify_stmt): Remove unneded
initializations of new_stmt, arg0 and arg1 variables.
testsuite/ChangeLog:
PR tree-optimization/31966
PR tree-optimization/32533
* gcc.dg/tree-ssa/pr31966.c: New runtime test.
* gfortran.dg/pr32533.f90: Ditto.
Added:
trunk/gcc/testsuite/gcc.dg/tree-ssa/pr31966.c
trunk/gcc/testsuite/gfortran.dg/pr32533.f90
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-if-conv.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32533
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/32533] [4.1/4.2 regression] miscompilation at -O3 -ffast-math -ftree-vectorize -march=native
2007-06-28 6:07 [Bug middle-end/32533] New: [4.2] miscompilation at -O3 -ffast-math -ftree-vectorize -march=native jv244 at cam dot ac dot uk
` (11 preceding siblings ...)
2007-07-02 14:26 ` uros at gcc dot gnu dot org
@ 2007-07-04 3:31 ` mmitchel at gcc dot gnu dot org
2007-07-04 5:41 ` uros at gcc dot gnu dot org
` (2 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-07-04 3:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from mmitchel at gcc dot gnu dot org 2007-07-04 03:31 -------
Uros, is it feasible to backport this to 4.2?
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32533
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/32533] [4.1/4.2 regression] miscompilation at -O3 -ffast-math -ftree-vectorize -march=native
2007-06-28 6:07 [Bug middle-end/32533] New: [4.2] miscompilation at -O3 -ffast-math -ftree-vectorize -march=native jv244 at cam dot ac dot uk
` (12 preceding siblings ...)
2007-07-04 3:31 ` mmitchel at gcc dot gnu dot org
@ 2007-07-04 5:41 ` uros at gcc dot gnu dot org
2007-07-04 5:49 ` uros at gcc dot gnu dot org
2007-07-04 5:56 ` ubizjak at gmail dot com
15 siblings, 0 replies; 17+ messages in thread
From: uros at gcc dot gnu dot org @ 2007-07-04 5:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from uros at gcc dot gnu dot org 2007-07-04 05:41 -------
Subject: Bug 32533
Author: uros
Date: Wed Jul 4 05:40:58 2007
New Revision: 126301
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126301
Log:
PR tree-optimization/31966
PR tree-optimization/32533
* tree-if-conv.c (add_to_dst_predicate_list): Use "edge", not
"basic_block" description as its third argument. Update function
calls to get destination bb from "edge" argument. Save "cond" into
aux field of the edge. Update prototype for changed arguments.
(if_convertible_loop_p): Clear aux field of incoming edges if bb
contains phi node.
(find_phi_replacement_condition): Operate on incoming edges, not
on predecessor blocks. If there is a condition saved in the
incoming edge aux field, AND it with incoming bb predicate.
Return source bb of the first edge.
(clean_predicate_lists): Clean aux field of outgoing node edges.
(tree_if_conversion): Do not initialize cond variable. Move
variable declaration into the loop.
(replace_phi_with_cond_gimple_modify_stmt): Remove unneded
initializations of new_stmt, arg0 and arg1 variables.
testsuite/ChangeLog:
PR tree-optimization/31966
PR tree-optimization/32533
* gcc.dg/tree-ssa/pr31966.c: New runtime test.
* gfortran.dg/pr32533.f90: Ditto.
Added:
branches/gcc-4_2-branch/gcc/testsuite/gcc.dg/tree-ssa/pr31966.c
branches/gcc-4_2-branch/gcc/testsuite/gfortran.dg/pr32533.f90
Modified:
branches/gcc-4_2-branch/gcc/ChangeLog
branches/gcc-4_2-branch/gcc/testsuite/ChangeLog
branches/gcc-4_2-branch/gcc/tree-if-conv.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32533
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/32533] [4.1/4.2 regression] miscompilation at -O3 -ffast-math -ftree-vectorize -march=native
2007-06-28 6:07 [Bug middle-end/32533] New: [4.2] miscompilation at -O3 -ffast-math -ftree-vectorize -march=native jv244 at cam dot ac dot uk
` (13 preceding siblings ...)
2007-07-04 5:41 ` uros at gcc dot gnu dot org
@ 2007-07-04 5:49 ` uros at gcc dot gnu dot org
2007-07-04 5:56 ` ubizjak at gmail dot com
15 siblings, 0 replies; 17+ messages in thread
From: uros at gcc dot gnu dot org @ 2007-07-04 5:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from uros at gcc dot gnu dot org 2007-07-04 05:49 -------
Subject: Bug 32533
Author: uros
Date: Wed Jul 4 05:49:31 2007
New Revision: 126302
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126302
Log:
PR tree-optimization/31966
PR tree-optimization/32533
* tree-if-conv.c (add_to_dst_predicate_list): Use "edge", not
"basic_block" description as its third argument. Update function
calls to get destination bb from "edge" argument. Save "cond" into
aux field of the edge. Update prototype for changed arguments.
(if_convertible_loop_p): Clear aux field of incoming edges if bb
contains phi node.
(find_phi_replacement_condition): Operate on incoming edges, not
on predecessor blocks. If there is a condition saved in the
incoming edge aux field, AND it with incoming bb predicate.
Return source bb of the first edge.
(clean_predicate_lists): Clean aux field of outgoing node edges.
(tree_if_conversion): Do not initialize cond variable. Move
variable declaration into the loop.
(replace_phi_with_cond_gimple_modify_stmt): Remove unneded
initializations of new_stmt, arg0 and arg1 variables.
testsuite/ChangeLog:
PR tree-optimization/31966
PR tree-optimization/32533
* gcc.dg/tree-ssa/pr31966.c: New runtime test.
* gfortran.dg/pr32533.f90: Ditto.
Added:
branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/tree-ssa/pr31966.c
branches/gcc-4_1-branch/gcc/testsuite/gfortran.dg/pr32533.f90
Modified:
branches/gcc-4_1-branch/gcc/ChangeLog
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
branches/gcc-4_1-branch/gcc/tree-if-conv.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32533
^ permalink raw reply [flat|nested] 17+ messages in thread
* [Bug tree-optimization/32533] [4.1/4.2 regression] miscompilation at -O3 -ffast-math -ftree-vectorize -march=native
2007-06-28 6:07 [Bug middle-end/32533] New: [4.2] miscompilation at -O3 -ffast-math -ftree-vectorize -march=native jv244 at cam dot ac dot uk
` (14 preceding siblings ...)
2007-07-04 5:49 ` uros at gcc dot gnu dot org
@ 2007-07-04 5:56 ` ubizjak at gmail dot com
15 siblings, 0 replies; 17+ messages in thread
From: ubizjak at gmail dot com @ 2007-07-04 5:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from ubizjak at gmail dot com 2007-07-04 05:56 -------
(In reply to comment #12)
> Uros, is it feasible to backport this to 4.2?
Sure, the patch was just waiting a couple of days on mainline for possible
problems. This bug is now fixed on mainline and branches.
--
ubizjak at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC|ubizjak at gmail dot com |
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32533
^ permalink raw reply [flat|nested] 17+ messages in thread