[PATCH] D146711: [RISCV] Lower shuffles as vmerge + vslide{up,down} where possible

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 23 14:14:03 PDT 2023


reames added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:3657
+
+    return DAG.getNode(ISD::VSELECT, DL, VT, SelectMask,
+                       SlideIfNeeded(V1, V1SelectOffset),
----------------
I don't have a concrete example, but thinking about it, this seems suspect.  You're computing the select condition vector using the elements at the original offsets, but actually selecting between elements which have been slide up or down.  That doesn't seem right, we should be having to adjust the select mask too.  


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146711



More information about the llvm-commits mailing list