arith::TruncFOp is currently lowered to a number of bitwise operations since the llvm-spirv translation of
fptrunc float %21 to bfloat, !dbg !22
is
with half defined as
This is partially solved with PR #1074, but the Intel SPIR-V intrinsics only supports round-to-nearest-even so there are still some bit operations for truncation with round-to-zero.
One of the big barriers for the SPIR-V Translation Tools (llvm-spirv) is that there isn't even a bf16 type in base SPIR-V, we just have the intel extensions to truncate to a bf16 format but the type is i16.
Currently we don't see patching llvm-spirv as a solution for internal reasons.