[PATCH] D99261: AArch64: support bfloat extend and trunc

Tim Northover via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 24 06:32:29 PDT 2021


t.p.northover created this revision.
Herald added subscribers: danielkiss, hiraditya, kristof.beyls, mcrosier.
t.p.northover requested review of this revision.
Herald added a project: LLVM.

A useful step on the way to supporting full bfloat arithmetic is allowing code that immediately extends a `bfloat` before doing anything non-trivial, and truncate it back before storage.

This patch implements that by making sure we don't try any extload/truncstores and adding patterns for the relevant conversions.

I also had to ban GlobalISel from dealing with bfloat here because its type system only has `s16` and it thinks they're normal `half` conversions.


https://reviews.llvm.org/D99261

Files:
  llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
  llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  llvm/lib/Target/AArch64/AArch64InstrInfo.td
  llvm/test/CodeGen/AArch64/bf16-conversions.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99261.332960.patch
Type: text/x-patch
Size: 8971 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210324/41a9143a/attachment.bin>


More information about the llvm-commits mailing list