[Bug target/82666] [7/8 regression]: sum += (x>128 ? x : 0) puts the cmov on the critical path (at -O2)

law at redhat dot com gcc-bugzilla@gcc.gnu.org
Tue Jan 30 05:55:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82666

--- Comment #5 from Jeffrey A. Law <law at redhat dot com> ---
Aldy,

It's less about whether or not there is a cmov (I get one with and without
PRE), but more about what part of the loop we're using the cmov for.

Consider what we get in the .optimized dump at -O3 correct.  But the target
*assembly* we want is what you'd get with -O3 -fno-tree-pre.  ie, PRE is making
it harder for us to generate the cmov we want.


More information about the Gcc-bugs mailing list