[PATCH] D76077: [ARM] Add __bf16 as new Bfloat16 C Type

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 12 11:23:36 PDT 2020


craig.topper added inline comments.


================
Comment at: clang/lib/Basic/Targets/AArch64.cpp:69
+  Bfloat16Width = Bfloat16Align = 16;
+  Bfloat16Format = &llvm::APFloat::IEEEhalf();
+
----------------
Doesn't Bfloat16 have a different number of mantissa and exponent bits than IEEEhalf?


================
Comment at: clang/test/CodeGen/arm-mangle-16bit-float.cpp:4
+
+// CHECK64: define {{.*}}void @_Z3foou6__bf16(half %b)
+// CHECK32: define {{.*}}void @_Z3foou6__bf16(i32 %b.coerce)
----------------
How can bfloat16 be passed as half? Don't they have a different format?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76077/new/

https://reviews.llvm.org/D76077





More information about the cfe-commits mailing list