[llvm] [AMDGPU]: Accept constant zero bytes in v_perm OrCombine (PR #66533)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 6 17:32:03 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 bcd1490496a5bf06ce98470ef622db29a8eebbf7 c8037640d248751d1ff22e7ff86113325fafd14b -- llvm/lib/Target/AMDGPU/SIISelLowering.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
index 772e73465a..cac76838db 100644
--- a/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
+++ b/llvm/lib/Target/AMDGPU/SIISelLowering.cpp
@@ -11625,8 +11625,7 @@ calculateSrcByte(const SDValue Op, uint64_t DestByte, uint64_t SrcIndex = 0,
return std::nullopt;
SrcIndex = VecIdx * ScalarSize / 8 + SrcIndex;
- return calculateSrcByte(Op->getOperand(0), DestByte, SrcIndex,
- Depth + 1);
+ return calculateSrcByte(Op->getOperand(0), DestByte, SrcIndex, Depth + 1);
}
// The scalar is 32 bits, so just use the scalar
@@ -12032,7 +12031,6 @@ static SDValue matchPERM(SDNode *N, TargetLowering::DAGCombinerInfo &DCI) {
(N->getOperand(1) == Op || N->getOperand(1) == OtherOp))
return SDValue();
-
// Check that we are not just extracting the bytes in order from an op
if (Op == OtherOp && Op.getValueSizeInBits() == 32) {
int Low16 = PermMask & 0xffff;
``````````
</details>
https://github.com/llvm/llvm-project/pull/66533
More information about the llvm-commits
mailing list