int main (void) { volatile float64_t minus_e, pi; float64_t expected, actual; pi = 3.14159265359; minus_e = -2.71828; expected = pi * minus_e; actual = vmuld_lane_f64 (pi, (float64x1_t) { minus_e }, 0); if (expected != actual) abort (); return 0; }
// CHECK-LABEL: define double @test_vmuld_lane_f64(double %a, <1 x double> %b) #0 { // CHECK: [[TMP0:%.*]] = bitcast <1 x double> %b to <8 x i8> // CHECK: [[TMP1:%.*]] = bitcast <8 x i8> [[TMP0]] to <1 x double> // CHECK: [[VGET_LANE:%.*]] = extractelement <1 x double> [[TMP1]], i32 0 // CHECK: [[MUL:%.*]] = fmul double %a, [[VGET_LANE]] // CHECK: ret double [[MUL]] float64_t test_vmuld_lane_f64(float64_t a, float64x1_t b) { return vmuld_lane_f64(a, b, 0); }
float64_t test_vmuld_lane_f64(float64_t a, float64x1_t b) { // CHECK-LABEL: test_vmuld_lane_f64 return vmuld_lane_f64(a, b, 0); // CHECK: fmul {{d[0-9]+}}, {{d[0-9]+}}, {{v[0-9]+.d\[0\]|d[0-9]+}} }