@@ -100,6 +100,27 @@ void test_builtin_elementwise_atan(float f, double d, vfloat4 vf4,
100100 vd4 = __builtin_elementwise_atan (vd4 );
101101}
102102
103+ void test_builtin_elementwise_atan2 (float f , double d , vfloat4 vf4 ,
104+ vdouble4 vd4 ) {
105+ // CIR-LABEL: test_builtin_elementwise_atan2
106+ // LLVM-LABEL: test_builtin_elementwise_atan2
107+ // CIR: {{%.*}} = cir.atan2 {{%.*}}, {{%.*}} : !cir.float
108+ // LLVM: {{%.*}} = call float @llvm.atan2.f32(float {{%.*}}, float {{%.*}})
109+ f = __builtin_elementwise_atan2 (f , f );
110+
111+ // CIR: {{%.*}} = cir.atan2 {{%.*}}, {{%.*}} : !cir.double
112+ // LLVM: {{%.*}} = call double @llvm.atan2.f64(double {{%.*}}, double {{%.*}})
113+ d = __builtin_elementwise_atan2 (d , d );
114+
115+ // CIR: {{%.*}} = cir.atan2 {{%.*}}, {{%.*}} : !cir.vector<!cir.float x 4>
116+ // LLVM: {{%.*}} = call <4 x float> @llvm.atan2.v4f32(<4 x float> {{%.*}}, <4 x float> {{%.*}})
117+ vf4 = __builtin_elementwise_atan2 (vf4 , vf4 );
118+
119+ // CIR: {{%.*}} = cir.atan2 {{%.*}}, {{%.*}} : !cir.vector<!cir.double x 4>
120+ // LLVM: {{%.*}} = call <4 x double> @llvm.atan2.v4f64(<4 x double> {{%.*}}, <4 x double> {{%.*}})
121+ vd4 = __builtin_elementwise_atan2 (vd4 , vd4 );
122+ }
123+
103124void test_builtin_elementwise_exp (float f , double d , vfloat4 vf4 ,
104125 vdouble4 vd4 ) {
105126 // CIR-LABEL: test_builtin_elementwise_exp
0 commit comments