[llvm] [SLP]Initial support for copyable elements (non-schedulable only) (PR #140279)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 17 10:24:23 PDT 2025
================
@@ -1220,6 +1235,48 @@ class InstructionsState {
InstructionsState(Instruction *MainOp, Instruction *AltOp)
: MainOp(MainOp), AltOp(AltOp) {}
static InstructionsState invalid() { return {nullptr, nullptr}; }
+
+ bool isCopyableElement(Value *V) const {
+ assert(valid() && "InstructionsState is invalid.");
+ if (isAltShuffle() || getOpcode() == Instruction::GetElementPtr)
+ return false;
+ auto *I = dyn_cast<Instruction>(V);
+ if (!I && isa<PoisonValue>(V))
+ return false;
----------------
alexey-bataev wrote:
Done
https://github.com/llvm/llvm-project/pull/140279
More information about the llvm-commits
mailing list