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_lane_f64(<1 x double> %a, <1 x double> %b, <1 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 <1 x double> %v to <8 x i8> // CHECK: [[TMP3:%.*]] = bitcast <8 x i8> [[TMP2]] to <1 x double> // CHECK: [[LANE:%.*]] = shufflevector <1 x double> [[TMP3]], <1 x double> [[TMP3]], <1 x i32> zeroinitializer // CHECK: [[FMLA:%.*]] = bitcast <8 x i8> [[TMP1]] to <1 x double> // CHECK: [[FMLA1:%.*]] = bitcast <8 x i8> [[TMP0]] to <1 x double> // CHECK: [[FMLA2:%.*]] = call <1 x double> @llvm.fma.v1f64(<1 x double> [[FMLA]], <1 x double> [[LANE]], <1 x double> [[FMLA1]]) // CHECK: ret <1 x double> [[FMLA2]] float64x1_t test_vfma_lane_f64(float64x1_t a, float64x1_t b, float64x1_t v) { return vfma_lane_f64(a, b, v, 0); }
// CHECK-LABEL: test_vfma_lane_f64 float64x1_t test_vfma_lane_f64(float64x1_t a, float64x1_t b, float64x1_t v) { return vfma_lane_f64(a, b, v, 0); // CHECK: {{fmla|fmadd}} {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+.d\[0\]|d[0-9]+}} }