blob: 83cf6d45e24388ca39aa237cdab7b2047470b37d [file] [log] [blame]
Konstantin Zhuravlyovbb80d3e2017-07-11 22:23:00 +00001; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx803 -stop-before=si-debugger-insert-nops < %s | FileCheck --check-prefix=GCN %s
2
3; GCN-LABEL: name: syncscopes
Yaxun Liu2a22c5d2018-02-02 16:07:16 +00004; GCN: FLAT_STORE_DWORD killed renamable $vgpr1_vgpr2, killed renamable $vgpr0, 0, 0, 0, implicit $exec, implicit $flat_scr :: (volatile store syncscope("agent") seq_cst 4 into %ir.agent_out)
5; GCN: FLAT_STORE_DWORD killed renamable $vgpr4_vgpr5, killed renamable $vgpr3, 0, 0, 0, implicit $exec, implicit $flat_scr :: (volatile store syncscope("workgroup") seq_cst 4 into %ir.workgroup_out)
6; GCN: FLAT_STORE_DWORD killed renamable $vgpr7_vgpr8, killed renamable $vgpr6, 0, 0, 0, implicit $exec, implicit $flat_scr :: (volatile store syncscope("wavefront") seq_cst 4 into %ir.wavefront_out)
Konstantin Zhuravlyovbb80d3e2017-07-11 22:23:00 +00007define void @syncscopes(
8 i32 %agent,
Yaxun Liu2a22c5d2018-02-02 16:07:16 +00009 i32* %agent_out,
Konstantin Zhuravlyovbb80d3e2017-07-11 22:23:00 +000010 i32 %workgroup,
Yaxun Liu2a22c5d2018-02-02 16:07:16 +000011 i32* %workgroup_out,
Konstantin Zhuravlyovbb80d3e2017-07-11 22:23:00 +000012 i32 %wavefront,
Yaxun Liu2a22c5d2018-02-02 16:07:16 +000013 i32* %wavefront_out) {
Konstantin Zhuravlyovbb80d3e2017-07-11 22:23:00 +000014entry:
Yaxun Liu2a22c5d2018-02-02 16:07:16 +000015 store atomic i32 %agent, i32* %agent_out syncscope("agent") seq_cst, align 4
16 store atomic i32 %workgroup, i32* %workgroup_out syncscope("workgroup") seq_cst, align 4
17 store atomic i32 %wavefront, i32* %wavefront_out syncscope("wavefront") seq_cst, align 4
Konstantin Zhuravlyovbb80d3e2017-07-11 22:23:00 +000018 ret void
19}