1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; RUN: llc -march=amdgcn -mcpu=gfx1100 -amdgpu-enable-delay-alu=0 -global-isel=1 -verify-machineinstrs < %s | FileCheck -check-prefixes=GFX11 %s
3 ; RUN: llc -march=amdgcn -mcpu=gfx1100 -amdgpu-enable-delay-alu=0 -global-isel=0 -verify-machineinstrs < %s | FileCheck -check-prefixes=GFX11 %s
5 declare i64 @llvm.amdgcn.s.bitreplicate(i32)
7 define i64 @test_s_bitreplicate_constant() {
8 ; GFX11-LABEL: test_s_bitreplicate_constant:
9 ; GFX11: ; %bb.0: ; %entry
10 ; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
11 ; GFX11-NEXT: s_bitreplicate_b64_b32 s[0:1], 0x85fe3a92
12 ; GFX11-NEXT: v_dual_mov_b32 v0, s0 :: v_dual_mov_b32 v1, s1
13 ; GFX11-NEXT: s_setpc_b64 s[30:31]
15 %br = call i64 @llvm.amdgcn.s.bitreplicate(i32 u0x85FE3A92)
19 define amdgpu_cs void @test_s_bitreplicate_sgpr(i32 inreg %mask, ptr addrspace(1) %out) {
20 ; GFX11-LABEL: test_s_bitreplicate_sgpr:
21 ; GFX11: ; %bb.0: ; %entry
22 ; GFX11-NEXT: s_bitreplicate_b64_b32 s[0:1], s0
23 ; GFX11-NEXT: v_dual_mov_b32 v3, s1 :: v_dual_mov_b32 v2, s0
24 ; GFX11-NEXT: global_store_b64 v[0:1], v[2:3], off
26 ; GFX11-NEXT: s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
27 ; GFX11-NEXT: s_endpgm
29 %br = call i64 @llvm.amdgcn.s.bitreplicate(i32 %mask)
30 store i64 %br, ptr addrspace(1) %out
34 define i64 @test_s_bitreplicate_vgpr(i32 %mask) {
35 ; GFX11-LABEL: test_s_bitreplicate_vgpr:
36 ; GFX11: ; %bb.0: ; %entry
37 ; GFX11-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
38 ; GFX11-NEXT: v_readfirstlane_b32 s0, v0
39 ; GFX11-NEXT: s_bitreplicate_b64_b32 s[0:1], s0
40 ; GFX11-NEXT: v_dual_mov_b32 v0, s0 :: v_dual_mov_b32 v1, s1
41 ; GFX11-NEXT: s_setpc_b64 s[30:31]
43 %br = call i64 @llvm.amdgcn.s.bitreplicate(i32 %mask)