llvm-project/llvm/test/CodeGen/AMDGPU/llvm.cos.bf16.ll
Shilei Tian fc0653f31c
[RFC][NFC][AMDGPU] Remove -verify-machineinstrs from llvm/test/CodeGen/AMDGPU/*.ll (#150024)
Recent upstream trends have moved away from explicitly using `-verify-machineinstrs`, as it's already covered by the expensive checks. This PR removes almost all `-verify-machineinstrs` from tests in `llvm/test/CodeGen/AMDGPU/*.ll`, leaving only those tests where its removal currently causes failures.
2025-07-23 13:42:46 -04:00

39 lines
1.4 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
; RUN: llc -global-isel=0 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1250 %s -o - | FileCheck -check-prefixes=GCN %s
; xUN: llc -global-isel=1 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1250 %s -o - | FileCheck -check-prefix=GCN %s
; FIXME: GlobalISel does not work with bf16
declare bfloat @llvm.cos.bf16(bfloat) #0
define amdgpu_kernel void @cos_bf16_constant_4(ptr addrspace(1) %out) #1 {
; GCN-LABEL: cos_bf16_constant_4:
; GCN: ; %bb.0:
; GCN-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
; GCN-NEXT: v_cos_bf16_e32 v0, 0x3f23
; GCN-NEXT: v_mov_b32_e32 v1, 0
; GCN-NEXT: s_wait_kmcnt 0x0
; GCN-NEXT: global_store_b16 v1, v0, s[0:1]
; GCN-NEXT: s_endpgm
%cos = call bfloat @llvm.cos.bf16(bfloat 4.0) #0
store bfloat %cos, ptr addrspace(1) %out, align 2
ret void
}
define amdgpu_kernel void @cos_bf16_constant_100(ptr addrspace(1) %out) #1 {
; GCN-LABEL: cos_bf16_constant_100:
; GCN: ; %bb.0:
; GCN-NEXT: s_load_b64 s[0:1], s[4:5], 0x0
; GCN-NEXT: v_cos_bf16_e32 v0, 0x417f
; GCN-NEXT: v_mov_b32_e32 v1, 0
; GCN-NEXT: s_wait_kmcnt 0x0
; GCN-NEXT: global_store_b16 v1, v0, s[0:1]
; GCN-NEXT: s_endpgm
%cos = call bfloat @llvm.cos.bf16(bfloat 100.0) #0
store bfloat %cos, ptr addrspace(1) %out, align 2
ret void
}
attributes #0 = { nounwind readnone }
attributes #1 = { nounwind }