Skip to content

Commit 71ccb2f

Browse files
committed
Add normal value tests
1 parent 0aa73f1 commit 71ccb2f

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

llvm/test/Transforms/InstSimplify/sincos.ll

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 3
21
; RUN: opt -S -passes=instsimplify %s | FileCheck %s
32

43
define { float, float } @sincos_zero() {
@@ -17,6 +16,30 @@ define { float, float } @sincos_neg_zero() {
1716
ret { float, float } %ret
1817
}
1918

19+
define { float, float } @sincos_one() {
20+
; CHECK-LABEL: define { float, float } @sincos_one() {
21+
; CHECK-NEXT: ret { float, float } { float [[$SIN_ONE:.+]], float [[$COS_ONE:.+]] }
22+
;
23+
%ret = call { float, float } @llvm.sincos.f32(float 1.0)
24+
ret { float, float } %ret
25+
}
26+
27+
define { float, float } @sincos_two() {
28+
; CHECK-LABEL: define { float, float } @sincos_two() {
29+
; CHECK-NEXT: ret { float, float } { float [[$SIN_TWO:.+]], float [[$COS_TWO:.+]] }
30+
;
31+
%ret = call { float, float } @llvm.sincos.f32(float 2.0)
32+
ret { float, float } %ret
33+
}
34+
35+
define { <2 x float>, <2 x float> } @sincos_vector() {
36+
; CHECK-LABEL: define { <2 x float>, <2 x float> } @sincos_vector() {
37+
; CHECK-NEXT: ret { <2 x float>, <2 x float> } { <2 x float> <float [[$SIN_ONE]], float [[$SIN_TWO]]>, <2 x float> <float [[$COS_ONE]], float [[$COS_TWO]]> }
38+
;
39+
%ret = call { <2 x float>, <2 x float> } @llvm.sincos.v2f32(<2 x float> <float 1.0, float 2.0>)
40+
ret { <2 x float>, <2 x float> } %ret
41+
}
42+
2043
define { <2 x float>, <2 x float> } @sincos_zero_vector() {
2144
; CHECK-LABEL: define { <2 x float>, <2 x float> } @sincos_zero_vector() {
2245
; CHECK-NEXT: ret { <2 x float>, <2 x float> } { <2 x float> zeroinitializer, <2 x float> <float 1.000000e+00, float 1.000000e+00> }

0 commit comments

Comments
 (0)