Created
August 8, 2015 09:59
-
-
Save syoyo/57f03324d712681fbfd2 to your computer and use it in GitHub Desktop.
ARM NEON + clang ext_vector_type test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <arm_neon.h> | |
typedef float float4 __attribute__((ext_vector_type(4))); | |
float4 mymax(float4 a, float4 b) | |
{ | |
float4 ret; | |
ret = vmaxq_f32(a, b); | |
return ret; | |
} | |
$ clang+llvm-3.6.2-armv7a-linux-gnuabihf/bin/clang++ -O2 -S neon_test.cc | |
$ cat neon_test.s | |
_Z5mymaxDv4_fS_: @ @_Z5mymaxDv4_fS_ | |
.fnstart | |
.Leh_func_begin0: | |
@ BB#0: | |
vmax.f32 q0, q0, q1 | |
bx lr | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment