[PATCH] D82206: [ARM][BFloat] Implement bf16 get/set_lane without casts to i16 vectors

Mikhail Maltsev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 19 10:19:22 PDT 2020


miyuki created this revision.
miyuki added reviewers: stuij, labrinea, dmgreen, simon_tatham.
Herald added subscribers: cfe-commits, danielkiss, kristof.beyls.
Herald added a project: clang.
miyuki added a child revision: D80928: [BFloat] Add convert/copy instrinsic support.

Currently, in order to extract an element from a bf16 vector, we cast
the vector to an i16 vector, perform the extraction, and cast the result to
bfloat. This behavior was copied from the old fp16 implementation.

The goal of this patch is to achieve optimal code generation for lane
copying intrinsics in a subsequent patch (LLVM fails to fold certain
combinations of bitcast, insertelement, extractelement and
shufflevector instructions leading to the generation of suboptimal code).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D82206

Files:
  clang/include/clang/Basic/arm_neon.td
  clang/lib/CodeGen/CGBuiltin.cpp
  clang/test/CodeGen/arm-bf16-getset-intrinsics.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82206.272118.patch
Type: text/x-patch
Size: 11166 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200619/86b8a469/attachment-0001.bin>


More information about the cfe-commits mailing list