[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
Tue Oct 15 07:19:38 PDT 2024


================
@@ -1043,6 +1178,22 @@ static InstructionsState getSameOpcode(ArrayRef<Value *> VL,
     return InstructionsState(VL[BaseIndex], nullptr, nullptr);
   }
 
+  if (IsBinOp) {
+    auto FindOp =
+        [&](const SmallVector<InterchangeableInstruction> &CandidateOp) {
----------------
alexey-bataev wrote:

```suggestion
        [&](ArrayRef<InterchangeableInstruction> CandidateOp) {
```

https://github.com/llvm/llvm-project/pull/112181


More information about the llvm-commits mailing list