float64x2_t test_vfmaq_lane_f64(float64x2_t a1, float64x2_t a2, float64x1_t a3) { // CHECK: test_vfmaq_lane_f64 return vfmaq_lane_f64(a1, a2, a3, 0); // NB: the test below is deliberately lose, so that we don't depend too much // upon the exact IR used to select lane 1 (usually a shufflevector) // CHECK: llvm.fma.v2f64(<2 x double> %a2, <2 x double> {{.*}}, <2 x double> %a1) // CHECK-NEXT: ret }
void test_mul_lane_f64(float64x1_t small, float64x2_t big, float64x2_t rhs) { vmul_lane_f64(small, small, 0); vmul_laneq_f64(small, big, 1); vmulq_lane_f64(big, small, 0); vmulq_laneq_f64(big, big, 1); vfma_lane_f64(small, small, small, 0); vfma_laneq_f64(small, small, big, 1); vfmaq_lane_f64(big, big, small, 0); vfmaq_laneq_f64(big, big, big, 1); vmul_lane_f64(small, small, 1); // expected-error {{argument should be a value from 0 to 0}} vmul_laneq_f64(small, big, 2); // expected-error {{argument should be a value from 0 to 1}} vfma_lane_f64(small, small, small, 1); // expected-error {{argument should be a value from 0 to 0}} vfma_laneq_f64(small, small, big, 2); // expected-error {{argument should be a value from 0 to 1}} vfmaq_laneq_f64(big, big, big, 2); // expected-error {{argument should be a value from 0 to 1}} }
float64x2_t test_vfmaq_lane_f64(float64x2_t a, float64x2_t b, float64x1_t v) { // CHECK: test_vfmaq_lane_f64 return vfmaq_lane_f64(a, b, v, 0); // CHECK: fmla {{v[0-9]+}}.2d, {{v[0-9]+}}.2d, {{v[0-9]+}}.d[0] }