34 lines · plain
1; RUN: llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx1250 < %s | FileCheck -check-prefixes=GCN %s2; xUN: llc -global-isel=1 -mtriple=amdgcn -mcpu=gfx1250 < %s | FileCheck -check-prefix=GCN %s3 4; FIXME: GlobalISel does not work with bf165 6declare bfloat @llvm.amdgcn.sqrt.bf16(bfloat) #07 8; GCN-LABEL: {{^}}sqrt_bf16:9; GCN: v_sqrt_bf16_e32 {{v[0-9]+}}, {{s[0-9]+}}10define amdgpu_kernel void @sqrt_bf16(ptr addrspace(1) %out, bfloat %src) #1 {11 %sqrt = call bfloat @llvm.amdgcn.sqrt.bf16(bfloat %src) #012 store bfloat %sqrt, ptr addrspace(1) %out, align 213 ret void14}15 16; GCN-LABEL: {{^}}sqrt_bf16_constant_417; GCN: v_sqrt_bf16_e32 v0, 4.018define amdgpu_kernel void @sqrt_bf16_constant_4(ptr addrspace(1) %out) #1 {19 %sqrt = call bfloat @llvm.amdgcn.sqrt.bf16(bfloat 4.0) #020 store bfloat %sqrt, ptr addrspace(1) %out, align 221 ret void22}23 24; GCN-LABEL: {{^}}sqrt_bf16_constant_10025; GCN: v_sqrt_bf16_e32 {{v[0-9]+}}, 0x42c826define amdgpu_kernel void @sqrt_bf16_constant_100(ptr addrspace(1) %out) #1 {27 %sqrt = call bfloat @llvm.amdgcn.sqrt.bf16(bfloat 100.0) #028 store bfloat %sqrt, ptr addrspace(1) %out, align 229 ret void30}31 32attributes #0 = { nounwind readnone }33attributes #1 = { nounwind }34