Skip to content

Commit ecbaee7

Browse files
committed
fix tests
1 parent 9695804 commit ecbaee7

File tree

8 files changed

+406
-451
lines changed

8 files changed

+406
-451
lines changed

llvm/test/CodeGen/NVPTX/bf16x2-instructions-approx.ll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2-
; RUN: llc < %s -mtriple=nvptx64 -mcpu=sm_80 -mattr=+ptx71 --enable-unsafe-fp-math | FileCheck --check-prefixes=CHECK %s
3-
; RUN: %if ptxas-11.8 %{ llc < %s -mtriple=nvptx64 -mcpu=sm_80 -mattr=+ptx71 --enable-unsafe-fp-math | %ptxas-verify -arch=sm_80 %}
2+
; RUN: llc < %s -mtriple=nvptx64 -mcpu=sm_80 -mattr=+ptx71 | FileCheck --check-prefixes=CHECK %s
3+
; RUN: %if ptxas-11.8 %{ llc < %s -mtriple=nvptx64 -mcpu=sm_80 -mattr=+ptx71 | %ptxas-verify -arch=sm_80 %}
44

55
target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128"
66

@@ -22,7 +22,7 @@ define <2 x bfloat> @test_sin(<2 x bfloat> %a) #0 #1 {
2222
; CHECK-NEXT: cvt.rn.bf16x2.f32 %r5, %r4, %r2;
2323
; CHECK-NEXT: st.param.b32 [func_retval0], %r5;
2424
; CHECK-NEXT: ret;
25-
%r = call <2 x bfloat> @llvm.sin.f16(<2 x bfloat> %a)
25+
%r = call afn <2 x bfloat> @llvm.sin.f16(<2 x bfloat> %a)
2626
ret <2 x bfloat> %r
2727
}
2828

@@ -41,7 +41,7 @@ define <2 x bfloat> @test_cos(<2 x bfloat> %a) #0 #1 {
4141
; CHECK-NEXT: cvt.rn.bf16x2.f32 %r5, %r4, %r2;
4242
; CHECK-NEXT: st.param.b32 [func_retval0], %r5;
4343
; CHECK-NEXT: ret;
44-
%r = call <2 x bfloat> @llvm.cos.f16(<2 x bfloat> %a)
44+
%r = call afn <2 x bfloat> @llvm.cos.f16(<2 x bfloat> %a)
4545
ret <2 x bfloat> %r
4646
}
4747

llvm/test/CodeGen/NVPTX/f16-instructions.ll

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -886,8 +886,8 @@ define half @test_sqrt(half %a) #0 {
886886
; CHECK: cvt.rn.f16.f32 [[R:%rs[0-9]+]], [[RF]];
887887
; CHECK: st.param.b16 [func_retval0], [[R]];
888888
; CHECK: ret;
889-
define half @test_sin(half %a) #0 #1 {
890-
%r = call half @llvm.sin.f16(half %a)
889+
define half @test_sin(half %a) #0 {
890+
%r = call afn half @llvm.sin.f16(half %a)
891891
ret half %r
892892
}
893893

@@ -900,8 +900,8 @@ define half @test_sin(half %a) #0 #1 {
900900
; CHECK: cvt.rn.f16.f32 [[R:%rs[0-9]+]], [[RF]];
901901
; CHECK: st.param.b16 [func_retval0], [[R]];
902902
; CHECK: ret;
903-
define half @test_cos(half %a) #0 #1 {
904-
%r = call half @llvm.cos.f16(half %a)
903+
define half @test_cos(half %a) #0 {
904+
%r = call afn half @llvm.cos.f16(half %a)
905905
ret half %r
906906
}
907907

@@ -1183,4 +1183,3 @@ define <2 x half> @test_neg_f16x2(<2 x half> noundef %arg) #0 {
11831183
}
11841184

11851185
attributes #0 = { nounwind }
1186-
attributes #1 = { "unsafe-fp-math" = "true" }

llvm/test/CodeGen/NVPTX/f16x2-instructions.ll

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1674,7 +1674,7 @@ define <2 x half> @test_sqrt(<2 x half> %a) #0 {
16741674
; ret <2 x half> %r
16751675
;}
16761676

