[llvm] [AMDGPU] Fix inline constant encoding for `v_pk_fmac_f16` (PR #176659)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 19 01:51:35 PST 2026
================
@@ -3168,6 +3168,34 @@ std::optional<unsigned> getInlineEncodingV2F16(uint32_t Literal) {
return getInlineEncodingV216(true, Literal);
}
+// Encoding of the literal as an inline constant for V_PK_FMAC_F16 instruction
+// or nullopt. This accounts for different inline constant behavior:
+// - Pre-GFX11: fp16 inline constants have the value in low 16 bits, 0 in high
+// - GFX11+: fp16 inline constants are duplicated into both halves
+std::optional<unsigned> getPKFMACF16InlineEncoding(uint32_t Literal,
+ bool IsPreGFX11) {
----------------
arsenm wrote:
Can you invert this flag?
https://github.com/llvm/llvm-project/pull/176659
More information about the llvm-commits
mailing list