[cfe-dev] [llvm-dev] ARM float16 intrinsic test

Nancy via cfe-dev cfe-dev at lists.llvm.org
Thu Jul 11 22:59:29 PDT 2019

Dear list,

git checkout llvmorg-8.0.0 -b llvm8.0
cmake -G "Unix Makefiles" ../llvm-project/llvm -DCMAKE_BUILD_TYPE=Debug

#define vst4_lane_f16(__p0, __p1, __p2) __extension__ ({ \
  float16x4x4_t __s1 = __p1; \
  __builtin_neon_vst4_lane_v(__p0, __s1.val[0], __s1.val[1], __s1.val[2],
__s1.val[3], __p2, 8); \
typedef __fp16 float16_t;
typedef __attribute__((neon_vector_type(4))) float16_t float16x4_t;
typedef struct float16x4x4_t {
  float16x4_t val[4];
} float16x4x4_t;
void test_vst4_lane_f16(float16_t * a, float16x4x4_t b) {
  vst4_lane_f16(a, b, 3);

I tried:
$$COMP_ROOT/clang -cc1 -triple thumbv7s-apple-darwin -target-abi apcs-gnu
-target-cpu swift -fallow-half-arguments-and-returns -target-feature
+fullfp16 -ffreestanding -disable-O0-optnone -emit-llvm -o arm.ll arm.cpp
$cat arm.ll | grep llvm.arm
  call void @llvm.arm.neon.vst4lane.p0i8.v4f16(i8* %4, <4 x half> %13, <4 x
half> %14, <4 x half> %15, <4 x half> %16, i32 3, i32 2)
declare void @llvm.arm.neon.vst4lane.p0i8.v4f16(i8*, <4 x half>, <4 x
half>, <4 x half>, <4 x half>, i32, i32) #1
$$COMP_ROOT/llc arm.ll
unhandled vld/vst lane type
UNREACHABLE executed at

May I know how to compile this .cpp correctly from FE to BE?

Best Regards,
Yu Rong Tan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20190712/579c2320/attachment.html>

More information about the cfe-dev mailing list