[llvm] [SelectionDAG][AMDGPU] Negative offset when selecting scratch sv offsets (PR #122251)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 9 03:25:26 PST 2025


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 fd6baa477fa13a4b893aeeba7fce92eb6a1f4962 8683ff0882c2019dd2a4c6d2c509a59d054d92d6 --extensions cpp -- llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp b/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
index 7c1d92504d..9fa9cccd3e 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp
@@ -1927,7 +1927,7 @@ bool AMDGPUDAGToDAGISel::checkFlatScratchSVSSwizzleBug(
   KnownBits SKnown =
       KnownBits::add(CurDAG->computeKnownBits(SAddr),
                      KnownBits::makeConstant(APInt(32, ImmOffset,
-                                                   /*isSigned=*/ true)));
+                                                   /*isSigned=*/true)));
   uint64_t VMax = VKnown.getMaxValue().getZExtValue();
   uint64_t SMax = SKnown.getMaxValue().getZExtValue();
   return (VMax & 3) + (SMax & 3) >= 4;

``````````

</details>


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


More information about the llvm-commits mailing list