[Bug target/92953] Undesired if-conversion with overflow builtins
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Dec 16 11:16:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92953
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
Target| |x86_64-linux-gnu
Component|rtl-optimization |target
Severity|normal |enhancement
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
But for aarch64 we get:
subs w0, w0, w1 //w0 = w0 - w1; setting overflow bit of flags
mvn w1, w0 // w1 = ~w0
orr w1, w1, 1 // w1 = w1 | 1
csel w0, w1, w0, vs // w0 = over ? w1 : w0
ret
Which is the best and better than with branches.
So this is a fully a target issue.
More information about the Gcc-bugs
mailing list