[clang] [llvm] [AMDGPU] Add intrinsics and builtins for v_cvt_scale_pk32_* instructions (PR #222617)

Krzysztof Drewniak via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 25 10:53:27 PDT 2026


================
@@ -877,6 +877,114 @@ integers.
 }];
 }
 
+def DocCvtScalePk32BF16BF6 : Documentation {
+  let Category = DocCatAMDGPUConversion;
+  let Content = [{
+Converts 32 packed 6-bit brain-float values in ``src`` to brain-float16, then
+multiplies each result by a shared block-scale factor.
+
+``src`` is a 6-element ``uint`` vector holding 32 six-bit values packed
+contiguously.
+
+``scale`` contains four packed 8-bit E8M0 scale factors.
+
+``scale_sel`` is a compile-time argument in the range [0, 3] to select the
+applicable scale factor.
----------------
krzysz00 wrote:

```suggestion
``scale_sel`` is a compile-time constant in the range [0, 3] to select the
byte in ``scale`` that contains the scale factor.
```

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


More information about the llvm-commits mailing list