[PATCH] D144584: [RISCV][NFC] Reuse getDeinterleaveViaVNSRL to lower deinterleave intrinsics

Luke Lau via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 23 08:00:20 PST 2023


luke added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:3478
+  if (isDeinterleaveShuffle(VT, ContainerVT, V1, V2, Mask, Subtarget) &&
+      VT.getScalarSizeInBits() < Subtarget.getELEN()) {
+    return getDeinterleaveViaVNSRL(DL, VT, V1.getOperand(0), Mask[0] == 0,
----------------
reames wrote:
> There's no point in moving this check to the caller as the isDeinterleaveShuffle routine is only being used here.  (Unless maybe you have another patch in mind, but if so, the change should probably be it's own NFC with that explained.)
Yeah, IMO checking if the type is widenable is orthogonal to checking if a vector shuffle is a deinterleave. Splitting it out lets us reuse it for combining deinterleaves of loads of fixed vectors


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144584



More information about the llvm-commits mailing list