[PATCH] D125950: [LegalizeTypes][VP] Add widen and split support for VP_TRUNCATE

Fraser Cormack via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 19 00:25:54 PDT 2022


frasercrmck added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:3405
   // to split more than once.
+  // FIXME: VP_TRUNCATE only implement SplitVecOp_UnaryOp for RISCV. But to
+  // other Targets maybe need to special handle in this functions.
----------------
I don't follow this comment, I'm afraid. Is it saying that other targets may need special target-specific handling in `SplitVeOp_UnaryOp` for `VP_TRUNCATE`? I'd prefer to avoid mentioning targets in SelectionDAG if it can be helped - this is meant to be target-agnostic code.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp:4209
+      if (N->getNumOperands() == 3) {
+        SDValue Mask =
+            GetWidenedMask(N->getOperand(1), WidenVT.getVectorElementCount());
----------------
Maybe an assert like `ISD::isVPOpcode`? here?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125950



More information about the llvm-commits mailing list