[PATCH] D137704: [RISCV] Make lowerVECTOR_SHUFFLEAsVNSRL support more vnsrl shuffle pattern.

Han-Kuan Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 13 20:22:28 PST 2022


HanKuanChen added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVISelLowering.cpp:2924
+      getContainerForFixedLengthVector(DAG, WidenVT, Subtarget);
+  // Do bitcast first, then convert it to scalable vector.
+  SDValue WidenSrc = DAG.getBitcast(WidenVT, Src);
----------------
craig.topper wrote:
> Why did you change the order of bitcast and conversion?
> Why did you change the order of bitcast and conversion?

Example: `Src` is `v4i32`.
If we do bitcast then conversion, we get `v2i64` and `nxv1i64`.
If we do conversion then bitcast, we only get `nxv1i32` because `nxv1i32` and `nxv1i64` do not have same size.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137704



More information about the llvm-commits mailing list