1; RUN: not llc < %s -mtriple=amdgcn -mcpu=hawaii 2; RUN: not llc < %s -mtriple=amdgcn -mcpu=tonga 3; RUN: not llc < %s -mtriple=amdgcn -mcpu=gfx900 4; RUN: not llc < %s -mtriple=amdgcn -mcpu=gfx1010 5 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 %a 12 store bfloat %result, ptr addrspace(1) %out 13 ret void 14} 15 16define void @test_fabs(bfloat %a, ptr addrspace(1) %out) { 17 %result = fabs bfloat %a 18 store bfloat %result, ptr addrspace(1) %out 19 ret void 20} 21 22define void @test_add(bfloat %a, bfloat %b, ptr addrspace(1) %out) { 23 %result = fadd bfloat %a, %b 24 store bfloat %result, ptr addrspace(1) %out 25 ret void 26} 27 28define void @test_mul(bfloat %a, bfloat %b, ptr addrspace(1) %out) { 29 %result = fmul bfloat %a, %b 30 store bfloat %result, ptr addrspace(1) %out 31 ret void 32} 33