@@ -62,3 +62,30 @@ void test_builtin_elementwise_asin(float f, double d, vfloat4 vf4,
62
62
// OGCG: %{{.*}} = call <4 x double> @llvm.asin.v4f64(<4 x double> %{{.*}})
63
63
vd4 = __builtin_elementwise_asin (vd4 );
64
64
}
65
+
66
+ void test_builtin_elementwise_atan (float f , double d , vfloat4 vf4 ,
67
+ vdouble4 vd4 ) {
68
+ // CIR-LABEL: test_builtin_elementwise_atan
69
+ // LLVM-LABEL: test_builtin_elementwise_atan
70
+ // OGCG-LABEL: test_builtin_elementwise_atan
71
+
72
+ // CIR: %{{.*}} = cir.atan %{{.*}} : !cir.float
73
+ // LLVM: %{{.*}} = call float @llvm.atan.f32(float %{{.*}})
74
+ // OGCG: %{{.*}} = call float @llvm.atan.f32(float %{{.*}})
75
+ f = __builtin_elementwise_atan (f );
76
+
77
+ // CIR: %{{.*}} = cir.atan %{{.*}} : !cir.double
78
+ // LLVM: %{{.*}} = call double @llvm.atan.f64(double %{{.*}})
79
+ // OGCG: %{{.*}} = call double @llvm.atan.f64(double %{{.*}})
80
+ d = __builtin_elementwise_atan (d );
81
+
82
+ // CIR: %{{.*}} = cir.atan %{{.*}} : !cir.vector<4 x !cir.float>
83
+ // LLVM: %{{.*}} = call <4 x float> @llvm.atan.v4f32(<4 x float> %{{.*}})
84
+ // OGCG: %{{.*}} = call <4 x float> @llvm.atan.v4f32(<4 x float> %{{.*}})
85
+ vf4 = __builtin_elementwise_atan (vf4 );
86
+
87
+ // CIR: %{{.*}} = cir.atan %{{.*}} : !cir.vector<4 x !cir.double>
88
+ // LLVM: %{{.*}} = call <4 x double> @llvm.atan.v4f64(<4 x double> %{{.*}})
89
+ // OGCG: %{{.*}} = call <4 x double> @llvm.atan.v4f64(<4 x double> %{{.*}})
90
+ vd4 = __builtin_elementwise_atan (vd4 );
91
+ }
0 commit comments