This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/64031] (un-)conditional execution state is not preserved by PRE/sink
- 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, 24 Nov 2014 11:20:41 +0000
- Subject: [Bug tree-optimization/64031] (un-)conditional execution state is not preserved by PRE/sink
- Auto-submitted: auto-generated
- References: <bug-64031-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64031
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-11-24
Blocks| |53947
Summary|Vectorization of max/min is |(un-)conditional execution
|not robust enough |state is not preserved by
| |PRE/sink
Ever confirmed|0 |1
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
The issue is that PRE optimizes this to
f2_11 = f2_10 * f2_10;
if (f2_10 < f2_11)
goto <bb 5>;
else
goto <bb 4>;
<bb 4>:
pretmp_25 = f2_11 * f2_11;
<bb 5>:
# prephitmp_26 = PHI <f2_11(3), pretmp_25(4)>
*_9 = prephitmp_26;
and f2_11 * f2_11 may trap thus ifcvt refuses to execute it unconditionally
(but only PRE made it executed conditionally).
Thus "confirmed" that both PRE and code sinking can make stmts executed
conditionally while they were not so before which can pessimize transforms
done by later passes such as LIM and if-conversion.