[Bug tree-optimization/19778] Unnecessary jumps for comparisons
ubizjak at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Sep 29 20:46:00 GMT 2009
------- Comment #3 from ubizjak at gmail dot com 2009-09-29 20:45 -------
This is not alpha specific, but generic tree issue.
The _.optimized dump:
<bb 2>:
if (x_2(D) == 0)
goto <bb 4>;
else
goto <bb 3>;
<bb 3>:
D.2022_3 = x_2(D) + -1;
D.2023_4 = D.2022_3 & x_2(D);
D.2016_9 = D.2023_4 == 0;
<bb 4>:
# D.2016_1 = PHI <D.2016_9(3), 1(2)>
return D.2016_1;
However, by changing boolean "or" to integer "or":
<bb 2>:
D.2017_2 = x_1(D) == 0;
D.2018_3 = x_1(D) + -1;
D.2019_4 = D.2018_3 & x_1(D);
D.2020_5 = D.2019_4 == 0;
D.2021_6 = D.2020_5 | D.2017_2;
D.2016_7 = (int) D.2021_6;
return D.2016_7;
--
ubizjak at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
GCC target triplet|alphaev68-*-linux-gnu |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19778
More information about the Gcc-bugs
mailing list