[clang] [clang] VectorExprEvaluator::VisitCallExpr - add constant folding for X86 pslldqi/psrldqi infrinsics (PR #157403)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 11 09:48:10 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 origin/main HEAD --extensions cpp,c -- clang/lib/AST/ExprConstant.cpp clang/test/CodeGen/X86/avx2-builtins.c clang/test/CodeGen/X86/sse2-builtins.c
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/lib/AST/ExprConstant.cpp b/clang/lib/AST/ExprConstant.cpp
index c7ee14e63..0ae958f9b 100644
--- a/clang/lib/AST/ExprConstant.cpp
+++ b/clang/lib/AST/ExprConstant.cpp
@@ -12120,8 +12120,9 @@ bool VectorExprEvaluator::VisitCallExpr(const CallExpr *E) {
SmallVector<APValue, 64> Result;
Result.resize(NumElts, APValue(0));
- bool IsLeft = (E->getBuiltinCallee() == X86::BI__builtin_ia32_pslldqi128_byteshift ||
- E->getBuiltinCallee() == X86::BI__builtin_ia32_pslldqi256_byteshift);
+ bool IsLeft =
+ (E->getBuiltinCallee() == X86::BI__builtin_ia32_pslldqi128_byteshift ||
+ E->getBuiltinCallee() == X86::BI__builtin_ia32_pslldqi256_byteshift);
if (ShiftVal >= LaneBytes)
return Success(APValue(Result.data(), Result.size()), E);
``````````
</details>
https://github.com/llvm/llvm-project/pull/157403
More information about the cfe-commits
mailing list