[llvm] [AMDGPU] Fix immediate parsing for packed types (PR #202417)

Changpeng Fang via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 9 07:53:02 PDT 2026


================
@@ -2053,7 +2053,7 @@ static const fltSemantics *getFltSemantics(unsigned Size) {
 }
 
 static const fltSemantics *getFltSemantics(MVT VT) {
-  return getFltSemantics(VT.getSizeInBits() / 8);
+  return getFltSemantics(VT.getScalarSizeInBits() / 8);
----------------
changpeng wrote:

> getFltSemantics needs the actual type, not just the size. This function signature is broken to start with?

I checked MVT::getFltSemantics, it does have a complete check the the actual type, especially bf16, We may clone that if we do not want to incur build dependence on CodeGen. But I am confused with the comment here. 'May be called with integer type with equivalent bitwidth'

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


More information about the llvm-commits mailing list