* [Bug tree-optimization/33099] [4.2 Regression] Scalar evolutions confusing VRP with pointer values that wrap around
2007-08-17 19:47 [Bug tree-optimization/33099] New: Scalar evolutions confusing VRP with pointer values that wrap around dnovillo at gcc dot gnu dot org
@ 2007-08-17 20:19 ` pinskia at gcc dot gnu dot org
2007-08-17 20:21 ` pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-08-17 20:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2007-08-17 20:18 -------
Confirmed (and yes this was fixed by PtrPlus).
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |wrong-code
Known to fail| |4.2.1
Known to work| |4.3.0 4.1.1
Last reconfirmed|0000-00-00 00:00:00 |2007-08-17 20:18:57
date| |
Summary|Scalar evolutions confusing |[4.2 Regression] Scalar
|VRP with pointer values that|evolutions confusing VRP
|wrap around |with pointer values that
| |wrap around
Target Milestone|--- |4.2.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33099
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/33099] [4.2 Regression] Scalar evolutions confusing VRP with pointer values that wrap around
2007-08-17 19:47 [Bug tree-optimization/33099] New: Scalar evolutions confusing VRP with pointer values that wrap around dnovillo at gcc dot gnu dot org
2007-08-17 20:19 ` [Bug tree-optimization/33099] [4.2 Regression] " pinskia at gcc dot gnu dot org
@ 2007-08-17 20:21 ` pinskia at gcc dot gnu dot org
2007-08-17 20:28 ` dnovillo at google dot com
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-08-17 20:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2007-08-17 20:20 -------
Exposed by:
2006-02-07 Jeff Law <law@redhat.com>
Which added VRP after IV-OPTs.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |law at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33099
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/33099] [4.2 Regression] Scalar evolutions confusing VRP with pointer values that wrap around
2007-08-17 19:47 [Bug tree-optimization/33099] New: Scalar evolutions confusing VRP with pointer values that wrap around dnovillo at gcc dot gnu dot org
2007-08-17 20:19 ` [Bug tree-optimization/33099] [4.2 Regression] " pinskia at gcc dot gnu dot org
2007-08-17 20:21 ` pinskia at gcc dot gnu dot org
@ 2007-08-17 20:28 ` dnovillo at google dot com
2007-08-17 20:34 ` pinskia at gcc dot gnu dot org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: dnovillo at google dot com @ 2007-08-17 20:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from dnovillo at google dot com 2007-08-17 20:27 -------
Subject: Re: [4.2 Regression] Scalar evolutions
confusing VRP with pointer values that wrap around
On 8/17/07 4:20 PM, pinskia at gcc dot gnu dot org wrote:
> ------- Comment #2 from pinskia at gcc dot gnu dot org 2007-08-17 20:20 -------
> Exposed by:
> 2006-02-07 Jeff Law <law@redhat.com>
>
>
> Which added VRP after IV-OPTs.
No, no that is completely unrelated. This happens in the first VRP
pass. It's all inside adjust_range_with_scev which specifically calls
scalar evolutions code.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33099
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/33099] [4.2 Regression] Scalar evolutions confusing VRP with pointer values that wrap around
2007-08-17 19:47 [Bug tree-optimization/33099] New: Scalar evolutions confusing VRP with pointer values that wrap around dnovillo at gcc dot gnu dot org
` (2 preceding siblings ...)
2007-08-17 20:28 ` dnovillo at google dot com
@ 2007-08-17 20:34 ` pinskia at gcc dot gnu dot org
2007-08-17 20:38 ` dnovillo at google dot com
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-08-17 20:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2007-08-17 20:34 -------
Oh you are correct but this still worked in 4.1.1 though, I have not looked
into what changed between 4.1.1 and 4.2.0 with respect of scev yet.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC|law at gcc dot gnu dot org |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33099
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/33099] [4.2 Regression] Scalar evolutions confusing VRP with pointer values that wrap around
2007-08-17 19:47 [Bug tree-optimization/33099] New: Scalar evolutions confusing VRP with pointer values that wrap around dnovillo at gcc dot gnu dot org
` (3 preceding siblings ...)
2007-08-17 20:34 ` pinskia at gcc dot gnu dot org
@ 2007-08-17 20:38 ` dnovillo at google dot com
2007-08-17 20:43 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: dnovillo at google dot com @ 2007-08-17 20:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from dnovillo at google dot com 2007-08-17 20:37 -------
Subject: Re: [4.2 Regression] Scalar evolutions
confusing VRP with pointer values that wrap around
On 8/17/07 4:34 PM, pinskia at gcc dot gnu dot org wrote:
> ------- Comment #4 from pinskia at gcc dot gnu dot org 2007-08-17 20:34 -------
> Oh you are correct but this still worked in 4.1.1 though, I have not looked
> into what changed between 4.1.1 and 4.2.0 with respect of scev yet.
Since you are looking, two things to check for: (1) IL representation
for the pointer subtraction, and (2) SCEV may have returned an unknown
chrec back in 4.1. Or maybe we still didn't consider pointers to not-wrap.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33099
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/33099] [4.2 Regression] Scalar evolutions confusing VRP with pointer values that wrap around
2007-08-17 19:47 [Bug tree-optimization/33099] New: Scalar evolutions confusing VRP with pointer values that wrap around dnovillo at gcc dot gnu dot org
` (4 preceding siblings ...)
2007-08-17 20:38 ` dnovillo at google dot com
@ 2007-08-17 20:43 ` pinskia at gcc dot gnu dot org
2007-08-18 13:55 ` rguenth at gcc dot gnu dot org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-08-17 20:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pinskia at gcc dot gnu dot org 2007-08-17 20:42 -------
The IR is the same but scev did something different:
Visiting statement:
p_10 = i.0_9 - 1B;
(analyze_scalar_evolution
(loop_nb = 1)
(scalar = p_10)
(get_scalar_evolution
(scalar = p_10)
(scalar_evolution = ))
(analyze_scalar_evolution
(loop_nb = 1)
(scalar = i.0_9)
(get_scalar_evolution
(scalar = i.0_9)
(scalar_evolution = {0B, +, 1B}_1))
(set_scalar_evolution
(scalar = i.0_9)
(scalar_evolution = {0B, +, 1B}_1))
)
(analyze_scalar_evolution
(loop_nb = 1)
(scalar = 1B)
(get_scalar_evolution
(scalar = 1B)
(scalar_evolution = 1B))
)
(set_scalar_evolution
(scalar = p_10)
(scalar_evolution = {4294967295B, +, 1B}_1))
)
(instantiate_parameters
(loop_nb = 1)
(chrec = {4294967295B, +, 1B}_1)
(res = {4294967295B, +, 1B}_1))
Found new range for p_10: VARYING
vs (in 4.2):
Visiting statement:
i.0_4 = (char *) i_23;
(analyze_scalar_evolution
(loop_nb = 1)
(scalar = i.0_4)
(get_scalar_evolution
(scalar = i.0_4)
(scalar_evolution = ))
(analyze_scalar_evolution
(loop_nb = 1)
(scalar = i_23)
(get_scalar_evolution
(scalar = i_23)
(scalar_evolution = {0, +, 1}_1))
(set_scalar_evolution
(scalar = i_23)
(scalar_evolution = {0, +, 1}_1))
)
(analyze_scalar_evolution
(loop_nb = 1)
(scalar = i_1)
(get_scalar_evolution
(scalar = i_1)
(scalar_evolution = {0, +, 1}_1))
(set_scalar_evolution
(scalar = i_1)
(scalar_evolution = {0, +, 1}_1))
)
(analyze_scalar_evolution
(loop_nb = 1)
(scalar = N.1_3)
(get_scalar_evolution
(scalar = N.1_3)
(scalar_evolution = ))
(set_scalar_evolution
(scalar = N.1_3)
(scalar_evolution = N.1_3))
)
(analyze_scalar_evolution
(loop_nb = 1)
(scalar = N.1_3)
(get_scalar_evolution
(scalar = N.1_3)
(scalar_evolution = N.1_3))
(set_scalar_evolution
(scalar = N.1_3)
(scalar_evolution = N.1_3))
)
(analyze_scalar_evolution
(loop_nb = 1)
(scalar = N.1_3)
(get_scalar_evolution
(scalar = N.1_3)
(scalar_evolution = N.1_3))
(set_scalar_evolution
(scalar = N.1_3)
(scalar_evolution = N.1_3))
)
(instantiate_parameters
(loop_nb = 1)
(chrec = N.1_3)
(analyze_scalar_evolution
(loop_nb = 1)
(scalar = N.1_3)
(get_scalar_evolution
(scalar = N.1_3)
(scalar_evolution = N.1_3))
(set_scalar_evolution
(scalar = N.1_3)
(scalar_evolution = N.1_3))
)
(res = scev_not_known))
(analyze_scalar_evolution
(loop_nb = 1)
(scalar = i_8)
(get_scalar_evolution
(scalar = i_8)
(scalar_evolution = ))
(analyze_scalar_evolution
(loop_nb = 1)
(scalar = i_25)
(get_scalar_evolution
(scalar = i_25)
(scalar_evolution = {0, +, 1}_1))
(set_scalar_evolution
(scalar = i_25)
(scalar_evolution = {0, +, 1}_1))
)
(analyze_scalar_evolution
(loop_nb = 1)
(scalar = 1)
(get_scalar_evolution
(scalar = 1)
(scalar_evolution = 1))
)
(set_scalar_evolution
(scalar = i_8)
(scalar_evolution = {1, +, 1}_1))
)
(instantiate_parameters
(loop_nb = 1)
(chrec = {1, +, 1}_1)
(res = {1, +, 1}_1))
Induction variable (int) 1 + 1 * iteration does not wrap in statement i_8 =
i_25 + 1 in loop 1.
Statement i_8 = i_25 + 1 is executed at most 2147483646 (bounded by 2147483646)
+ 1 times in loop 1.
(analyze_scalar_evolution
(loop_nb = 1)
(scalar = i_25)
(get_scalar_evolution
(scalar = i_25)
(scalar_evolution = {0, +, 1}_1))
(set_scalar_evolution
(scalar = i_25)
(scalar_evolution = {0, +, 1}_1))
)
(instantiate_parameters
(loop_nb = 1)
(chrec = {0, +, 1}_1)
(res = {0, +, 1}_1))
Induction variable (int) 0 + 1 * iteration does not wrap in statement i_25 =
ASSERT_EXPR <i_1, i_1 < N.1_3> in loop 1.
Statement i_25 = ASSERT_EXPR <i_1, i_1 < N.1_3> is executed at most 2147483647
(bounded by 2147483647) + 1 times in loop 1.
(set_scalar_evolution
(scalar = i.0_4)
(scalar_evolution = {0B, +, 1B}_1))
)
(instantiate_parameters
(loop_nb = 1)
(chrec = {0B, +, 1B}_1)
(res = {0B, +, 1B}_1))
Found new range for i.0_4: [0B, -1B]
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33099
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/33099] [4.2 Regression] Scalar evolutions confusing VRP with pointer values that wrap around
2007-08-17 19:47 [Bug tree-optimization/33099] New: Scalar evolutions confusing VRP with pointer values that wrap around dnovillo at gcc dot gnu dot org
` (5 preceding siblings ...)
2007-08-17 20:43 ` pinskia at gcc dot gnu dot org
@ 2007-08-18 13:55 ` rguenth at gcc dot gnu dot org
2007-09-05 1:05 ` mmitchel at gcc dot gnu dot org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-08-18 13:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from rguenth at gcc dot gnu dot org 2007-08-18 13:55 -------
SCEV shouldn't generate wrapping pointer chrecs.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |rguenth at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33099
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/33099] [4.2 Regression] Scalar evolutions confusing VRP with pointer values that wrap around
2007-08-17 19:47 [Bug tree-optimization/33099] New: Scalar evolutions confusing VRP with pointer values that wrap around dnovillo at gcc dot gnu dot org
` (6 preceding siblings ...)
2007-08-18 13:55 ` rguenth at gcc dot gnu dot org
@ 2007-09-05 1:05 ` mmitchel at gcc dot gnu dot org
2007-09-21 13:55 ` rguenth at gcc dot gnu dot org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-09-05 1:05 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=33099
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/33099] [4.2 Regression] Scalar evolutions confusing VRP with pointer values that wrap around
2007-08-17 19:47 [Bug tree-optimization/33099] New: Scalar evolutions confusing VRP with pointer values that wrap around dnovillo at gcc dot gnu dot org
` (7 preceding siblings ...)
2007-09-05 1:05 ` mmitchel at gcc dot gnu dot org
@ 2007-09-21 13:55 ` rguenth at gcc dot gnu dot org
2007-10-09 19:27 ` mmitchel at gcc dot gnu dot org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-09-21 13:55 UTC (permalink / raw)
To: gcc-bugs
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2007-08-17 20:18:57 |2007-09-21 13:55:36
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33099
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/33099] [4.2 Regression] Scalar evolutions confusing VRP with pointer values that wrap around
2007-08-17 19:47 [Bug tree-optimization/33099] New: Scalar evolutions confusing VRP with pointer values that wrap around dnovillo at gcc dot gnu dot org
` (8 preceding siblings ...)
2007-09-21 13:55 ` rguenth at gcc dot gnu dot org
@ 2007-10-09 19:27 ` mmitchel at gcc dot gnu dot org
2007-10-10 9:25 ` rguenth at gcc dot gnu dot org
2007-10-10 9:25 ` rguenth at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-10-09 19:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from mmitchel at gcc dot gnu dot org 2007-10-09 19:20 -------
Change target milestone to 4.2.3, as 4.2.2 has been released.
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.2.2 |4.2.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33099
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/33099] [4.2 Regression] Scalar evolutions confusing VRP with pointer values that wrap around
2007-08-17 19:47 [Bug tree-optimization/33099] New: Scalar evolutions confusing VRP with pointer values that wrap around dnovillo at gcc dot gnu dot org
` (9 preceding siblings ...)
2007-10-09 19:27 ` mmitchel at gcc dot gnu dot org
@ 2007-10-10 9:25 ` rguenth at gcc dot gnu dot org
2007-10-10 9:25 ` rguenth at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-10-10 9:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from rguenth at gcc dot gnu dot org 2007-10-10 09:25 -------
Fixed.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33099
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug tree-optimization/33099] [4.2 Regression] Scalar evolutions confusing VRP with pointer values that wrap around
2007-08-17 19:47 [Bug tree-optimization/33099] New: Scalar evolutions confusing VRP with pointer values that wrap around dnovillo at gcc dot gnu dot org
` (10 preceding siblings ...)
2007-10-10 9:25 ` rguenth at gcc dot gnu dot org
@ 2007-10-10 9:25 ` rguenth at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-10-10 9:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from rguenth at gcc dot gnu dot org 2007-10-10 09:24 -------
Subject: Bug 33099
Author: rguenth
Date: Wed Oct 10 09:24:43 2007
New Revision: 129197
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129197
Log:
2007-10-10 Richard Guenther <rguenther@suse.de>
PR tree-optimization/33099
PR tree-optimization/33381
* tree-vrp.c (adjust_range_with_scev): Do not adjust ranges
from pointer typed chrecs.
* gcc.c-torture/execute/pr33099.c: New testcase.
* gcc.c-torture/execute/pr33381.c: Likewise.
Added:
branches/gcc-4_2-branch/gcc/testsuite/gcc.c-torture/execute/pr33099.c
branches/gcc-4_2-branch/gcc/testsuite/gcc.c-torture/execute/pr33381.c
Modified:
branches/gcc-4_2-branch/gcc/ChangeLog
branches/gcc-4_2-branch/gcc/testsuite/ChangeLog
branches/gcc-4_2-branch/gcc/tree-vrp.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33099
^ permalink raw reply [flat|nested] 13+ messages in thread