[clang] [Clang] Add elementwise conversions from encoded FP8 values (PR #212647)

Dmitry Sidorov via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 9 03:24:40 PDT 2026


================
@@ -0,0 +1,30 @@
+//===--- ArbitraryFPFormats.def - Arbitrary FP format database --*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// Source encodings exposed by the __builtin_elementwise_convert_from_* family.
+// Src is the source half of the builtin name suffix; LLVMName is the
+// llvm.convert.from.arbitrary.fp interpretation string.
+//
+// Each entry needs a matching instantiation in Builtins.td: expansions name
+// builtin IDs directly, so a stale entry fails to compile. An entry must also
+// be accepted by APFloat::getArbitraryFPSemantics, or lowering fails.
+//
+// The sub-byte encodings (Float6E3M2FN, Float6E2M3FN, Float4E2M1FN) lower but
+// are not exposed; Clang cannot spell their vector element types coherently.
----------------
MrSidims wrote:

Not sure if I understand, what is not working. I thought I have fixed _BitInt + vector usage [some time ago](https://github.com/llvm/llvm-project/pull/140253).

https://github.com/llvm/llvm-project/pull/212647


More information about the cfe-commits mailing list