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 c,cpp --
clang/lib/CIR/CodeGen/CIRGenBuiltinX86.cpp
clang/test/CodeGen/X86/avx512bw-builtins.c --diff_from_common_commit
``````````
: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/CIR/CodeGen/CIRGenBuiltinX86.cpp
b/clang/lib/CIR/CodeGen/CIRGenBuiltinX86.cpp
index b53cd4cc9..277e0d877 100644
--- a/clang/lib/CIR/CodeGen/CIRGenBuiltinX86.cpp
+++ b/clang/lib/CIR/CodeGen/CIRGenBuiltinX86.cpp
@@ -84,8 +84,8 @@ static mlir::Value convertKunpckMaskToVector(CIRGenBuilderTy
&builder,
mlir::Type i32Ty = builder.getSInt32Ty();
for (auto i : llvm::seq<unsigned>(0, numElems))
indices.push_back(cir::IntAttr::get(i32Ty, i));
- cir::ConstantOp poison =
- builder.getConstant(mask.getLoc(),
cir::PoisonAttr::get(maskVec.getType()));
+ cir::ConstantOp poison = builder.getConstant(
+ mask.getLoc(), cir::PoisonAttr::get(maskVec.getType()));
maskVec = builder.createVecShuffle(mask.getLoc(), maskVec, poison,
indices);
}
return maskVec;
@@ -99,7 +99,8 @@ static mlir::Value emitKunpckOp(CIRGenBuilderTy &builder,
mlir::Value op0,
mlir::Value rhs = convertKunpckMaskToVector(builder, op1, numElems);
// Build shuffle indices as attributes to avoid redundant conversion.
- // createVecShuffle will loop through the vector again to convert if we use
int64_t.
+ // createVecShuffle will loop through the vector again to convert if we use
+ // int64_t.
llvm::SmallVector<mlir::Attribute, 64> indices;
mlir::Type i32Ty = builder.getSInt32Ty();
for (auto i : llvm::seq<unsigned>(0, numElems))
@@ -110,11 +111,11 @@ static mlir::Value emitKunpckOp(CIRGenBuilderTy &builder,
mlir::Value op0,
// Use poison as second operand for unary shuffle to avoid conversion loop.
cir::ConstantOp poison =
builder.getConstant(loc, cir::PoisonAttr::get(lhs.getType()));
- lhs = builder.createVecShuffle(
- loc, lhs, poison, llvm::ArrayRef(indices.data(), numElems / 2));
- rhs = builder.createVecShuffle(
- loc, rhs, poison, llvm::ArrayRef(indices.data(), numElems / 2));
-
+ lhs = builder.createVecShuffle(loc, lhs, poison,
+ llvm::ArrayRef(indices.data(), numElems / 2));
+ rhs = builder.createVecShuffle(loc, rhs, poison,
+ llvm::ArrayRef(indices.data(), numElems / 2));
+
// Concat the vectors.
// NOTE: Operands are swapped to match the intrinsic definition.
mlir::Value res = builder.createVecShuffle(loc, rhs, lhs, indices);
``````````
</details>
https://github.com/llvm/llvm-project/pull/168757
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits