[llvm] Add ShuffleVectorInst. (PR #104891)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 19 18:55:52 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 d3864d946a178807bb5a87d3d1690e213c89e5be 5f8b0b56a303ecf31d5fc857e11cafe26875516c --extensions cpp,h -- llvm/include/llvm/SandboxIR/SandboxIR.h llvm/lib/SandboxIR/SandboxIR.cpp llvm/unittests/SandboxIR/SandboxIRTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/SandboxIR/SandboxIR.h b/llvm/include/llvm/SandboxIR/SandboxIR.h
index 4b2bc9e396..e924bbb480 100644
--- a/llvm/include/llvm/SandboxIR/SandboxIR.h
+++ b/llvm/include/llvm/SandboxIR/SandboxIR.h
@@ -949,7 +949,7 @@ public:
};
class ShuffleVectorInst final
- : public SingleLLVMInstructionImpl<llvm::ShuffleVectorInst> {
+ : public SingleLLVMInstructionImpl<llvm::ShuffleVectorInst> {
/// Use Context::createShuffleVectorInst() instead.
ShuffleVectorInst(llvm::Instruction *I, Context &Ctx)
: SingleLLVMInstructionImpl(ClassID::ShuffleVector, Opcode::ShuffleVector,
@@ -981,13 +981,10 @@ public:
static bool isValidOperands(const Value *V1, const Value *V2,
ArrayRef<int> Mask) {
- return llvm::ShuffleVectorInst::isValidOperands(V1->Val, V2->Val,
- Mask);
+ return llvm::ShuffleVectorInst::isValidOperands(V1->Val, V2->Val, Mask);
}
- void commute() {
- cast<llvm::ShuffleVectorInst>(Val)->commute();
- }
+ void commute() { cast<llvm::ShuffleVectorInst>(Val)->commute(); }
VectorType *getType() const {
return cast<llvm::ShuffleVectorInst>(Val)->getType();
@@ -1171,7 +1168,8 @@ public:
}
static bool isReplicationMask(const Constant *Mask, int &ReplicationFactor,
int &VF) {
- return llvm::ShuffleVectorInst::isReplicationMask(cast<llvm::Constant>(Mask->Val), ReplicationFactor, VF);
+ return llvm::ShuffleVectorInst::isReplicationMask(
+ cast<llvm::Constant>(Mask->Val), ReplicationFactor, VF);
}
/// Return true if this shuffle mask is a replication mask.
``````````
</details>
https://github.com/llvm/llvm-project/pull/104891
More information about the llvm-commits
mailing list