This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/65474] sub-optimal code for __builtin_abs


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

--- Comment #3 from wmi at google dot com ---
Thanks. You are right. I wrote a microbenchmark (attached), and tested it on
different intel microarchitectures.

westmere:
1.gcc.out:    19.42
1.llvm.out:   19.32

sandybridge:
1.gcc.out:    18.61
1.llvm.out:   19.16

ivybridge:
1.gcc.out:    15.79
1.llvm.out:   15.87

On sandybridge, llvm's version was slower. On other microarchitectures, they
were close to each other. So gcc's choose makes sense.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]