1 ; RUN: llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx950 -verify-machineinstrs < %s | FileCheck -check-prefixes=GCN %s
2 ; RUN: llc -global-isel=1 -mtriple=amdgcn -mcpu=gfx950 -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s
4 declare i32 @llvm.amdgcn.prng.b32(i32) #0
6 ; GCN-LABEL: {{^}}prng_b32:
7 ; GCN: v_prng_b32_e32 {{v[0-9]+}}, {{s[0-9]+}}
8 define amdgpu_kernel void @prng_b32(ptr addrspace(1) %out, i32 %src) #1 {
9 %prng = call i32 @llvm.amdgcn.prng.b32(i32 %src) #0
10 store i32 %prng, ptr addrspace(1) %out, align 4
14 ; GCN-LABEL: {{^}}prng_b32_constant_4
15 ; GCN: v_prng_b32_e32 {{v[0-9]+}}, 4
16 define amdgpu_kernel void @prng_b32_constant_4(ptr addrspace(1) %out) #1 {
17 %prng = call i32 @llvm.amdgcn.prng.b32(i32 4) #0
18 store i32 %prng, ptr addrspace(1) %out, align 4
22 ; GCN-LABEL: {{^}}prng_b32_constant_100
23 ; GCN: v_prng_b32_e32 {{v[0-9]+}}, 0x64
24 define amdgpu_kernel void @prng_b32_constant_100(ptr addrspace(1) %out) #1 {
25 %prng = call i32 @llvm.amdgcn.prng.b32(i32 100) #0
26 store i32 %prng, ptr addrspace(1) %out, align 4
31 attributes #0 = { nounwind readnone }
32 attributes #1 = { nounwind }