[PATCH] D117760: [LegalizeTypes][VP] Add splitting support for vp.gather and vp.scatter

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 21 10:16:16 PST 2022


craig.topper added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:1948
+    }
+    if (auto *VPSC = dyn_cast<VPGatherSDNode>(N)) {
+      return {VPSC->getMask(), VPSC->getIndex(), VPSC->getScale()};
----------------
Use and else and a cast instead of the llvm_unreachable?


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:1999
+                             OpsHi, MMO, IndexTy, ExtType);
+  } else if (auto *VPGT = dyn_cast<VPGatherSDNode>(N)) {
+    SDValue EVLLo, EVLHi;
----------------
Just use an else with a cast inside and drop the llvm_unreachable.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D117760/new/

https://reviews.llvm.org/D117760



More information about the llvm-commits mailing list