[llvm] [SLP] Make getSameOpcode support different instructions if they have same semantics. (PR #112181)
Alexey Bataev via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 11 13:33:11 PST 2024
================
@@ -1075,6 +1224,24 @@ static InstructionsState getSameOpcode(ArrayRef<Value *> VL,
return InstructionsState::invalid();
}
+ if (IsBinOp) {
+ auto FindOp = [&](ArrayRef<InterchangeableInstruction> CandidateOp) {
+ for (Value *V : VL) {
+ if (!isa<Instruction>(V))
+ continue;
----------------
alexey-bataev wrote:
```suggestion
if (isa<PoisonValue>(V))
continue;
```
https://github.com/llvm/llvm-project/pull/112181
More information about the llvm-commits
mailing list