[Bug target/95784] Failure to optimize usage of __builtin_add_overflow with return statement properly
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jun 22 08:05:15 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95784
--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
I wouldn't be surprised if a version with a branch is faster even with each
of the branches mispredicted. cmovs are weird beasts but since they
are not dependent on each other their latency at least shouldn't add up here
so LLVMs two cmovs shouldnt be worse off than GCCs one cmov. You'd need to
compare against a variant without any cmov.
More information about the Gcc-bugs
mailing list