public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/34099] New: optimizer problem
@ 2007-11-15 6:56 rwgk at yahoo dot com
2007-11-15 6:57 ` [Bug c++/34099] " rwgk at yahoo dot com
` (16 more replies)
0 siblings, 17 replies; 18+ messages in thread
From: rwgk at yahoo dot com @ 2007-11-15 6:56 UTC (permalink / raw)
To: gcc-bugs
Platform:
Fedora release 7 (Moonshine)
Linux idle.lbl.gov 2.6.22.9-91.fc7 #1 SMP Thu Sep 27 20:47:39 EDT 2007 x86_64
x86_64 x86_64 GNU/Linux
% g++ -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: /net/rosie/scratch2/rwgk/gcc_trunk/configure
--prefix=/net/cci-filer1/vol1/tmp/rwgk/gcc_trunk_130159_x86_64_fc7
--enable-languages=c,c++,fortran --with-mpfr=/usr
Thread model: posix
gcc version 4.3.0 20071113 (experimental) (GCC)
I'll attach a small reproducer.
It works with -O0:
% g++ -O0 -Wall multiply_bug.cpp -fno-strict-aliasing && ./a.out
(7,4)
But doesn't with -O1 or higher:
% g++ -O1 -Wall multiply_bug.cpp -fno-strict-aliasing && ./a.out
(0,0)
The reproducer #includes complex. I'm guessing it wouldn't be
hard to reduce the reproducer if necessary.
Ralf
--
Summary: optimizer problem
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rwgk at yahoo dot com
GCC build triplet: x86_64-unknown-linux-gnu
GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34099
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug c++/34099] optimizer problem
2007-11-15 6:56 [Bug c++/34099] New: optimizer problem rwgk at yahoo dot com
@ 2007-11-15 6:57 ` rwgk at yahoo dot com
2007-11-15 10:21 ` [Bug tree-optimization/34099] [4.3 Regression] " rguenth at gcc dot gnu dot org
` (15 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rwgk at yahoo dot com @ 2007-11-15 6:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rwgk at yahoo dot com 2007-11-15 06:56 -------
Created an attachment (id=14554)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14554&action=view)
reproducer
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34099
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/34099] [4.3 Regression] optimizer problem
2007-11-15 6:56 [Bug c++/34099] New: optimizer problem rwgk at yahoo dot com
2007-11-15 6:57 ` [Bug c++/34099] " rwgk at yahoo dot com
@ 2007-11-15 10:21 ` rguenth at gcc dot gnu dot org
2007-11-15 14:56 ` rguenth at gcc dot gnu dot org
` (14 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-11-15 10:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rguenth at gcc dot gnu dot org 2007-11-15 10:21 -------
Confirmed. Shorter testcase:
#include <complex>
#include <iostream>
typedef std::complex<double> NumType;
void
multiply(NumType a, NumType b, unsigned ac, NumType &ab)
{
NumType s;
for (unsigned j=0; j<ac; j++)
s = a * b;
ab = s;
}
int main()
{
NumType a(1,2), b(3,-2), c;
multiply(a, b, 1, c);
std::cout << c << std::endl;
return 0;
}
Looks like another SRA problem.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |aoliva at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Component|c++ |tree-optimization
Ever Confirmed|0 |1
Keywords| |wrong-code
Known to fail| |4.3.0
Known to work| |4.2.2
Last reconfirmed|0000-00-00 00:00:00 |2007-11-15 10:21:31
date| |
Summary|optimizer problem |[4.3 Regression] optimizer
| |problem
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34099
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/34099] [4.3 Regression] optimizer problem
2007-11-15 6:56 [Bug c++/34099] New: optimizer problem rwgk at yahoo dot com
2007-11-15 6:57 ` [Bug c++/34099] " rwgk at yahoo dot com
2007-11-15 10:21 ` [Bug tree-optimization/34099] [4.3 Regression] " rguenth at gcc dot gnu dot org
@ 2007-11-15 14:56 ` rguenth at gcc dot gnu dot org
2007-11-15 15:08 ` rguenth at gcc dot gnu dot org
` (13 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-11-15 14:56 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rguenth at gcc dot gnu dot org 2007-11-15 14:56 -------
Uhm, this goes wrong in CCP. (w/o SRA the failure doesn't trigger though)
Before CCP we have:
void multiply(NumType, NumType, unsigned int, NumType&) (a, b, ac, ab)
{
double s$_M_value$real;
double s$_M_value$imag;
double b$_M_value$real;
double b$_M_value$imag;
double a$_M_value$imag;
double a$_M_value$real;
complex double __t;
complex double D.26933;
complex double D.26932;
double D.26931;
double D.26929;
unsigned int j;
<bb 2>:
# VUSE <SFT.90_33(D)>
a$_M_value$real_21 = REALPART_EXPR <a._M_value>;
# VUSE <SFT.91_34(D)>
a$_M_value$imag_22 = IMAGPART_EXPR <a._M_value>;
# VUSE <SFT.93_35(D)>
b$_M_value$imag_23 = IMAGPART_EXPR <b._M_value>;
# VUSE <SFT.92_36(D)>
b$_M_value$real_24 = REALPART_EXPR <b._M_value>;
s$_M_value$real_25 = 0.0;
s$_M_value$imag_26 = 0.0;
goto <bb 4>;
<bb 3>:
D.26929_10 = IMAGPART_EXPR <__t_6(D)>;
__t_11 = COMPLEX_EXPR <b$_M_value$real_24, D.26929_10>;
D.26931_13 = REALPART_EXPR <__t_11>;
__t_14 = COMPLEX_EXPR <D.26931_13, b$_M_value$imag_23>;
D.26932_15 = COMPLEX_EXPR <a$_M_value$real_21, a$_M_value$imag_22>;
D.26933_16 = __t_14 * D.26932_15;
s$_M_value$imag_17 = IMAGPART_EXPR <D.26933_16>;
s$_M_value$real_18 = REALPART_EXPR <D.26933_16>;
j_4 = j_1 + 1;
<bb 4>:
# s$_M_value$real_20 = PHI <s$_M_value$real_25(2), s$_M_value$real_18(3)>
# s$_M_value$imag_19 = PHI <s$_M_value$imag_26(2), s$_M_value$imag_17(3)>
# j_1 = PHI <0(2), j_4(3)>
if (j_1 < ac_3(D))
goto <bb 3>;
else
goto <bb 5>;
<bb 5>:
# SMT.98_38 = VDEF <SMT.98_37(D)>
IMAGPART_EXPR <ab_5(D)->_M_value> = s$_M_value$imag_19;
# SMT.98_39 = VDEF <SMT.98_38>
REALPART_EXPR <ab_5(D)->_M_value> = s$_M_value$real_20;
return;
}
where I can see nothing wrong. Now CCP propagates s$_M_value$real_25 and
s$_M_value$imag_26 into the PHI nodes, but somehow does not simulate BB3:
Visiting PHI node: s$_M_value$real_20 = PHI <s$_M_value$real_25(2),
s$_M_value$real_18(3)>
Argument #0 (2 -> 4 executable)
s$_M_value$real_25 Value: CONSTANT 0.0
Argument #1 (3 -> 4 executable)
s$_M_value$real_18 Value: UNDEFINED
PHI node value: CONSTANT 0.0
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dnovillo at google dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34099
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/34099] [4.3 Regression] optimizer problem
2007-11-15 6:56 [Bug c++/34099] New: optimizer problem rwgk at yahoo dot com
` (2 preceding siblings ...)
2007-11-15 14:56 ` rguenth at gcc dot gnu dot org
@ 2007-11-15 15:08 ` rguenth at gcc dot gnu dot org
2007-11-15 15:40 ` rguenth at gcc dot gnu dot org
` (12 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-11-15 15:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from rguenth at gcc dot gnu dot org 2007-11-15 15:08 -------
This looks like this old bug that evaluate_stmt() sets results to UNDEFINED.
As
we visit
D.26933_16 = __t_14 * D.26932_15;
the result should become VARYING, but we make it UNDEFINED. Because also
likely_value () returns UNDEFINED for it. Because in the process of setting
__t we use undefined operands (but those get overwritten).
D.26929_10 = IMAGPART_EXPR <__t_6(D)>;
__t_11 = COMPLEX_EXPR <b$_M_value$real_24, D.26929_10>;
D.26931_13 = REALPART_EXPR <__t_11>;
__t_14 = COMPLEX_EXPR <D.26931_13, b$_M_value$imag_23>;
D.26932_15 = COMPLEX_EXPR <a$_M_value$real_21, a$_M_value$imag_22>;
D.26933_16 = __t_14 * D.26932_15;
so at least
has_constant_operand = false;
FOR_EACH_SSA_TREE_OPERAND (use, stmt, iter, SSA_OP_USE | SSA_OP_VUSE)
{
prop_value_t *val = get_value (use);
if (val->lattice_val == UNDEFINED)
return UNDEFINED;
if (val->lattice_val == CONSTANT)
has_constant_operand = true;
}
doesn't look conservatively correct, because we pro-actively prefer UNDEFINED
here.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34099
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/34099] [4.3 Regression] optimizer problem
2007-11-15 6:56 [Bug c++/34099] New: optimizer problem rwgk at yahoo dot com
` (3 preceding siblings ...)
2007-11-15 15:08 ` rguenth at gcc dot gnu dot org
@ 2007-11-15 15:40 ` rguenth at gcc dot gnu dot org
2007-11-15 15:44 ` ebotcazou at gcc dot gnu dot org
` (11 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-11-15 15:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from rguenth at gcc dot gnu dot org 2007-11-15 15:40 -------
That is, a certain class of operations (like COMPLEX_EXPR) do not fulfil the
constraint that if one operand is UNDEFINED the result is UNDEFINED as well.
For example MIN_EXPR <INT_MIN, UNDEFINED>, or MAX_EXPR <INT_MAX, UNDEFINED>
are of such kind as well. No idea if we want a white-list here instead.
BIT_AND_EXPR <UNDEFINED, 0> is also not UNDEFINED.
(all of the above not with actual constants as defined arg, but VARYING ones)
I have a patch.
--
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-11-15 10:21:31 |2007-11-15 15:40:13
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34099
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/34099] [4.3 Regression] optimizer problem
2007-11-15 6:56 [Bug c++/34099] New: optimizer problem rwgk at yahoo dot com
` (4 preceding siblings ...)
2007-11-15 15:40 ` rguenth at gcc dot gnu dot org
@ 2007-11-15 15:44 ` ebotcazou at gcc dot gnu dot org
2007-11-15 15:51 ` rguenther at suse dot de
` (10 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: ebotcazou at gcc dot gnu dot org @ 2007-11-15 15:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from ebotcazou at gcc dot gnu dot org 2007-11-15 15:44 -------
> That is, a certain class of operations (like COMPLEX_EXPR) do not fulfil the
> constraint that if one operand is UNDEFINED the result is UNDEFINED as well.
Is the problem somehow related to PR middle-end/33088?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34099
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/34099] [4.3 Regression] optimizer problem
2007-11-15 6:56 [Bug c++/34099] New: optimizer problem rwgk at yahoo dot com
` (5 preceding siblings ...)
2007-11-15 15:44 ` ebotcazou at gcc dot gnu dot org
@ 2007-11-15 15:51 ` rguenther at suse dot de
2007-11-15 16:04 ` rguenth at gcc dot gnu dot org
` (9 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rguenther at suse dot de @ 2007-11-15 15:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from rguenther at suse dot de 2007-11-15 15:51 -------
Subject: Re: [4.3 Regression] optimizer problem
On Thu, 15 Nov 2007, ebotcazou at gcc dot gnu dot org wrote:
> ------- Comment #6 from ebotcazou at gcc dot gnu dot org 2007-11-15 15:44 -------
> > That is, a certain class of operations (like COMPLEX_EXPR) do not fulfil the
> > constraint that if one operand is UNDEFINED the result is UNDEFINED as well.
>
> Is the problem somehow related to PR middle-end/33088?
It looks like so, but I cannot reproduce the problem in PR33088.
Richard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34099
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/34099] [4.3 Regression] optimizer problem
2007-11-15 6:56 [Bug c++/34099] New: optimizer problem rwgk at yahoo dot com
` (6 preceding siblings ...)
2007-11-15 15:51 ` rguenther at suse dot de
@ 2007-11-15 16:04 ` rguenth at gcc dot gnu dot org
2007-11-15 16:06 ` rguenth at gcc dot gnu dot org
` (8 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-11-15 16:04 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from rguenth at gcc dot gnu dot org 2007-11-15 16:04 -------
Which doesn't work :( Unassigning.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|rguenth at gcc dot gnu dot |unassigned at gcc dot gnu
|org |dot org
Status|ASSIGNED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34099
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/34099] [4.3 Regression] optimizer problem
2007-11-15 6:56 [Bug c++/34099] New: optimizer problem rwgk at yahoo dot com
` (7 preceding siblings ...)
2007-11-15 16:04 ` rguenth at gcc dot gnu dot org
@ 2007-11-15 16:06 ` rguenth at gcc dot gnu dot org
2007-11-15 16:08 ` rguenth at gcc dot gnu dot org
` (7 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-11-15 16:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from rguenth at gcc dot gnu dot org 2007-11-15 16:06 -------
Created an attachment (id=14557)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14557&action=view)
broken patch
It miscompiles gengtype. I remember problems with changing likely_value in
similar ways back in time. The other option is to not ignore UNDEFINED lattice
values in ccp_lattice_meet but do
any M UNDEFINED = VARYING
instead of
any M UNDEFINED = any
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34099
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/34099] [4.3 Regression] optimizer problem
2007-11-15 6:56 [Bug c++/34099] New: optimizer problem rwgk at yahoo dot com
` (8 preceding siblings ...)
2007-11-15 16:06 ` rguenth at gcc dot gnu dot org
@ 2007-11-15 16:08 ` rguenth at gcc dot gnu dot org
2007-11-15 16:38 ` rguenth at gcc dot gnu dot org
` (6 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-11-15 16:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from rguenth at gcc dot gnu dot org 2007-11-15 16:08 -------
Created an attachment (id=14558)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14558&action=view)
new broken patch
Err, that was an old patch.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #14557|0 |1
is obsolete| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34099
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/34099] [4.3 Regression] optimizer problem
2007-11-15 6:56 [Bug c++/34099] New: optimizer problem rwgk at yahoo dot com
` (9 preceding siblings ...)
2007-11-15 16:08 ` rguenth at gcc dot gnu dot org
@ 2007-11-15 16:38 ` rguenth at gcc dot gnu dot org
2007-11-15 17:10 ` rguenth at gcc dot gnu dot org
` (5 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-11-15 16:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from rguenth at gcc dot gnu dot org 2007-11-15 16:38 -------
Oh, trivial error. Looking again tomorrow.
--
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-11-15 15:40:13 |2007-11-15 16:38:30
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34099
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/34099] [4.3 Regression] optimizer problem
2007-11-15 6:56 [Bug c++/34099] New: optimizer problem rwgk at yahoo dot com
` (10 preceding siblings ...)
2007-11-15 16:38 ` rguenth at gcc dot gnu dot org
@ 2007-11-15 17:10 ` rguenth at gcc dot gnu dot org
2007-11-15 17:17 ` rguenth at gcc dot gnu dot org
` (4 subsequent siblings)
16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-11-15 17:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from rguenth at gcc dot gnu dot org 2007-11-15 17:10 -------
Trivial testcase we get wrong with the current scheme:
int foo (int b, int c)
{
int x;
if (b)
return x & c;
else
return 1;
}
extern void abort (void);
int main()
{
if (foo(1, 0) != 0)
abort ();
return 0;
}
because we say that x & c is UNDEFINED (and so ignore its value in the
otherwise CONSTANT PHI).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34099
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/34099] [4.3 Regression] optimizer problem
2007-11-15 6:56 [Bug c++/34099] New: optimizer problem rwgk at yahoo dot com
` (11 preceding siblings ...)
2007-11-15 17:10 ` rguenth at gcc dot gnu dot org
@ 2007-11-15 17:17 ` rguenth at gcc dot gnu dot org
2007-11-16 10:10 ` 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 @ 2007-11-15 17:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from rguenth at gcc dot gnu dot org 2007-11-15 17:17 -------
I think this has been caused by the fix for PR29738.
Author: rakdver
Date: Thu Nov 9 00:09:43 2006
New Revision: 118602
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=118602
Log:
PR tree-optimization/29738
* tree-ssa-ccp.c: Remove UNKNOWN_VAL from comments.
(ccp_lattice_t): Remove UNKNOWN_VAL.
(dump_lattice_value, ccp_lattice_meet, ccp_visit_phi_node):
Do not handle UNKNOWN_VAL.
(get_default_value): Set initial value of virtual operands to
VARYING.
(get_value): Always use get_default_value on uninitialized
operands.
(set_value_varying, surely_varying_stmt_p): New functions.
(set_lattice_value): Do not pass argument to get_value.
Do not handle UNKNOWN_VAL.
(likely_value): Follow the semantics described in the comment.
(ccp_initialize): Use surely_varying_stmt_p. Do not mark
phi nodes DONT_SIMULATE_AGAIN.
(ccp_fold): Do not pass argument to get_value.
(fold_const_aggregate_ref, visit_assignment): Ditto. Do not
handle UNKNOWN_VAL.
* gcc.dg/tree-ssa/ssa-ccp-14.c: New test.
* gcc.dg/tree-ssa/ssa-ccp-15.c: New test.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |29738
nThis| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34099
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/34099] [4.3 Regression] optimizer problem
2007-11-15 6:56 [Bug c++/34099] New: optimizer problem rwgk at yahoo dot com
` (12 preceding siblings ...)
2007-11-15 17:17 ` rguenth at gcc dot gnu dot org
@ 2007-11-16 10:10 ` rguenth at gcc dot gnu dot org
2007-11-16 10:36 ` rguenth 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 @ 2007-11-16 10:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #14 from rguenth at gcc dot gnu dot org 2007-11-16 10:10 -------
Subject: Bug 34099
Author: rguenth
Date: Fri Nov 16 10:10:05 2007
New Revision: 130222
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130222
Log:
2007-11-16 Richard Guenther <rguenther@suse.de>
PR tree-optimization/34099
* tree-ssa-ccp.c (likely_value): Use a whitelist for operators
that produce UNDEFINED result if at least one of its operands
is UNDEFINED. By default the result is only UNDEFINED if all
operands are UNDEFINED.
* g++.dg/torture/pr3499.C: New testcase.
* gcc.c-torture/execute/pr34099.c: Likewise.
Added:
trunk/gcc/testsuite/g++.dg/torture/pr34099.C
trunk/gcc/testsuite/gcc.c-torture/execute/pr34099.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa-ccp.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34099
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/34099] [4.3 Regression] optimizer problem
2007-11-15 6:56 [Bug c++/34099] New: optimizer problem rwgk at yahoo dot com
` (13 preceding siblings ...)
2007-11-16 10:10 ` rguenth at gcc dot gnu dot org
@ 2007-11-16 10:36 ` rguenth at gcc dot gnu dot org
2007-11-19 12:52 ` rguenth at gcc dot gnu dot org
2007-11-19 12:53 ` rguenth at gcc dot gnu dot org
16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-11-16 10:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #15 from rguenth at gcc dot gnu dot org 2007-11-16 10:36 -------
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=34099
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/34099] [4.3 Regression] optimizer problem
2007-11-15 6:56 [Bug c++/34099] New: optimizer problem rwgk at yahoo dot com
` (14 preceding siblings ...)
2007-11-16 10:36 ` rguenth at gcc dot gnu dot org
@ 2007-11-19 12:52 ` rguenth at gcc dot gnu dot org
2007-11-19 12:53 ` rguenth at gcc dot gnu dot org
16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-11-19 12:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #16 from rguenth at gcc dot gnu dot org 2007-11-19 12:52 -------
Subject: Bug 34099
Author: rguenth
Date: Mon Nov 19 12:52:09 2007
New Revision: 130289
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130289
Log:
2007-11-19 Richard Guenther <rguenther@suse.de>
PR tree-optimization/34099
* tree-ssa-ccp.c (likely_value): Exclude all but PLUS_EXPR,
MINUS_EXPR and POINTER_PLUS_EXPR from handling as UNDEFINED
if only one operand is undefined.
* gcc.c-torture/execute/pr34099-2.c: New testcase.
Added:
trunk/gcc/testsuite/gcc.c-torture/execute/pr34099-2.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/tree-ssa-ccp.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34099
^ permalink raw reply [flat|nested] 18+ messages in thread
* [Bug tree-optimization/34099] [4.3 Regression] optimizer problem
2007-11-15 6:56 [Bug c++/34099] New: optimizer problem rwgk at yahoo dot com
` (15 preceding siblings ...)
2007-11-19 12:52 ` rguenth at gcc dot gnu dot org
@ 2007-11-19 12:53 ` rguenth at gcc dot gnu dot org
16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2007-11-19 12:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #17 from rguenth at gcc dot gnu dot org 2007-11-19 12:53 -------
Subject: Bug 34099
Author: rguenth
Date: Mon Nov 19 12:52:58 2007
New Revision: 130290
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=130290
Log:
2007-11-19 Richard Guenther <rguenther@suse.de>
PR tree-optimization/34099
* tree-ssa-ccp.c (likely_value): Exclude all but PLUS_EXPR,
MINUS_EXPR and POINTER_PLUS_EXPR from handling as UNDEFINED
if only one operand is undefined.
* gcc.c-torture/execute/pr34099-2.c: New testcase.
Modified:
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34099
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2007-11-19 12:53 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-15 6:56 [Bug c++/34099] New: optimizer problem rwgk at yahoo dot com
2007-11-15 6:57 ` [Bug c++/34099] " rwgk at yahoo dot com
2007-11-15 10:21 ` [Bug tree-optimization/34099] [4.3 Regression] " rguenth at gcc dot gnu dot org
2007-11-15 14:56 ` rguenth at gcc dot gnu dot org
2007-11-15 15:08 ` rguenth at gcc dot gnu dot org
2007-11-15 15:40 ` rguenth at gcc dot gnu dot org
2007-11-15 15:44 ` ebotcazou at gcc dot gnu dot org
2007-11-15 15:51 ` rguenther at suse dot de
2007-11-15 16:04 ` rguenth at gcc dot gnu dot org
2007-11-15 16:06 ` rguenth at gcc dot gnu dot org
2007-11-15 16:08 ` rguenth at gcc dot gnu dot org
2007-11-15 16:38 ` rguenth at gcc dot gnu dot org
2007-11-15 17:10 ` rguenth at gcc dot gnu dot org
2007-11-15 17:17 ` rguenth at gcc dot gnu dot org
2007-11-16 10:10 ` rguenth at gcc dot gnu dot org
2007-11-16 10:36 ` rguenth at gcc dot gnu dot org
2007-11-19 12:52 ` rguenth at gcc dot gnu dot org
2007-11-19 12:53 ` rguenth at gcc dot gnu dot 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).