[llvm] [AMDGPU] Fix wrong operand value when floating-point value is used as operand of type i16 (PR #84106)

via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 5 19:04:40 PST 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 49ec8b747c83b8dec8317614c30e5610d133790e 719b81261698f89098c94e54b3909affcba95fcb -- llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp b/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
index 5050aec261..fd8ce9e07f 100644
--- a/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
+++ b/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp
@@ -2065,8 +2065,8 @@ bool AMDGPUOperand::isInlinableImm(MVT type) const {
         break;
       }
       return isInlineableLiteralOp16(
-          static_cast<uint16_t>(FPLiteral.bitcastToAPInt().getZExtValue()), type,
-          AsmParser->hasInv2PiInlineImm());
+          static_cast<uint16_t>(FPLiteral.bitcastToAPInt().getZExtValue()),
+          type, AsmParser->hasInv2PiInlineImm());
     }
 
     // Check if single precision literal is inlinable

``````````

</details>


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


More information about the llvm-commits mailing list