1; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -strict-whitespace -check-prefix=GCN -check-prefix=NOPRIM %s
2; RUN: llc -march=amdgcn -mcpu=gfx1010 -verify-machineinstrs < %s | FileCheck -strict-whitespace -check-prefix=GCN -check-prefix=PRIM %s
3; RUN: llc -march=amdgcn -mcpu=gfx1100 -verify-machineinstrs < %s | FileCheck -strict-whitespace -check-prefix=GCN -check-prefix=PRIM %s
4
5declare void @llvm.amdgcn.exp.i32(i32, i32, i32, i32, i32, i32, i1, i1) #1
6
7; GCN-LABEL: {{^}}test_export_prim_i32:
8; NOPRIM: exp invalid_target_20 v0, off, off, off done{{$}}
9; PRIM: exp prim v0, off, off, off done{{$}}
10define amdgpu_gs void @test_export_prim_i32(i32 inreg %a) #0 {
11  call void @llvm.amdgcn.exp.i32(i32 20, i32 1, i32 %a, i32 undef, i32 undef, i32 undef, i1 true, i1 false)
12  ret void
13}
14
15attributes #0 = { nounwind }
16attributes #1 = { nounwind inaccessiblememonly }
17