Skip to content

Commit 9b6777c

Browse files
committed
pre-commit tests
1 parent 796d5a8 commit 9b6777c

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

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

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1957,6 +1957,37 @@ define <2 x float> @test_uitofp_2xi32_to_2xfloat(<2 x i32> %a) #0 {
19571957
ret <2 x float> %r
19581958
}
19591959

1960+
define void @test_trunc_to_v2bf16(<2 x float> %a, ptr %p) {
1961+
; CHECK-LABEL: test_trunc_to_v2bf16(
1962+
; CHECK: {
1963+
; CHECK-NEXT: .reg .b64 %rd<3>;
1964+
; CHECK-EMPTY:
1965+
; CHECK-NEXT: // %bb.0:
1966+
; CHECK-NEXT: ld.param.b64 %rd2, [test_trunc_to_v2bf16_param_1];
1967+
; CHECK-NEXT: ld.param.b64 %rd1, [test_trunc_to_v2bf16_param_0];
1968+
; CHECK-NEXT: st.b32 [%rd2], %rd1;
1969+
; CHECK-NEXT: ret;
1970+
%trunc = fptrunc <2 x float> %a to <2 x bfloat>
1971+
store <2 x bfloat> %trunc, ptr %p
1972+
ret void
1973+
}
1974+
1975+
define void @test_trunc_to_v2f16(<2 x float> %a, ptr %p) {
1976+
; CHECK-LABEL: test_trunc_to_v2f16(
1977+
; CHECK: {
1978+
; CHECK-NEXT: .reg .b64 %rd<3>;
1979+
; CHECK-EMPTY:
1980+
; CHECK-NEXT: // %bb.0:
1981+
; CHECK-NEXT: ld.param.b64 %rd2, [test_trunc_to_v2f16_param_1];
1982+
; CHECK-NEXT: ld.param.b64 %rd1, [test_trunc_to_v2f16_param_0];
1983+
; CHECK-NEXT: st.b32 [%rd2], %rd1;
1984+
; CHECK-NEXT: ret;
1985+
%trunc = fptrunc <2 x float> %a to <2 x half>
1986+
store <2 x half> %trunc, ptr %p
1987+
ret void
1988+
}
1989+
1990+
19601991
attributes #0 = { nounwind }
19611992
attributes #1 = { "unsafe-fp-math" = "true" }
19621993
attributes #2 = { "denormal-fp-math"="preserve-sign" }

0 commit comments

Comments
 (0)