1677-
define <2 x half> @test_sin(<2 x half> %a) #0 #1 {
1677+
define <2 x half> @test_sin(<2 x half> %a) #0 {
16781678
; CHECK-LABEL: test_sin(
16791679
; CHECK: {
16801680
; CHECK-NEXT: .reg .b16 %rs<5>;
@@ -1692,11 +1692,11 @@ define <2 x half> @test_sin(<2 x half> %a) #0 #1 {
16921692
; CHECK-NEXT: mov.b32 %r6, {%rs4, %rs3};
16931693
; CHECK-NEXT: st.param.b32 [func_retval0], %r6;
16941694
; CHECK-NEXT: ret;
1695-
%r = call <2 x half> @llvm.sin.f16(<2 x half> %a)
1695+
%r = call afn <2 x half> @llvm.sin.f16(<2 x half> %a)
16961696
ret <2 x half> %r
16971697
}
16981698

1699-
define <2 x half> @test_cos(<2 x half> %a) #0 #1 {
1699+
define <2 x half> @test_cos(<2 x half> %a) #0 {
17001700
; CHECK-LABEL: test_cos(
17011701
; CHECK: {
17021702
; CHECK-NEXT: .reg .b16 %rs<5>;
@@ -1714,7 +1714,7 @@ define <2 x half> @test_cos(<2 x half> %a) #0 #1 {
17141714
; CHECK-NEXT: mov.b32 %r6, {%rs4, %rs3};
17151715
; CHECK-NEXT: st.param.b32 [func_retval0], %r6;
17161716
; CHECK-NEXT: ret;
1717-
%r = call <2 x half> @llvm.cos.f16(<2 x half> %a)
1717+
%r = call afn <2 x half> @llvm.cos.f16(<2 x half> %a)
17181718
ret <2 x half> %r
17191719
}
17201720

@@ -2330,4 +2330,3 @@ define void @test_store_2xhalf(ptr %p1, ptr %p2, <2 x half> %v) {
23302330

23312331

23322332
attributes #0 = { nounwind }
2333-
attributes #1 = { "unsafe-fp-math" = "true" }

llvm/test/CodeGen/NVPTX/f32x2-instructions.ll

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1627,7 +1627,7 @@ define <2 x float> @test_sqrt(<2 x float> %a) #0 {
16271627
; ret <2 x float> %r
16281628
;}
16291629

1630-
define <2 x float> @test_sin(<2 x float> %a) #0 #1 {
1630+
define <2 x float> @test_sin(<2 x float> %a) #0 {
16311631
; CHECK-LABEL: test_sin(
16321632
; CHECK: {
16331633
; CHECK-NEXT: .reg .b32 %r<5>;
@@ -1640,11 +1640,11 @@ define <2 x float> @test_sin(<2 x float> %a) #0 #1 {
16401640
; CHECK-NEXT: sin.approx.f32 %r4, %r1;
16411641
; CHECK-NEXT: st.param.v2.b32 [func_retval0], {%r4, %r3};
16421642
; CHECK-NEXT: ret;
1643-
%r = call <2 x float> @llvm.sin(<2 x float> %a)
1643+
%r = call afn <2 x float> @llvm.sin(<2 x float> %a)
16441644
ret <2 x float> %r
16451645
}
16461646

1647-
define <2 x float> @test_cos(<2 x float> %a) #0 #1 {
1647+
define <2 x float> @test_cos(<2 x float> %a) #0 {
16481648
; CHECK-LABEL: test_cos(
16491649
; CHECK: {
16501650
; CHECK-NEXT: .reg .b32 %r<5>;
@@ -1657,7 +1657,7 @@ define <2 x float> @test_cos(<2 x float> %a) #0 #1 {
16571657
; CHECK-NEXT: cos.approx.f32 %r4, %r1;
16581658
; CHECK-NEXT: st.param.v2.b32 [func_retval0], {%r4, %r3};
16591659
; CHECK-NEXT: ret;
1660-
%r = call <2 x float> @llvm.cos(<2 x float> %a)
1660+
%r = call afn <2 x float> @llvm.cos(<2 x float> %a)
16611661
ret <2 x float> %r
16621662
}
16631663

@@ -2146,5 +2146,4 @@ define void @test_trunc_to_v2f16(<2 x float> %a, ptr %p) {
21462146

21472147

21482148
attributes #0 = { nounwind }
2149-
attributes #1 = { "unsafe-fp-math" = "true" }
21502149
attributes #2 = { "denormal-fp-math"="preserve-sign" }

0 commit comments

Comments
 (0)