[llvm] [AMDGPU] Add legality check when folding short 64-bit literals (PR #69391)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 17 15:37:22 PDT 2023
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 59908504cd7a72cd2a614e5c6db5410101209365 16db13131fa66da2c2cb7571d08c05b59183b3dd -- llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
index e01ca73c135c..21c6f09e1608 100644
--- a/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
@@ -5493,8 +5493,8 @@ bool SIInstrInfo::isOperandLegal(const MachineInstr &MI, unsigned OpIdx,
if (MO->isImm()) {
uint64_t Imm = MO->getImm();
bool Is64BitFPOp = OpInfo.OperandType == AMDGPU::OPERAND_REG_IMM_FP64;
- bool Is64BitOp = Is64BitFPOp ||
- OpInfo.OperandType == AMDGPU::OPERAND_REG_IMM_INT64;
+ bool Is64BitOp =
+ Is64BitFPOp || OpInfo.OperandType == AMDGPU::OPERAND_REG_IMM_INT64;
if (Is64BitOp && !AMDGPU::isValid32BitLiteral(Imm, Is64BitFPOp) &&
!AMDGPU::isInlinableLiteral64(Imm, ST.hasInv2PiInlineImm()))
return false;
``````````
</details>
https://github.com/llvm/llvm-project/pull/69391
More information about the llvm-commits
mailing list