[PATCH] D126276: [LegalizeTypes][VP] Fix OpNo in WidenVecOp_VP_SCATTER

WangLian via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 23 23:34:03 PDT 2022


Jimerlife created this revision.
Jimerlife added reviewers: craig.topper, victor-eds, frasercrmck, simoll, benshi001.
Jimerlife added a project: LLVM.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
Jimerlife requested review of this revision.
Herald added subscribers: llvm-commits, jacquesguan.

Fix OpNo in WidenVecOp_VP_SCATTER. When widen index, the OpNo should be 3.
VPScatterSDNode (Chain, value, base, index, scale, mask, vlen)


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D126276

Files:
  llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp


Index: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
===================================================================
--- llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+++ llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
@@ -5945,7 +5945,7 @@
     Mask = GetWidenedMask(Mask, WideEC);
     WideMemVT = EVT::getVectorVT(*DAG.getContext(),
                                  VPSC->getMemoryVT().getScalarType(), WideEC);
-  } else if (OpNo == 4) {
+  } else if (OpNo == 3) {
     // Just widen the index. It's allowed to have extra elements.
     Index = GetWidenedVector(Index);
   } else


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D126276.431598.patch
Type: text/x-patch
Size: 611 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220524/1b42cc70/attachment.bin>


More information about the llvm-commits mailing list