[llvm] Outline X86 autoupgrade patterns (PR #97851)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 5 15:08:50 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 3bfc5167d9e49b9a53e364e8d8853fce543cca0f 638eb82b646199db398d087a8a1b3a84d0a50ce8 -- llvm/lib/IR/AutoUpgrade.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/IR/AutoUpgrade.cpp b/llvm/lib/IR/AutoUpgrade.cpp
index 4fcf39a6a1..53de9eef51 100644
--- a/llvm/lib/IR/AutoUpgrade.cpp
+++ b/llvm/lib/IR/AutoUpgrade.cpp
@@ -2745,8 +2745,7 @@ static Value *upgradeX86IntrinsicCall(StringRef Name, CallBase *CI, Function *F,
Value *Sel0 = Builder.CreateAnd(CI->getArgOperand(0), Sel);
Value *Sel1 = Builder.CreateAnd(CI->getArgOperand(1), NotSel);
Rep = Builder.CreateOr(Sel0, Sel1);
- } else if (Name.starts_with("xop.vprot") ||
- Name.starts_with("avx512.prol") ||
+ } else if (Name.starts_with("xop.vprot") || Name.starts_with("avx512.prol") ||
Name.starts_with("avx512.mask.prol")) {
Rep = upgradeX86Rotate(Builder, *CI, false);
} else if (Name.starts_with("avx512.pror") ||
@@ -3025,8 +3024,7 @@ static Value *upgradeX86IntrinsicCall(StringRef Name, CallBase *CI, Function *F,
if (CI->arg_size() == 4)
Rep = emitX86Select(Builder, CI->getArgOperand(3), Rep,
CI->getArgOperand(2));
- } else if (Name.starts_with("avx.vperm2f128.") ||
- Name == "avx2.vperm2i128") {
+ } else if (Name.starts_with("avx.vperm2f128.") || Name == "avx2.vperm2i128") {
// The immediate permute control byte looks like this:
// [1:0] - select 128 bits from sources for low half of destination
// [2] - ignore
``````````
</details>
https://github.com/llvm/llvm-project/pull/97851
More information about the llvm-commits
mailing list