arm64_vset_lane.c revision 651f13cea278ec967336033dd032faef0e9fc2ec
1// RUN: %clang_cc1 -O1 -triple arm64-apple-ios7 -ffreestanding -S -o - -emit-llvm %s | FileCheck %s 2// Test ARM64 SIMD set lane intrinsics INCOMPLETE 3 4#include <arm_neon.h> 5 6float16x4_t test_vset_lane_f16(float16_t *a1, float16x4_t a2) { 7 // CHECK-LABEL: test_vset_lane_f16 8 return vset_lane_f16(*a1, a2, 1); 9 // CHECK insertelement <4 x i16> %a2, i16 %a1, i32 1 10} 11 12float16x8_t test_vsetq_lane_f16(float16_t *a1, float16x8_t a2) { 13 // CHECK-LABEL: test_vsetq_lane_f16 14 return vsetq_lane_f16(*a1, a2, 4); 15 // CHECK insertelement <8 x i16> %a2, i16 %a1, i32 4 16} 17 18// problem with scalar_to_vector in backend. Punt for now 19#if 0 20float64x1_t test_vset_lane_f64(float64_t a1, float64x1_t a2) { 21 // CHECK-LABEL@ test_vset_lane_f64 22 return vset_lane_f64(a1, a2, 0); 23 // CHECK@ @llvm.arm64.neon.smaxv.i32.v8i8 24} 25#endif 26 27float64x2_t test_vsetq_lane_f64(float64_t a1, float64x2_t a2) { 28 // CHECK-LABEL: test_vsetq_lane_f64 29 return vsetq_lane_f64(a1, a2, 0); 30 // CHECK insertelement <2 x double> %a2, double %a1, i32 0 31} 32