[llvm] [CodeGenPrepare] Transform `shl X, cttz(Y)` to `mul (Y & -Y), X` if cttz is unsupported (PR #85066)

via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 13 05:15:35 PDT 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 a7ef83f005beeb3b1c7f34d44167b5abc5b6c4e5 370a2a7e42ec057f6d5efd89ecec44f582fe5676 -- llvm/lib/CodeGen/CodeGenPrepare.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp
index 47a8839c39..fcc0ee9be5 100644
--- a/llvm/lib/CodeGen/CodeGenPrepare.cpp
+++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp
@@ -8418,8 +8418,7 @@ bool CodeGenPrepare::optimizeInst(Instruction *I, ModifyDT &ModifiedDT) {
       }
     }
   }
-  [[fallthrough]]
-  case Instruction::LShr:
+  [[fallthrough]] case Instruction::LShr:
   case Instruction::AShr:
     return optimizeShiftInst(cast<BinaryOperator>(I));
   case Instruction::Call:

``````````

</details>


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


More information about the llvm-commits mailing list