[llvm] [InstCombine] Implement vp.reverse reordering/elimination through binop/unop (PR #143963)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 16 11:41:07 PDT 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 HEAD~1 HEAD --extensions cpp -- llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
index b56f552ec..72616a85b 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
@@ -3598,8 +3598,9 @@ Instruction *InstCombinerImpl::visitCallInst(CallInst &CI) {
break;
Value *EVL = II->getArgOperand(2);
// rev(unop rev(X)) --> unop X
- if (match(Vec, m_OneUse(m_UnOp(m_Intrinsic<Intrinsic::experimental_vp_reverse>(
- m_Value(X), m_AllOnes(), m_Specific(EVL)))))) {
+ if (match(Vec,
+ m_OneUse(m_UnOp(m_Intrinsic<Intrinsic::experimental_vp_reverse>(
+ m_Value(X), m_AllOnes(), m_Specific(EVL)))))) {
auto *OldUnOp = cast<UnaryOperator>(Vec);
auto *NewUnOp = UnaryOperator::CreateWithCopiedFlags(
OldUnOp->getOpcode(), X, OldUnOp, OldUnOp->getName(),
``````````
</details>
https://github.com/llvm/llvm-project/pull/143963
More information about the llvm-commits
mailing list