[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 21 13:23:19 PDT 2024


================
@@ -2335,24 +2479,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);
----------------
alexey-bataev wrote:

Suggest to pass it to VLOperands constructor instead and use it instead of regenerating.

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


More information about the llvm-commits mailing list