[llvm] [AMDGPU] Replace `isInlinableLiteral16` with specific version (PR #81345)

Stanislav Mekhanoshin via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 26 11:50:24 PST 2024


================
@@ -539,8 +539,17 @@ void AMDGPUInstPrinter::printImmediate16(uint32_t Imm,
   }
 
   uint16_t HImm = static_cast<uint16_t>(Imm);
-  if (printImmediateFloat16(HImm, STI, O))
-    return;
+  switch (OpType) {
+  case AMDGPU::OPERAND_REG_IMM_FP16:
----------------
rampitec wrote:

Does it need to handle bf16 here? It is somewhat weird to have `printImmediate16` and only handle i16 and f16. Or should it be renamed into `printImmediateF16` and have no `OpType` and this switch, given its only use?

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


More information about the llvm-commits mailing list