This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/64191] [4.9/5 Regression] -march=native messes up dead code elimination in loop calling dtor
- From: "rguenth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 08 Dec 2014 13:49:58 +0000
- Subject: [Bug c++/64191] [4.9/5 Regression] -march=native messes up dead code elimination in loop calling dtor
- Auto-submitted: auto-generated
- References: <bug-64191-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64191
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2014-12-08
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Target Milestone|--- |4.9.3
Summary|-march=native messes up |[4.9/5 Regression]
|dead code elimination in |-march=native messes up
|loop calling dtor |dead code elimination in
| |loop calling dtor
Ever confirmed|0 |1
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Hmm, on the 4.9 branch we vectorize the clobber and cannot recover from that
(nor do we remove the loop earlier - because of that as well I guess).
void bar_dtor_loop(Bar*, unsigned int) (struct Bar * p, unsigned int n)
{
...
<bb 6>:
# e_13 = PHI <e_9(5), e_10(8)>
e_10 = e_13 + 18446744073709551612;
*e_10 ={v} {CLOBBER};
if (p_4(D) < e_10)
goto <bb 8>;
else
goto <bb 7>;
<bb 8>:
goto <bb 6>;
...
after vectorization:
<bb 7>:
# e_13 = PHI <e_9(6), e_10(14)>
# vect_vec_iv_.19_45 = PHI <vect_cst_.17_43(6), vect_vec_iv_.19_46(14)>
# ivtmp_11 = PHI <0(6), ivtmp_49(14)>
vect_vec_iv_.19_46 = vect_vec_iv_.19_45 + vect_cst_.18_44;
vect_e_10.20_48 = vect_vec_iv_.19_45 + vect_cst_.21_47;
e_10 = e_13 + 18446744073709551612;
ivtmp_49 = ivtmp_11 + 1;
if (ivtmp_49 < bnd.13_20)
goto <bb 14>;
else
goto <bb 10>;
...
<bb 8>:
# e_24 = PHI <e_26(9), e_33(11)>
e_26 = e_24 + 18446744073709551612;
*e_26 ={v} {CLOBBER};
if (p_4(D) < e_26)
goto <bb 9>;
else
goto <bb 12>;
works fine with GCC 4.8.