42 lines · plain
1; RUN: llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx950 < %s | FileCheck -check-prefixes=GCN %s2; RUN: llc -global-isel=1 -mtriple=amdgcn -mcpu=gfx950 < %s | FileCheck -check-prefix=GCN %s3; RUN: llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx1250 < %s | FileCheck -check-prefixes=GCN,SDAG %s4; RUN: llc -global-isel=1 -mtriple=amdgcn -mcpu=gfx1250 < %s | FileCheck -check-prefix=GCN %s5 6declare i32 @llvm.amdgcn.prng.b32(i32) #07 8; GCN-LABEL: {{^}}prng_b32:9; GCN: v_prng_b32_e32 {{v[0-9]+}}, {{s[0-9]+}}10define amdgpu_kernel void @prng_b32(ptr addrspace(1) %out, i32 %src) #1 {11 %prng = call i32 @llvm.amdgcn.prng.b32(i32 %src) #012 store i32 %prng, ptr addrspace(1) %out, align 413 ret void14}15 16; GCN-LABEL: {{^}}prng_b32_constant_417; GCN: v_prng_b32_e32 {{v[0-9]+}}, 418define amdgpu_kernel void @prng_b32_constant_4(ptr addrspace(1) %out) #1 {19 %prng = call i32 @llvm.amdgcn.prng.b32(i32 4) #020 store i32 %prng, ptr addrspace(1) %out, align 421 ret void22}23 24; GCN-LABEL: {{^}}prng_b32_constant_10025; GCN: v_prng_b32_e32 {{v[0-9]+}}, 0x6426define amdgpu_kernel void @prng_b32_constant_100(ptr addrspace(1) %out) #1 {27 %prng = call i32 @llvm.amdgcn.prng.b32(i32 100) #028 store i32 %prng, ptr addrspace(1) %out, align 429 ret void30}31 32; GCN-LABEL: {{^}}prng_undef_i32:33; SDAG-NOT: v_prng_b3234define amdgpu_kernel void @prng_undef_i32(ptr addrspace(1) %out) #1 {35 %prng = call i32 @llvm.amdgcn.prng.b32(i32 undef)36 store i32 %prng, ptr addrspace(1) %out, align 437 ret void38}39 40attributes #0 = { nounwind readnone }41attributes #1 = { nounwind }42