* [Bug tree-optimization/26719] [4.1/4.2 Regression] Computed (integer) table changes with -O
2006-03-16 18:19 [Bug c/26719] New: Computed (integer) table changes with -O kmshanah at disenchant dot net
@ 2006-03-16 18:24 ` pinskia at gcc dot gnu dot org
2006-03-16 18:50 ` rakdver at gcc dot gnu dot org
` (15 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-03-16 18:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-03-16 18:24 -------
Confirmed, ivopts is causing this one.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Severity|normal |critical
Status|UNCONFIRMED |NEW
Component|c |tree-optimization
Ever Confirmed|0 |1
Keywords| |wrong-code
Last reconfirmed|0000-00-00 00:00:00 |2006-03-16 18:24:54
date| |
Summary|Computed (integer) table |[4.1/4.2 Regression]
|changes with -O |Computed (integer) table
| |changes with -O
Target Milestone|--- |4.1.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26719
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/26719] [4.1/4.2 Regression] Computed (integer) table changes with -O
2006-03-16 18:19 [Bug c/26719] New: Computed (integer) table changes with -O kmshanah at disenchant dot net
2006-03-16 18:24 ` [Bug tree-optimization/26719] [4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
@ 2006-03-16 18:50 ` rakdver at gcc dot gnu dot org
2006-03-16 18:51 ` rakdver at gcc dot gnu dot org
` (14 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2006-03-16 18:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rakdver at gcc dot gnu dot org 2006-03-16 18:50 -------
This is a scev analysis problem; on code
D.2160_17 = (signed char) j_15;
D.2161_18 = (int) D.2160_17;
it says D.2161_18 = {0, +, 1}; however, since it wraps at 128 to -127, this is
not correct -- (int) {0, +, 1} (where the type of the chrec is char) would be.
--
rakdver at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sebastian dot pop at cri dot
| |ensmp dot fr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26719
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/26719] [4.1/4.2 Regression] Computed (integer) table changes with -O
2006-03-16 18:19 [Bug c/26719] New: Computed (integer) table changes with -O kmshanah at disenchant dot net
2006-03-16 18:24 ` [Bug tree-optimization/26719] [4.1/4.2 Regression] " pinskia at gcc dot gnu dot org
2006-03-16 18:50 ` rakdver at gcc dot gnu dot org
@ 2006-03-16 18:51 ` rakdver at gcc dot gnu dot org
2006-03-28 22:44 ` sebastian dot pop at cri dot ensmp dot fr
` (13 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2006-03-16 18:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rakdver at gcc dot gnu dot org 2006-03-16 18:51 -------
More precisely, the correct chrec would be
(int) (char) {0,+,1}
since we assume signed chrecs do not overflow.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26719
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/26719] [4.1/4.2 Regression] Computed (integer) table changes with -O
2006-03-16 18:19 [Bug c/26719] New: Computed (integer) table changes with -O kmshanah at disenchant dot net
` (2 preceding siblings ...)
2006-03-16 18:51 ` rakdver at gcc dot gnu dot org
@ 2006-03-28 22:44 ` sebastian dot pop at cri dot ensmp dot fr
2006-04-16 19:02 ` mmitchel at gcc dot gnu dot org
` (12 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: sebastian dot pop at cri dot ensmp dot fr @ 2006-03-28 22:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from sebastian dot pop at cri dot ensmp dot fr 2006-03-28 22:44 -------
Created an attachment (id=11146)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11146&action=view)
first step
with this patch scev returns (int) (char) {0,+,1} but then
chrec_convert_aggressive is removing the casts and the result
is just {0,+,1}.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26719
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/26719] [4.1/4.2 Regression] Computed (integer) table changes with -O
2006-03-16 18:19 [Bug c/26719] New: Computed (integer) table changes with -O kmshanah at disenchant dot net
` (3 preceding siblings ...)
2006-03-28 22:44 ` sebastian dot pop at cri dot ensmp dot fr
@ 2006-04-16 19:02 ` mmitchel at gcc dot gnu dot org
2006-04-27 11:24 ` rguenth at gcc dot gnu dot org
` (11 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-04-16 19:02 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26719
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/26719] [4.1/4.2 Regression] Computed (integer) table changes with -O
2006-03-16 18:19 [Bug c/26719] New: Computed (integer) table changes with -O kmshanah at disenchant dot net
` (4 preceding siblings ...)
2006-04-16 19:02 ` mmitchel at gcc dot gnu dot org
@ 2006-04-27 11:24 ` rguenth at gcc dot gnu dot org
2006-05-14 14:25 ` steven at gcc dot gnu dot org
` (10 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-04-27 11:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from rguenth at gcc dot gnu dot org 2006-04-27 11:23 -------
Still happens.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu dot
| |org
Last reconfirmed|2006-03-16 18:24:54 |2006-04-27 11:23:56
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26719
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/26719] [4.1/4.2 Regression] Computed (integer) table changes with -O
2006-03-16 18:19 [Bug c/26719] New: Computed (integer) table changes with -O kmshanah at disenchant dot net
` (5 preceding siblings ...)
2006-04-27 11:24 ` rguenth at gcc dot gnu dot org
@ 2006-05-14 14:25 ` steven at gcc dot gnu dot org
2006-05-14 14:49 ` rakdver at gcc dot gnu dot org
` (9 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: steven at gcc dot gnu dot org @ 2006-05-14 14:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from steven at gcc dot gnu dot org 2006-05-14 14:25 -------
Seb, wrong code regression in your code. Are you working on this??
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26719
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/26719] [4.1/4.2 Regression] Computed (integer) table changes with -O
2006-03-16 18:19 [Bug c/26719] New: Computed (integer) table changes with -O kmshanah at disenchant dot net
` (6 preceding siblings ...)
2006-05-14 14:25 ` steven at gcc dot gnu dot org
@ 2006-05-14 14:49 ` rakdver at gcc dot gnu dot org
2006-05-20 19:27 ` rakdver at gcc dot gnu dot org
` (8 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2006-05-14 14:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from rakdver at gcc dot gnu dot org 2006-05-14 14:49 -------
(In reply to comment #4)
> Created an attachment (id=11146)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11146&action=view) [edit]
> first step
>
> with this patch scev returns (int) (char) {0,+,1} but then
> chrec_convert_aggressive is removing the casts and the result
> is just {0,+,1}.
This sounds suspicious, the result after chrec_convert_aggressive
should be (int) [0,+,1] (where the type of 0 and 1 is char).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26719
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/26719] [4.1/4.2 Regression] Computed (integer) table changes with -O
2006-03-16 18:19 [Bug c/26719] New: Computed (integer) table changes with -O kmshanah at disenchant dot net
` (7 preceding siblings ...)
2006-05-14 14:49 ` rakdver at gcc dot gnu dot org
@ 2006-05-20 19:27 ` rakdver at gcc dot gnu dot org
2006-05-24 22:56 ` rakdver at gcc dot gnu dot org
` (7 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2006-05-20 19:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from rakdver at gcc dot gnu dot org 2006-05-20 19:27 -------
Patch: http://gcc.gnu.org/ml/gcc-patches/2006-05/msg01032.html
--
rakdver at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
URL| |http://gcc.gnu.org/ml/gcc-
| |patches/2006-
| |05/msg01032.html
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26719
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/26719] [4.1/4.2 Regression] Computed (integer) table changes with -O
2006-03-16 18:19 [Bug c/26719] New: Computed (integer) table changes with -O kmshanah at disenchant dot net
` (8 preceding siblings ...)
2006-05-20 19:27 ` rakdver at gcc dot gnu dot org
@ 2006-05-24 22:56 ` rakdver at gcc dot gnu dot org
2006-05-25 2:33 ` mmitchel at gcc dot gnu dot org
` (6 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2006-05-24 22:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from rakdver at gcc dot gnu dot org 2006-05-24 22:55 -------
Subject: Bug 26719
Author: rakdver
Date: Wed May 24 22:55:15 2006
New Revision: 114057
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114057
Log:
PR tree-optimization/27639
PR tree-optimization/26719
* tree-vrp.c (adjust_range_with_scev): Use scev_direction and adjust
call to scev_probably_wraps_p.
* tree-ssa-loop-niter.c (compare_trees, convert_step_widening,
used_in_pointer_arithmetic_p, convert_step): Removed.
(nowrap_type_p): New function.
(scev_probably_wraps_p): Rewritten.
* tree-scalar-evolution.c (instantiate_parameters_1): Do not call
chrec_convert if chrec_convert_aggressive might have been used.
* tree-chrec.c (convert_affine_scev, chrec_convert_1,
scev_direction): New functions.
(chrec_convert): Changed to a wrapper over chrec_convert_1.
* tree-ssa-loop-ivopts.c (idx_find_step): Use convert_affine_scev
instead of convert_step.
* tree-flow.h (scev_probably_wraps_p): Declaration changed.
(convert_step): Declaration removed.
(convert_affine_scev, nowrap_type_p, scev_direction): Declare.
* gcc.dg/pr27639.c: New test.
* gcc.dg/pr26719.c: New test.
* gcc.dg/tree-ssa/scev-cast.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/pr26719.c
trunk/gcc/testsuite/gcc.dg/pr27639.c
trunk/gcc/testsuite/gcc.dg/tree-ssa/scev-cast.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-chrec.c
trunk/gcc/tree-flow.h
trunk/gcc/tree-scalar-evolution.c
trunk/gcc/tree-ssa-loop-ivopts.c
trunk/gcc/tree-ssa-loop-niter.c
trunk/gcc/tree-vrp.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26719
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/26719] [4.1/4.2 Regression] Computed (integer) table changes with -O
2006-03-16 18:19 [Bug c/26719] New: Computed (integer) table changes with -O kmshanah at disenchant dot net
` (9 preceding siblings ...)
2006-05-24 22:56 ` rakdver at gcc dot gnu dot org
@ 2006-05-25 2:33 ` mmitchel at gcc dot gnu dot org
2006-05-25 17:09 ` [Bug tree-optimization/26719] [4.1 " pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-05-25 2:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from mmitchel at gcc dot gnu dot org 2006-05-25 02:31 -------
Will not be fixed in 4.1.1; adjust target milestone to 4.1.2.
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.1.1 |4.1.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26719
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/26719] [4.1 Regression] Computed (integer) table changes with -O
2006-03-16 18:19 [Bug c/26719] New: Computed (integer) table changes with -O kmshanah at disenchant dot net
` (10 preceding siblings ...)
2006-05-25 2:33 ` mmitchel at gcc dot gnu dot org
@ 2006-05-25 17:09 ` pinskia at gcc dot gnu dot org
2006-07-24 8:26 ` rguenth at gcc dot gnu dot org
` (4 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-25 17:09 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from pinskia at gcc dot gnu dot org 2006-05-25 17:09 -------
Fixed on the mainline at least.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |4.1.0 4.1.1
Known to work| |4.0.3 4.2.0
Summary|[4.1/4.2 Regression] |[4.1 Regression] Computed
|Computed (integer) table |(integer) table changes with
|changes with -O |-O
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26719
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/26719] [4.1 Regression] Computed (integer) table changes with -O
2006-03-16 18:19 [Bug c/26719] New: Computed (integer) table changes with -O kmshanah at disenchant dot net
` (11 preceding siblings ...)
2006-05-25 17:09 ` [Bug tree-optimization/26719] [4.1 " pinskia at gcc dot gnu dot org
@ 2006-07-24 8:26 ` rguenth at gcc dot gnu dot org
2006-07-24 8:30 ` rguenth at gcc dot gnu dot org
` (3 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-07-24 8:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from rguenth at gcc dot gnu dot org 2006-07-24 08:26 -------
Subject: Bug 26719
Author: rguenth
Date: Mon Jul 24 08:25:57 2006
New Revision: 115709
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115709
Log:
2006-07-21 Richard Guenther <rguenther@suse.de>
PR tree-optimization/27795
PR tree-optimization/27639
PR tree-optimization/26719
Backport from mainline
2006-05-24 Zdenek Dvorak <dvorakz@suse.cz>
* tree-vrp.c (adjust_range_with_scev): Use scev_direction and adjust
call to scev_probably_wraps_p.
* tree-ssa-loop-niter.c (compare_trees, convert_step_widening,
used_in_pointer_arithmetic_p, convert_step): Removed.
(nowrap_type_p): New function.
(scev_probably_wraps_p): Rewritten.
* tree-scalar-evolution.c (instantiate_parameters_1): Do not call
chrec_convert if chrec_convert_aggressive might have been used.
* tree-chrec.c (convert_affine_scev, chrec_convert_1,
scev_direction): New functions.
(chrec_convert): Changed to a wrapper over chrec_convert_1.
* tree-ssa-loop-ivopts.c (idx_find_step): Use convert_affine_scev
instead of convert_step.
* tree-flow.h (scev_probably_wraps_p): Declaration changed.
(convert_step): Declaration removed.
(convert_affine_scev, nowrap_type_p, scev_direction): Declare.
* gcc.dg/pr27639.c: New test.
* gcc.dg/pr26719.c: New test.
* gcc.dg/tree-ssa/scev-cast.c: New test.
Added:
branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/pr26719.c
- copied unchanged from r114057, trunk/gcc/testsuite/gcc.dg/pr26719.c
branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/pr27639.c
- copied unchanged from r114057, trunk/gcc/testsuite/gcc.dg/pr27639.c
branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/tree-ssa/scev-cast.c
- copied unchanged from r114057,
trunk/gcc/testsuite/gcc.dg/tree-ssa/scev-cast.c
Modified:
branches/gcc-4_1-branch/gcc/ChangeLog
branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
branches/gcc-4_1-branch/gcc/tree-chrec.c
branches/gcc-4_1-branch/gcc/tree-flow.h
branches/gcc-4_1-branch/gcc/tree-scalar-evolution.c
branches/gcc-4_1-branch/gcc/tree-ssa-loop-ivopts.c
branches/gcc-4_1-branch/gcc/tree-ssa-loop-niter.c
branches/gcc-4_1-branch/gcc/tree-vrp.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26719
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/26719] [4.1 Regression] Computed (integer) table changes with -O
2006-03-16 18:19 [Bug c/26719] New: Computed (integer) table changes with -O kmshanah at disenchant dot net
` (12 preceding siblings ...)
2006-07-24 8:26 ` rguenth at gcc dot gnu dot org
@ 2006-07-24 8:30 ` rguenth at gcc dot gnu dot org
2007-03-23 15:38 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-07-24 8:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from rguenth at gcc dot gnu dot org 2006-07-24 08:29 -------
Fixed.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26719
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/26719] [4.1 Regression] Computed (integer) table changes with -O
2006-03-16 18:19 [Bug c/26719] New: Computed (integer) table changes with -O kmshanah at disenchant dot net
` (13 preceding siblings ...)
2006-07-24 8:30 ` rguenth at gcc dot gnu dot org
@ 2007-03-23 15:38 ` pinskia at gcc dot gnu dot org
2007-03-23 15:52 ` thutt at vmware dot com
2007-03-23 15:54 ` pinskia at gcc dot gnu dot org
16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-03-23 15:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from pinskia at gcc dot gnu dot org 2007-03-23 15:37 -------
*** Bug 31327 has been marked as a duplicate of this bug. ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |thutt at vmware dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26719
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/26719] [4.1 Regression] Computed (integer) table changes with -O
2006-03-16 18:19 [Bug c/26719] New: Computed (integer) table changes with -O kmshanah at disenchant dot net
` (14 preceding siblings ...)
2007-03-23 15:38 ` pinskia at gcc dot gnu dot org
@ 2007-03-23 15:52 ` thutt at vmware dot com
2007-03-23 15:54 ` pinskia at gcc dot gnu dot org
16 siblings, 0 replies; 18+ messages in thread
From: thutt at vmware dot com @ 2007-03-23 15:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from thutt at vmware dot com 2007-03-23 15:51 -------
In regards to comment #13: In what tarball is this defect fixed?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26719
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/26719] [4.1 Regression] Computed (integer) table changes with -O
2006-03-16 18:19 [Bug c/26719] New: Computed (integer) table changes with -O kmshanah at disenchant dot net
` (15 preceding siblings ...)
2007-03-23 15:52 ` thutt at vmware dot com
@ 2007-03-23 15:54 ` pinskia at gcc dot gnu dot org
16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-03-23 15:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #16 from pinskia at gcc dot gnu dot org 2007-03-23 15:54 -------
> In regards to comment #13: In what tarball is this defect fixed?
The 4.1.2 release as indicated by the target milestone and the known to work
field.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work|4.0.3 4.2.0 |4.0.3 4.2.0 4.1.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26719
^ permalink raw reply [flat|nested] 18+ messages in thread