[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
Mon Oct 14 13:46:25 PDT 2024


================
@@ -2335,24 +2486,41 @@ class BoUpSLP {
                                  : cast<Instruction>(VL[0])->getNumOperands();
       OpsVec.resize(NumOperands);
       unsigned NumLanes = VL.size();
-      for (unsigned OpIdx = 0; OpIdx != NumOperands; ++OpIdx) {
+      InstructionsState S = getSameOpcode(VL, TLI);
+      for (unsigned OpIdx = 0; OpIdx != NumOperands; ++OpIdx)
----------------
alexey-bataev wrote:

`for (unsigned OpIdx : seq<unsigned>(NumOperands))`

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


More information about the llvm-commits mailing list