[Bug tree-optimization/53243] Use vector comparisons for if cascades
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon May 7 09:33:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53243
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-05-07
Ever Confirmed|0 |1
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-05-07 09:31:59 UTC ---
How does performance look like when you do not have random distribution of
comparison results but branch pedictors can do a good job? Thus, are
branch pedictors not disabled by this transform, only retaining branch
target buffering?
Your code can probably be optimized further by recognizing that only the
parameter to cb is conditional if we don't take the else branch, thus do
if (!(a < 8.0))
++o;
else
do vector compare, compute cb argument from result and call cb
doing no branches at all.
I don't see where your or the above transform would best fit into.
It's straight-line code as written, still we'd need to perform
some if-conversion (difficult for calls, so only pairs with the above
idea) and then vectorization.
More information about the Gcc-bugs
mailing list