https://llvm.org/bugs/show_bug.cgi?id=26450
James Molloy <james.mol...@arm.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID --- Comment #5 from James Molloy <james.mol...@arm.com> --- Hi, OK, there's two things here: Firstly, it seems __umodsi3 and friends are significantly slower than __aeabi_idivmod. GCC is generating __aeabi_idivmod - perhaps we should? We select __modsi3 unless the target is EABI or Android - I suspect that should be EABI, Android or GNUEABI. GCC 4.9: 1.24s Clang 3.7: 3.48s Clang 3.7 (using __aeabi_idivmod): 1.15s Secondly, you're not specifying a CPU. That's why your division is going out to the library. Unless you're on a Cortex-A9, you'll have hardware division. Use -mcpu to enable it. GCC 4.9 with -mcpu=cortex-a15: 276ms Clang 3.7 with -mcpu=cortex-a15: 258ms (I had to switch to using perf stat's task-clock metric because time elapsed was getting too noisy) By the way: "I've just discovered how immature LLVM/Clang was on ARM." (from https://users.rust-lang.org/t/executable-size-and-performance-vs-c/4496/34) That's a little over the top - the ARM backend is around 10 years old now, it's fairly mature. James -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs