[Bug rtl-optimization/59429] Missed optimization opportunity in qsort-style comparison functions
law at redhat dot com
gcc-bugzilla@gcc.gnu.org
Fri May 2 15:58:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59429
Jeffrey A. Law <law at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |law at redhat dot com
--- Comment #5 from Jeffrey A. Law <law at redhat dot com> ---
For expression:
(a_3(D) > b_4(D) ? 1 : -((int) (a_3(D) != b_4(D))))
we should transform it instead to:
(a_3(D) < b_4(D) ? -1 : (int) (a_3(D) != b_4(D)))
Ugh. That seems fairly complex for the existing transformations. Though I
guess we could match on
cond1 ? -1 : -(int) cond2
Where the conditions aren't necessarily related. We'd turn that into
cond1'
More information about the Gcc-bugs
mailing list