33 lines · plain
1; RUN: not llc < %s -mtriple=amdgcn -mcpu=hawaii2; RUN: not llc < %s -mtriple=amdgcn -mcpu=tonga3; RUN: not llc < %s -mtriple=amdgcn -mcpu=gfx9004; RUN: not llc < %s -mtriple=amdgcn -mcpu=gfx10105 6; TODO: Add GlobalISel tests, currently it silently miscompiles as GISel does not handle BF16 at all.7 8; We only have storage-only BF16 support so check codegen fails if we attempt to do operations on bfloats.9 10define void @test_fneg(bfloat %a, ptr addrspace(1) %out) {11 %result = fneg bfloat %a12 store bfloat %result, ptr addrspace(1) %out13 ret void14}15 16define void @test_fabs(bfloat %a, ptr addrspace(1) %out) {17 %result = fabs bfloat %a18 store bfloat %result, ptr addrspace(1) %out19 ret void20}21 22define void @test_add(bfloat %a, bfloat %b, ptr addrspace(1) %out) {23 %result = fadd bfloat %a, %b24 store bfloat %result, ptr addrspace(1) %out25 ret void26}27 28define void @test_mul(bfloat %a, bfloat %b, ptr addrspace(1) %out) {29 %result = fmul bfloat %a, %b30 store bfloat %result, ptr addrspace(1) %out31 ret void32}33