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}} }
// CHECK-LABEL: define <1 x double> @test_vfma_laneq_f64(<1 x double> %a, <1 x double> %b, <2 x double> %v) #0 { // CHECK: [[TMP0:%.*]] = bitcast <1 x double> %a to <8 x i8> // CHECK: [[TMP1:%.*]] = bitcast <1 x double> %b to <8 x i8> // CHECK: [[TMP2:%.*]] = bitcast <2 x double> %v to <16 x i8> // CHECK: [[TMP3:%.*]] = bitcast <8 x i8> [[TMP0]] to double // CHECK: [[TMP4:%.*]] = bitcast <8 x i8> [[TMP1]] to double // CHECK: [[TMP5:%.*]] = bitcast <16 x i8> [[TMP2]] to <2 x double> // CHECK: [[EXTRACT:%.*]] = extractelement <2 x double> [[TMP5]], i32 0 // CHECK: [[TMP6:%.*]] = call double @llvm.fma.f64(double [[TMP4]], double [[EXTRACT]], double [[TMP3]]) // CHECK: [[TMP7:%.*]] = bitcast double [[TMP6]] to <1 x double> // CHECK: ret <1 x double> [[TMP7]] float64x1_t test_vfma_laneq_f64(float64x1_t a, float64x1_t b, float64x2_t v) { return vfma_laneq_f64(a, b, v, 0); }
// CHECK-LABEL: test_vfma_laneq_f64 float64x1_t test_vfma_laneq_f64(float64x1_t a, float64x1_t b, float64x2_t v) { return vfma_laneq_f64(a, b, v, 0); // CHECK: fmla {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+}}.d[0] }