[qt/clang/llvm]: Summary of bulk changes made
KDE Git Services - Bulk Change <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git repository change summary for qt/clang/llvm Pushed by mirror-service into branch 'upstream/users/chinmaydd/builtin-convert-to-arbitrary-fp'. Changed from 0000000000000000000000000000000000000000 to b8a1592b613e61e8f91059c5909bcb3b944a1b32 Acknowledgement was received that this change introduces only existing code that has been pushed to another public open source repository. This change contains the following new commits: Git commit b824a69a854969635c926a8e05efc2e1e9f710f4 by Chinmay Deshpande on 27/07/2026 at 18:49.. [clang] Add __builtin_convert_from_arbitrary_fp Expose the llvm.convert.from.arbitrary.fp intrinsic as a target-independent builtin. It reinterprets an integer as the bits of a narrow floating-point format that has no corresponding C type, and widens it to a native floating-point type: _Float16 h = __builtin_convert_from_arbitrary_fp(b, "Float8E4M3FN", _Float16); Since the destination type cannot be derived from the arguments, it is passed as a type argument and the builtin is parsed as a keyword, following the __builtin_convertvector precedent. The format is a string literal validated with APFloatBase::isValidArbitraryFPFormat, so every format the IR verifier accepts is accepted here; formats that no target lowers yet keep being reported by the backend. The integer operand may be any integer type whose width matches the format, which covers char/unsigned char for the 8-bit formats and _BitInt for the narrower ones. Vector operands are supported with matching element counts. Clang only permits _BitInt vector elements of power-of-two width, so vectors of the 6-bit formats cannot be spelled. Change-Id: Ie725d2e7b1889f7c6368036a8c28e8ee18dd4125 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> https://invent.kde.org/qt/clang/llvm/-/commit/b824a69a854969635c926a8e05efc2e1e9f710f4 Git commit b8a1592b613e61e8f91059c5909bcb3b944a1b32 by Chinmay Deshpande on 27/07/2026 at 19:05.. [clang] Add __builtin_convert_to_arbitrary_fp Expose the llvm.convert.to.arbitrary.fp intrinsic as a target-independent builtin, the inverse of __builtin_convert_from_arbitrary_fp: unsigned _BitInt(8) b = __builtin_convert_to_arbitrary_fp(f, "Float8E4M3FN", "round.tonearest", 1); The result type is derived from the format, so unlike the "from" direction this is an ordinary CustomTypeChecking builtin with no parser or AST support needed. It is unsigned _BitInt(N) for a scalar operand and an ext_vector_type of that for a vector operand. The rounding mode is a string literal validated with convertStrToRoundingMode, matching what the IR verifier accepts, and the saturation flag must be an integer constant expression equal to 0 or 1 since the intrinsic marks it ImmArg. Clang only permits _BitInt vector elements of power-of-two width, so vector operands are rejected for the 6-bit formats. Change-Id: Ibb5ce6922e73042b00df27d5d2bce3cd2c1c1f51 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> https://invent.kde.org/qt/clang/llvm/-/commit/b8a1592b613e61e8f91059c5909bcb3b944a1b32