brintos

brintos / llvm-project-archived public Read only

0
0
Text · 23.0 KiB · c4234cc Raw
534 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -global-isel=0 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1250 < %s | FileCheck -check-prefixes=GFX1250,GFX1250-SDAG %s3; RUN: llc -global-isel=1 -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1250 < %s | FileCheck -check-prefixes=GFX1250,GFX1250-GISEL %s4 5define i32 @test_flat_amdgcn_cooperative_atomic_load_32x4B_relaxed(ptr noundef readonly %addr)  {6; GFX1250-LABEL: test_flat_amdgcn_cooperative_atomic_load_32x4B_relaxed:7; GFX1250:       ; %bb.0: ; %entry8; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x09; GFX1250-NEXT:    s_wait_kmcnt 0x010; GFX1250-NEXT:    flat_load_b32 v0, v[0:1] scope:SCOPE_SYS11; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x012; GFX1250-NEXT:    s_set_pc_i64 s[30:31]13entry:14  %0 = tail call i32 @llvm.amdgcn.cooperative.atomic.load.32x4B.p0(ptr %addr, i32 0, metadata !0)15  ret i32 %016}17 18define <2 x i32> @test_flat_amdgcn_cooperative_atomic_load_16x8B_relaxed(ptr noundef readonly %addr)  {19; GFX1250-LABEL: test_flat_amdgcn_cooperative_atomic_load_16x8B_relaxed:20; GFX1250:       ; %bb.0: ; %entry21; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x022; GFX1250-NEXT:    s_wait_kmcnt 0x023; GFX1250-NEXT:    flat_load_b64 v[0:1], v[0:1] scope:SCOPE_SYS24; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x025; GFX1250-NEXT:    s_set_pc_i64 s[30:31]26entry:27  %0 = tail call <2 x i32> @llvm.amdgcn.cooperative.atomic.load.16x8B.p0(ptr %addr, i32 0, metadata !0)28  ret <2 x i32> %029}30 31define <4 x i32> @test_flat_amdgcn_cooperative_atomic_load_8x16B_relaxed(ptr noundef readonly %addr)  {32; GFX1250-LABEL: test_flat_amdgcn_cooperative_atomic_load_8x16B_relaxed:33; GFX1250:       ; %bb.0: ; %entry34; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x035; GFX1250-NEXT:    s_wait_kmcnt 0x036; GFX1250-NEXT:    flat_load_b128 v[0:3], v[0:1] scope:SCOPE_SYS37; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x038; GFX1250-NEXT:    s_set_pc_i64 s[30:31]39entry:40  %0 = tail call <4 x i32> @llvm.amdgcn.cooperative.atomic.load.8x16B.p0(ptr %addr, i32 0, metadata !0)41  ret <4 x i32> %042}43 44define void @test_flat_amdgcn_cooperative_atomic_store_32x4B_relaxed(ptr noundef %addr, i32 noundef %val)  {45; GFX1250-LABEL: test_flat_amdgcn_cooperative_atomic_store_32x4B_relaxed:46; GFX1250:       ; %bb.0: ; %entry47; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x048; GFX1250-NEXT:    s_wait_kmcnt 0x049; GFX1250-NEXT:    flat_store_b32 v[0:1], v2 scope:SCOPE_SYS50; GFX1250-NEXT:    s_wait_dscnt 0x051; GFX1250-NEXT:    s_set_pc_i64 s[30:31]52entry:53  tail call void @llvm.amdgcn.cooperative.atomic.store.32x4B.p0(ptr %addr, i32 %val, i32 0, metadata !0)54  ret void55}56 57define void @test_flat_amdgcn_cooperative_atomic_store_16x8B_relaxed(ptr noundef %addr, <2 x i32> noundef %val)  {58; GFX1250-LABEL: test_flat_amdgcn_cooperative_atomic_store_16x8B_relaxed:59; GFX1250:       ; %bb.0: ; %entry60; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x061; GFX1250-NEXT:    s_wait_kmcnt 0x062; GFX1250-NEXT:    flat_store_b64 v[0:1], v[2:3] scope:SCOPE_SYS63; GFX1250-NEXT:    s_wait_dscnt 0x064; GFX1250-NEXT:    s_set_pc_i64 s[30:31]65entry:66  tail call void @llvm.amdgcn.cooperative.atomic.store.16x8B.p0(ptr %addr, <2 x i32> %val, i32 0, metadata !0)67  ret void68}69 70define void @test_flat_amdgcn_cooperative_atomic_store_8x16B_relaxed(ptr noundef %addr, <4 x i32> noundef %val)  {71; GFX1250-LABEL: test_flat_amdgcn_cooperative_atomic_store_8x16B_relaxed:72; GFX1250:       ; %bb.0: ; %entry73; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x074; GFX1250-NEXT:    s_wait_kmcnt 0x075; GFX1250-NEXT:    flat_store_b128 v[0:1], v[2:5] scope:SCOPE_SYS76; GFX1250-NEXT:    s_wait_dscnt 0x077; GFX1250-NEXT:    s_set_pc_i64 s[30:31]78entry:79  tail call void @llvm.amdgcn.cooperative.atomic.store.8x16B.p0(ptr %addr, <4 x i32> %val, i32 0, metadata !0)80  ret void81}82 83define i32 @test_flat_amdgcn_cooperative_atomic_load_32x4B_acquire(ptr noundef readonly %addr)  {84; GFX1250-LABEL: test_flat_amdgcn_cooperative_atomic_load_32x4B_acquire:85; GFX1250:       ; %bb.0: ; %entry86; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x087; GFX1250-NEXT:    s_wait_kmcnt 0x088; GFX1250-NEXT:    flat_load_b32 v0, v[0:1] scope:SCOPE_SYS89; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x090; GFX1250-NEXT:    global_inv scope:SCOPE_SYS91; GFX1250-NEXT:    s_wait_loadcnt 0x092; GFX1250-NEXT:    s_set_pc_i64 s[30:31]93entry:94  %0 = tail call i32 @llvm.amdgcn.cooperative.atomic.load.32x4B.p0(ptr %addr, i32 2, metadata !0)95  ret i32 %096}97 98define <2 x i32> @test_flat_amdgcn_cooperative_atomic_load_16x8B_acquire(ptr noundef readonly %addr)  {99; GFX1250-LABEL: test_flat_amdgcn_cooperative_atomic_load_16x8B_acquire:100; GFX1250:       ; %bb.0: ; %entry101; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0102; GFX1250-NEXT:    s_wait_kmcnt 0x0103; GFX1250-NEXT:    flat_load_b64 v[0:1], v[0:1] scope:SCOPE_SYS104; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0105; GFX1250-NEXT:    global_inv scope:SCOPE_SYS106; GFX1250-NEXT:    s_wait_loadcnt 0x0107; GFX1250-NEXT:    s_set_pc_i64 s[30:31]108entry:109  %0 = tail call <2 x i32> @llvm.amdgcn.cooperative.atomic.load.16x8B.p0(ptr %addr, i32 2, metadata !0)110  ret <2 x i32> %0111}112 113define <4 x i32> @test_flat_amdgcn_cooperative_atomic_load_8x16B_acquire(ptr noundef readonly %addr)  {114; GFX1250-LABEL: test_flat_amdgcn_cooperative_atomic_load_8x16B_acquire:115; GFX1250:       ; %bb.0: ; %entry116; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0117; GFX1250-NEXT:    s_wait_kmcnt 0x0118; GFX1250-NEXT:    flat_load_b128 v[0:3], v[0:1] scope:SCOPE_SYS119; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0120; GFX1250-NEXT:    global_inv scope:SCOPE_SYS121; GFX1250-NEXT:    s_wait_loadcnt 0x0122; GFX1250-NEXT:    s_set_pc_i64 s[30:31]123entry:124  %0 = tail call <4 x i32> @llvm.amdgcn.cooperative.atomic.load.8x16B.p0(ptr %addr, i32 2, metadata !0)125  ret <4 x i32> %0126}127 128define void @test_flat_amdgcn_cooperative_atomic_store_32x4B_release(ptr noundef %addr, i32 noundef %val)  {129; GFX1250-LABEL: test_flat_amdgcn_cooperative_atomic_store_32x4B_release:130; GFX1250:       ; %bb.0: ; %entry131; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0132; GFX1250-NEXT:    s_wait_kmcnt 0x0133; GFX1250-NEXT:    global_wb scope:SCOPE_SYS134; GFX1250-NEXT:    s_wait_storecnt 0x0135; GFX1250-NEXT:    flat_store_b32 v[0:1], v2 scope:SCOPE_SYS136; GFX1250-NEXT:    s_wait_dscnt 0x0137; GFX1250-NEXT:    s_set_pc_i64 s[30:31]138entry:139  tail call void @llvm.amdgcn.cooperative.atomic.store.32x4B.p0(ptr %addr, i32 %val, i32 3, metadata !0)140  ret void141}142 143define void @test_flat_amdgcn_cooperative_atomic_store_16x8B_release(ptr noundef %addr, <2 x i32> noundef %val)  {144; GFX1250-LABEL: test_flat_amdgcn_cooperative_atomic_store_16x8B_release:145; GFX1250:       ; %bb.0: ; %entry146; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0147; GFX1250-NEXT:    s_wait_kmcnt 0x0148; GFX1250-NEXT:    global_wb scope:SCOPE_SYS149; GFX1250-NEXT:    s_wait_storecnt 0x0150; GFX1250-NEXT:    flat_store_b64 v[0:1], v[2:3] scope:SCOPE_SYS151; GFX1250-NEXT:    s_wait_dscnt 0x0152; GFX1250-NEXT:    s_set_pc_i64 s[30:31]153entry:154  tail call void @llvm.amdgcn.cooperative.atomic.store.16x8B.p0(ptr %addr, <2 x i32> %val, i32 3, metadata !0)155  ret void156}157 158define void @test_flat_amdgcn_cooperative_atomic_store_8x16B_release(ptr noundef %addr, <4 x i32> noundef %val)  {159; GFX1250-LABEL: test_flat_amdgcn_cooperative_atomic_store_8x16B_release:160; GFX1250:       ; %bb.0: ; %entry161; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0162; GFX1250-NEXT:    s_wait_kmcnt 0x0163; GFX1250-NEXT:    global_wb scope:SCOPE_SYS164; GFX1250-NEXT:    s_wait_storecnt 0x0165; GFX1250-NEXT:    flat_store_b128 v[0:1], v[2:5] scope:SCOPE_SYS166; GFX1250-NEXT:    s_wait_dscnt 0x0167; GFX1250-NEXT:    s_set_pc_i64 s[30:31]168entry:169  tail call void @llvm.amdgcn.cooperative.atomic.store.8x16B.p0(ptr %addr, <4 x i32> %val, i32 3, metadata !0)170  ret void171}172 173define i32 @test_flat_amdgcn_cooperative_atomic_load_32x4B_seq_cst(ptr noundef readonly %addr)  {174; GFX1250-LABEL: test_flat_amdgcn_cooperative_atomic_load_32x4B_seq_cst:175; GFX1250:       ; %bb.0: ; %entry176; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0177; GFX1250-NEXT:    s_wait_kmcnt 0x0178; GFX1250-NEXT:    s_wait_storecnt 0x0179; GFX1250-NEXT:    flat_load_b32 v0, v[0:1] scope:SCOPE_SYS180; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0181; GFX1250-NEXT:    global_inv scope:SCOPE_SYS182; GFX1250-NEXT:    s_wait_loadcnt 0x0183; GFX1250-NEXT:    s_set_pc_i64 s[30:31]184entry:185  %0 = tail call i32 @llvm.amdgcn.cooperative.atomic.load.32x4B.p0(ptr %addr, i32 5, metadata !0)186  ret i32 %0187}188 189define <2 x i32> @test_flat_amdgcn_cooperative_atomic_load_16x8B_seq_cst(ptr noundef readonly %addr)  {190; GFX1250-LABEL: test_flat_amdgcn_cooperative_atomic_load_16x8B_seq_cst:191; GFX1250:       ; %bb.0: ; %entry192; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0193; GFX1250-NEXT:    s_wait_kmcnt 0x0194; GFX1250-NEXT:    s_wait_storecnt 0x0195; GFX1250-NEXT:    flat_load_b64 v[0:1], v[0:1] scope:SCOPE_SYS196; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0197; GFX1250-NEXT:    global_inv scope:SCOPE_SYS198; GFX1250-NEXT:    s_wait_loadcnt 0x0199; GFX1250-NEXT:    s_set_pc_i64 s[30:31]200entry:201  %0 = tail call <2 x i32> @llvm.amdgcn.cooperative.atomic.load.16x8B.p0(ptr %addr, i32 5, metadata !0)202  ret <2 x i32> %0203}204 205define <4 x i32> @test_flat_amdgcn_cooperative_atomic_load_8x16B_seq_cst(ptr noundef readonly %addr)  {206; GFX1250-LABEL: test_flat_amdgcn_cooperative_atomic_load_8x16B_seq_cst:207; GFX1250:       ; %bb.0: ; %entry208; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0209; GFX1250-NEXT:    s_wait_kmcnt 0x0210; GFX1250-NEXT:    s_wait_storecnt 0x0211; GFX1250-NEXT:    flat_load_b128 v[0:3], v[0:1] scope:SCOPE_SYS212; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0213; GFX1250-NEXT:    global_inv scope:SCOPE_SYS214; GFX1250-NEXT:    s_wait_loadcnt 0x0215; GFX1250-NEXT:    s_set_pc_i64 s[30:31]216entry:217  %0 = tail call <4 x i32> @llvm.amdgcn.cooperative.atomic.load.8x16B.p0(ptr %addr, i32 5, metadata !0)218  ret <4 x i32> %0219}220 221define void @test_flat_amdgcn_cooperative_atomic_store_32x4B_seq_cst(ptr noundef %addr, i32 noundef %val)  {222; GFX1250-LABEL: test_flat_amdgcn_cooperative_atomic_store_32x4B_seq_cst:223; GFX1250:       ; %bb.0: ; %entry224; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0225; GFX1250-NEXT:    s_wait_kmcnt 0x0226; GFX1250-NEXT:    global_wb scope:SCOPE_SYS227; GFX1250-NEXT:    s_wait_storecnt 0x0228; GFX1250-NEXT:    flat_store_b32 v[0:1], v2 scope:SCOPE_SYS229; GFX1250-NEXT:    s_wait_dscnt 0x0230; GFX1250-NEXT:    s_set_pc_i64 s[30:31]231entry:232  tail call void @llvm.amdgcn.cooperative.atomic.store.32x4B.p0(ptr %addr, i32 %val, i32 5, metadata !0)233  ret void234}235 236define void @test_flat_amdgcn_cooperative_atomic_store_16x8B_seq_cst(ptr noundef %addr, <2 x i32> noundef %val)  {237; GFX1250-LABEL: test_flat_amdgcn_cooperative_atomic_store_16x8B_seq_cst:238; GFX1250:       ; %bb.0: ; %entry239; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0240; GFX1250-NEXT:    s_wait_kmcnt 0x0241; GFX1250-NEXT:    global_wb scope:SCOPE_SYS242; GFX1250-NEXT:    s_wait_storecnt 0x0243; GFX1250-NEXT:    flat_store_b64 v[0:1], v[2:3] scope:SCOPE_SYS244; GFX1250-NEXT:    s_wait_dscnt 0x0245; GFX1250-NEXT:    s_set_pc_i64 s[30:31]246entry:247  tail call void @llvm.amdgcn.cooperative.atomic.store.16x8B.p0(ptr %addr, <2 x i32> %val, i32 5, metadata !0)248  ret void249}250 251define void @test_flat_amdgcn_cooperative_atomic_store_8x16B_seq_cst(ptr noundef %addr, <4 x i32> noundef %val)  {252; GFX1250-LABEL: test_flat_amdgcn_cooperative_atomic_store_8x16B_seq_cst:253; GFX1250:       ; %bb.0: ; %entry254; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0255; GFX1250-NEXT:    s_wait_kmcnt 0x0256; GFX1250-NEXT:    global_wb scope:SCOPE_SYS257; GFX1250-NEXT:    s_wait_storecnt 0x0258; GFX1250-NEXT:    flat_store_b128 v[0:1], v[2:5] scope:SCOPE_SYS259; GFX1250-NEXT:    s_wait_dscnt 0x0260; GFX1250-NEXT:    s_set_pc_i64 s[30:31]261entry:262  tail call void @llvm.amdgcn.cooperative.atomic.store.8x16B.p0(ptr %addr, <4 x i32> %val, i32 5, metadata !0)263  ret void264}265 266define i32 @test_one_as_flat_amdgcn_cooperative_atomic_load_32x4B_relaxed(ptr noundef readonly %addr)  {267; GFX1250-LABEL: test_one_as_flat_amdgcn_cooperative_atomic_load_32x4B_relaxed:268; GFX1250:       ; %bb.0: ; %entry269; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0270; GFX1250-NEXT:    s_wait_kmcnt 0x0271; GFX1250-NEXT:    flat_load_b32 v0, v[0:1] scope:SCOPE_SYS272; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0273; GFX1250-NEXT:    s_set_pc_i64 s[30:31]274entry:275  %0 = tail call i32 @llvm.amdgcn.cooperative.atomic.load.32x4B.p0(ptr %addr, i32 0, metadata !1)276  ret i32 %0277}278 279define <2 x i32> @test_one_as_flat_amdgcn_cooperative_atomic_load_16x8B_relaxed(ptr noundef readonly %addr)  {280; GFX1250-LABEL: test_one_as_flat_amdgcn_cooperative_atomic_load_16x8B_relaxed:281; GFX1250:       ; %bb.0: ; %entry282; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0283; GFX1250-NEXT:    s_wait_kmcnt 0x0284; GFX1250-NEXT:    flat_load_b64 v[0:1], v[0:1] scope:SCOPE_SYS285; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0286; GFX1250-NEXT:    s_set_pc_i64 s[30:31]287entry:288  %0 = tail call <2 x i32> @llvm.amdgcn.cooperative.atomic.load.16x8B.p0(ptr %addr, i32 0, metadata !1)289  ret <2 x i32> %0290}291 292define <4 x i32> @test_one_as_flat_amdgcn_cooperative_atomic_load_8x16B_relaxed(ptr noundef readonly %addr)  {293; GFX1250-LABEL: test_one_as_flat_amdgcn_cooperative_atomic_load_8x16B_relaxed:294; GFX1250:       ; %bb.0: ; %entry295; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0296; GFX1250-NEXT:    s_wait_kmcnt 0x0297; GFX1250-NEXT:    flat_load_b128 v[0:3], v[0:1] scope:SCOPE_SYS298; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0299; GFX1250-NEXT:    s_set_pc_i64 s[30:31]300entry:301  %0 = tail call <4 x i32> @llvm.amdgcn.cooperative.atomic.load.8x16B.p0(ptr %addr, i32 0, metadata !1)302  ret <4 x i32> %0303}304 305define void @test_one_as_flat_amdgcn_cooperative_atomic_store_32x4B_relaxed(ptr noundef %addr, i32 noundef %val)  {306; GFX1250-LABEL: test_one_as_flat_amdgcn_cooperative_atomic_store_32x4B_relaxed:307; GFX1250:       ; %bb.0: ; %entry308; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0309; GFX1250-NEXT:    s_wait_kmcnt 0x0310; GFX1250-NEXT:    flat_store_b32 v[0:1], v2 scope:SCOPE_SYS311; GFX1250-NEXT:    s_wait_dscnt 0x0312; GFX1250-NEXT:    s_set_pc_i64 s[30:31]313entry:314  tail call void @llvm.amdgcn.cooperative.atomic.store.32x4B.p0(ptr %addr, i32 %val, i32 0, metadata !1)315  ret void316}317 318define void @test_one_as_flat_amdgcn_cooperative_atomic_store_16x8B_relaxed(ptr noundef %addr, <2 x i32> noundef %val)  {319; GFX1250-LABEL: test_one_as_flat_amdgcn_cooperative_atomic_store_16x8B_relaxed:320; GFX1250:       ; %bb.0: ; %entry321; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0322; GFX1250-NEXT:    s_wait_kmcnt 0x0323; GFX1250-NEXT:    flat_store_b64 v[0:1], v[2:3] scope:SCOPE_SYS324; GFX1250-NEXT:    s_wait_dscnt 0x0325; GFX1250-NEXT:    s_set_pc_i64 s[30:31]326entry:327  tail call void @llvm.amdgcn.cooperative.atomic.store.16x8B.p0(ptr %addr, <2 x i32> %val, i32 0, metadata !1)328  ret void329}330 331define void @test_one_as_flat_amdgcn_cooperative_atomic_store_8x16B_relaxed(ptr noundef %addr, <4 x i32> noundef %val)  {332; GFX1250-LABEL: test_one_as_flat_amdgcn_cooperative_atomic_store_8x16B_relaxed:333; GFX1250:       ; %bb.0: ; %entry334; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0335; GFX1250-NEXT:    s_wait_kmcnt 0x0336; GFX1250-NEXT:    flat_store_b128 v[0:1], v[2:5] scope:SCOPE_SYS337; GFX1250-NEXT:    s_wait_dscnt 0x0338; GFX1250-NEXT:    s_set_pc_i64 s[30:31]339entry:340  tail call void @llvm.amdgcn.cooperative.atomic.store.8x16B.p0(ptr %addr, <4 x i32> %val, i32 0, metadata !1)341  ret void342}343 344define i32 @test_one_as_flat_amdgcn_cooperative_atomic_load_32x4B_acquire(ptr noundef readonly %addr)  {345; GFX1250-LABEL: test_one_as_flat_amdgcn_cooperative_atomic_load_32x4B_acquire:346; GFX1250:       ; %bb.0: ; %entry347; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0348; GFX1250-NEXT:    s_wait_kmcnt 0x0349; GFX1250-NEXT:    flat_load_b32 v0, v[0:1] scope:SCOPE_SYS350; GFX1250-NEXT:    s_wait_loadcnt 0x0351; GFX1250-NEXT:    global_inv scope:SCOPE_SYS352; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0353; GFX1250-NEXT:    s_set_pc_i64 s[30:31]354entry:355  %0 = tail call i32 @llvm.amdgcn.cooperative.atomic.load.32x4B.p0(ptr %addr, i32 2, metadata !1)356  ret i32 %0357}358 359define <2 x i32> @test_one_as_flat_amdgcn_cooperative_atomic_load_16x8B_acquire(ptr noundef readonly %addr)  {360; GFX1250-LABEL: test_one_as_flat_amdgcn_cooperative_atomic_load_16x8B_acquire:361; GFX1250:       ; %bb.0: ; %entry362; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0363; GFX1250-NEXT:    s_wait_kmcnt 0x0364; GFX1250-NEXT:    flat_load_b64 v[0:1], v[0:1] scope:SCOPE_SYS365; GFX1250-NEXT:    s_wait_loadcnt 0x0366; GFX1250-NEXT:    global_inv scope:SCOPE_SYS367; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0368; GFX1250-NEXT:    s_set_pc_i64 s[30:31]369entry:370  %0 = tail call <2 x i32> @llvm.amdgcn.cooperative.atomic.load.16x8B.p0(ptr %addr, i32 2, metadata !1)371  ret <2 x i32> %0372}373 374define <4 x i32> @test_one_as_flat_amdgcn_cooperative_atomic_load_8x16B_acquire(ptr noundef readonly %addr)  {375; GFX1250-LABEL: test_one_as_flat_amdgcn_cooperative_atomic_load_8x16B_acquire:376; GFX1250:       ; %bb.0: ; %entry377; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0378; GFX1250-NEXT:    s_wait_kmcnt 0x0379; GFX1250-NEXT:    flat_load_b128 v[0:3], v[0:1] scope:SCOPE_SYS380; GFX1250-NEXT:    s_wait_loadcnt 0x0381; GFX1250-NEXT:    global_inv scope:SCOPE_SYS382; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0383; GFX1250-NEXT:    s_set_pc_i64 s[30:31]384entry:385  %0 = tail call <4 x i32> @llvm.amdgcn.cooperative.atomic.load.8x16B.p0(ptr %addr, i32 2, metadata !1)386  ret <4 x i32> %0387}388 389define void @test_one_as_flat_amdgcn_cooperative_atomic_store_32x4B_release(ptr noundef %addr, i32 noundef %val)  {390; GFX1250-LABEL: test_one_as_flat_amdgcn_cooperative_atomic_store_32x4B_release:391; GFX1250:       ; %bb.0: ; %entry392; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0393; GFX1250-NEXT:    s_wait_kmcnt 0x0394; GFX1250-NEXT:    global_wb scope:SCOPE_SYS395; GFX1250-NEXT:    s_wait_storecnt 0x0396; GFX1250-NEXT:    flat_store_b32 v[0:1], v2 scope:SCOPE_SYS397; GFX1250-NEXT:    s_wait_dscnt 0x0398; GFX1250-NEXT:    s_set_pc_i64 s[30:31]399entry:400  tail call void @llvm.amdgcn.cooperative.atomic.store.32x4B.p0(ptr %addr, i32 %val, i32 3, metadata !1)401  ret void402}403 404define void @test_one_as_flat_amdgcn_cooperative_atomic_store_16x8B_release(ptr noundef %addr, <2 x i32> noundef %val)  {405; GFX1250-LABEL: test_one_as_flat_amdgcn_cooperative_atomic_store_16x8B_release:406; GFX1250:       ; %bb.0: ; %entry407; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0408; GFX1250-NEXT:    s_wait_kmcnt 0x0409; GFX1250-NEXT:    global_wb scope:SCOPE_SYS410; GFX1250-NEXT:    s_wait_storecnt 0x0411; GFX1250-NEXT:    flat_store_b64 v[0:1], v[2:3] scope:SCOPE_SYS412; GFX1250-NEXT:    s_wait_dscnt 0x0413; GFX1250-NEXT:    s_set_pc_i64 s[30:31]414entry:415  tail call void @llvm.amdgcn.cooperative.atomic.store.16x8B.p0(ptr %addr, <2 x i32> %val, i32 3, metadata !1)416  ret void417}418 419define void @test_one_as_flat_amdgcn_cooperative_atomic_store_8x16B_release(ptr noundef %addr, <4 x i32> noundef %val)  {420; GFX1250-LABEL: test_one_as_flat_amdgcn_cooperative_atomic_store_8x16B_release:421; GFX1250:       ; %bb.0: ; %entry422; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0423; GFX1250-NEXT:    s_wait_kmcnt 0x0424; GFX1250-NEXT:    global_wb scope:SCOPE_SYS425; GFX1250-NEXT:    s_wait_storecnt 0x0426; GFX1250-NEXT:    flat_store_b128 v[0:1], v[2:5] scope:SCOPE_SYS427; GFX1250-NEXT:    s_wait_dscnt 0x0428; GFX1250-NEXT:    s_set_pc_i64 s[30:31]429entry:430  tail call void @llvm.amdgcn.cooperative.atomic.store.8x16B.p0(ptr %addr, <4 x i32> %val, i32 3, metadata !1)431  ret void432}433 434define i32 @test_one_as_flat_amdgcn_cooperative_atomic_load_32x4B_seq_cst(ptr noundef readonly %addr)  {435; GFX1250-LABEL: test_one_as_flat_amdgcn_cooperative_atomic_load_32x4B_seq_cst:436; GFX1250:       ; %bb.0: ; %entry437; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0438; GFX1250-NEXT:    s_wait_kmcnt 0x0439; GFX1250-NEXT:    s_wait_storecnt 0x0440; GFX1250-NEXT:    flat_load_b32 v0, v[0:1] scope:SCOPE_SYS441; GFX1250-NEXT:    s_wait_loadcnt 0x0442; GFX1250-NEXT:    global_inv scope:SCOPE_SYS443; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0444; GFX1250-NEXT:    s_set_pc_i64 s[30:31]445entry:446  %0 = tail call i32 @llvm.amdgcn.cooperative.atomic.load.32x4B.p0(ptr %addr, i32 5, metadata !1)447  ret i32 %0448}449 450define <2 x i32> @test_one_as_flat_amdgcn_cooperative_atomic_load_16x8B_seq_cst(ptr noundef readonly %addr)  {451; GFX1250-LABEL: test_one_as_flat_amdgcn_cooperative_atomic_load_16x8B_seq_cst:452; GFX1250:       ; %bb.0: ; %entry453; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0454; GFX1250-NEXT:    s_wait_kmcnt 0x0455; GFX1250-NEXT:    s_wait_storecnt 0x0456; GFX1250-NEXT:    flat_load_b64 v[0:1], v[0:1] scope:SCOPE_SYS457; GFX1250-NEXT:    s_wait_loadcnt 0x0458; GFX1250-NEXT:    global_inv scope:SCOPE_SYS459; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0460; GFX1250-NEXT:    s_set_pc_i64 s[30:31]461entry:462  %0 = tail call <2 x i32> @llvm.amdgcn.cooperative.atomic.load.16x8B.p0(ptr %addr, i32 5, metadata !1)463  ret <2 x i32> %0464}465 466define <4 x i32> @test_one_as_flat_amdgcn_cooperative_atomic_load_8x16B_seq_cst(ptr noundef readonly %addr)  {467; GFX1250-LABEL: test_one_as_flat_amdgcn_cooperative_atomic_load_8x16B_seq_cst:468; GFX1250:       ; %bb.0: ; %entry469; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0470; GFX1250-NEXT:    s_wait_kmcnt 0x0471; GFX1250-NEXT:    s_wait_storecnt 0x0472; GFX1250-NEXT:    flat_load_b128 v[0:3], v[0:1] scope:SCOPE_SYS473; GFX1250-NEXT:    s_wait_loadcnt 0x0474; GFX1250-NEXT:    global_inv scope:SCOPE_SYS475; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0476; GFX1250-NEXT:    s_set_pc_i64 s[30:31]477entry:478  %0 = tail call <4 x i32> @llvm.amdgcn.cooperative.atomic.load.8x16B.p0(ptr %addr, i32 5, metadata !1)479  ret <4 x i32> %0480}481 482define void @test_one_as_flat_amdgcn_cooperative_atomic_store_32x4B_seq_cst(ptr noundef %addr, i32 noundef %val)  {483; GFX1250-LABEL: test_one_as_flat_amdgcn_cooperative_atomic_store_32x4B_seq_cst:484; GFX1250:       ; %bb.0: ; %entry485; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0486; GFX1250-NEXT:    s_wait_kmcnt 0x0487; GFX1250-NEXT:    global_wb scope:SCOPE_SYS488; GFX1250-NEXT:    s_wait_storecnt 0x0489; GFX1250-NEXT:    flat_store_b32 v[0:1], v2 scope:SCOPE_SYS490; GFX1250-NEXT:    s_wait_dscnt 0x0491; GFX1250-NEXT:    s_set_pc_i64 s[30:31]492entry:493  tail call void @llvm.amdgcn.cooperative.atomic.store.32x4B.p0(ptr %addr, i32 %val, i32 5, metadata !1)494  ret void495}496 497define void @test_one_as_flat_amdgcn_cooperative_atomic_store_16x8B_seq_cst(ptr noundef %addr, <2 x i32> noundef %val)  {498; GFX1250-LABEL: test_one_as_flat_amdgcn_cooperative_atomic_store_16x8B_seq_cst:499; GFX1250:       ; %bb.0: ; %entry500; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0501; GFX1250-NEXT:    s_wait_kmcnt 0x0502; GFX1250-NEXT:    global_wb scope:SCOPE_SYS503; GFX1250-NEXT:    s_wait_storecnt 0x0504; GFX1250-NEXT:    flat_store_b64 v[0:1], v[2:3] scope:SCOPE_SYS505; GFX1250-NEXT:    s_wait_dscnt 0x0506; GFX1250-NEXT:    s_set_pc_i64 s[30:31]507entry:508  tail call void @llvm.amdgcn.cooperative.atomic.store.16x8B.p0(ptr %addr, <2 x i32> %val, i32 5, metadata !1)509  ret void510}511 512define void @test_one_as_flat_amdgcn_cooperative_atomic_store_8x16B_seq_cst(ptr noundef %addr, <4 x i32> noundef %val)  {513; GFX1250-LABEL: test_one_as_flat_amdgcn_cooperative_atomic_store_8x16B_seq_cst:514; GFX1250:       ; %bb.0: ; %entry515; GFX1250-NEXT:    s_wait_loadcnt_dscnt 0x0516; GFX1250-NEXT:    s_wait_kmcnt 0x0517; GFX1250-NEXT:    global_wb scope:SCOPE_SYS518; GFX1250-NEXT:    s_wait_storecnt 0x0519; GFX1250-NEXT:    flat_store_b128 v[0:1], v[2:5] scope:SCOPE_SYS520; GFX1250-NEXT:    s_wait_dscnt 0x0521; GFX1250-NEXT:    s_set_pc_i64 s[30:31]522entry:523  tail call void @llvm.amdgcn.cooperative.atomic.store.8x16B.p0(ptr %addr, <4 x i32> %val, i32 5, metadata !1)524  ret void525}526 527!0 = !{ !"" }528!1 = !{ !"one-as" }529 530;; GFX1250: {{.*}}531;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:532; GFX1250-GISEL: {{.*}}533; GFX1250-SDAG: {{.*}}534