[llvm] [AMDGPU] - Add constant folding to s_wqm intrinsic (PR #72382)

via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 15 09:20:10 PST 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 2060bfcdc7eb704647c64bf925cdceb94c1f535f 08ee504df1ec7a76169b79d68150ae074422bf7d -- llvm/lib/Analysis/ConstantFolding.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp
index d8c96b542e..778d0c4678 100644
--- a/llvm/lib/Analysis/ConstantFolding.cpp
+++ b/llvm/lib/Analysis/ConstantFolding.cpp
@@ -2426,10 +2426,10 @@ static Constant *ConstantFoldScalarCall1(StringRef Name,
 
     case Intrinsic::amdgcn_s_wqm: {
       uint64_t Val = Op->getZExtValue();
-      Val |=
-          (Val & 0x5555555555555555ULL) << 1 | ((Val >> 1) & 0x5555555555555555ULL);
-      Val |=
-          (Val & 0x3333333333333333ULL) << 2 | ((Val >> 2) & 0x3333333333333333ULL);
+      Val |= (Val & 0x5555555555555555ULL) << 1 |
+             ((Val >> 1) & 0x5555555555555555ULL);
+      Val |= (Val & 0x3333333333333333ULL) << 2 |
+             ((Val >> 2) & 0x3333333333333333ULL);
       return ConstantInt::get(Ty, Val);
     }
 

``````````

</details>


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


More information about the llvm-commits mailing list