This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/36115] [4.2 Regression] wrong code generated with optimization on x86-64
- From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 3 May 2008 09:32:33 -0000
- Subject: [Bug tree-optimization/36115] [4.2 Regression] wrong code generated with optimization on x86-64
- References: <bug-36115-16140@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from rguenth at gcc dot gnu dot org 2008-05-03 09:32 -------
Confirmed. On the tree level we get aliasing wrong again:
<bb 2>:
# VUSE <n_50>;
D.30804_7 = n;
# VUSE <SMT.294_51>;
D.30805_8 = s_3->x;
if (D.30804_7 < D.30805_8) goto <L3>; else goto <L5>;
<L3>:;
__b_9 = &s_3->x;
# __b_2 = PHI <__b_9(3), &n(2)>;
<L5>:;
# VUSE <n_50>;
# VUSE <D.30570_14>;
D.30813_12 = *__b_2;
# D.30570_15 = V_MUST_DEF <D.30570_14>;
D.30570 = 2;
if (D.30813_12 > 2) goto <L6>; else goto <L8>;
<L6>:;
__b_20 = &s_3->x;
# __b_1 = PHI <__b_20(5), &D.30570(4)>;
<L8>:;
# VUSE <n_50>;
# VUSE <D.30570_15>;
D.30636_23 = *__b_1;
DSE deleted the intermediate store to s_3->x:
# VUSE <n_50>;
# VUSE <D.30570_14>;
D.30813_12 = *__b_2;
- # SMT.294_52 = V_MAY_DEF <SMT.294_51>;
- s_3->x = D.30813_12;
# D.30570_15 = V_MUST_DEF <D.30570_14>;
D.30570 = 2;
thus, a workaround is -fno-tree-dse.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Component|target |tree-optimization
Ever Confirmed|0 |1
Keywords| |alias, wrong-code
Known to work|4.1.3 |4.1.3 4.3.0
Last reconfirmed|0000-00-00 00:00:00 |2008-05-03 09:32:16
date| |
Summary|wrong code generated with |[4.2 Regression] wrong code
|optimization on x86-64 |generated with optimization
| |on x86-64
Target Milestone|--- |4.2.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36115