GCC vectorization of math functions similar to what LLVM does...
James Greenhalgh
james.greenhalgh@arm.com
Fri Sep 26 11:12:00 GMT 2014
On Thu, Sep 25, 2014 at 02:27:04PM +0100, leon zadorin wrote:
> Hello,
>
> a quick question on whether GCC can do (auto) vectorization of math
> functions like pow, exp, log, sin, cos, et. al. as per similar to what
> LLVM suggests of being able to do:
> http://llvm.org/docs/Vectorizers.html#vectorization-of-function-calls
>
> Is GCC (e.g. 4.9.1) capable of something similar?
Yes, though as with LLVM, which builtin functions are considered for
vectorization will depend on the architecture you are targetting.
The relevant target hook to look for in the GCC sources is
"TARGET_VECTORIZE_BUILTIN_VECTORIZED_FUNCTION" [1].
Cheers,
James
---
[1] https://gcc.gnu.org/onlinedocs/gccint/Addressing-Modes.html#Addressing-Modes
More information about the Gcc-help
mailing list