[llvm] [RISCV] Fold vector shift of sext/zext to widening multiply (PR #121563)
Piotr Fusik via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 7 09:28:00 PST 2025
================
@@ -238,12 +238,20 @@ define <vscale x 2 x i64> @vwsll_vx_i8_nxv2i64_zext(<vscale x 2 x i32> %a, i8 %b
}
define <vscale x 2 x i64> @vwsll_vi_nxv2i64(<vscale x 2 x i32> %a, <vscale x 2 x i1> %m, i32 zeroext %vl) {
-; CHECK-LABEL: vwsll_vi_nxv2i64:
-; CHECK: # %bb.0:
-; CHECK-NEXT: vsetvli zero, a0, e64, m2, ta, ma
-; CHECK-NEXT: vzext.vf2 v10, v8
-; CHECK-NEXT: vsll.vi v8, v10, 2, v0.t
-; CHECK-NEXT: ret
+; CHECK-RV32-LABEL: vwsll_vi_nxv2i64:
+; CHECK-RV32: # %bb.0:
+; CHECK-RV32-NEXT: vsetvli zero, a0, e64, m2, ta, ma
+; CHECK-RV32-NEXT: vzext.vf2 v10, v8
+; CHECK-RV32-NEXT: vsll.vi v8, v10, 2, v0.t
----------------
pfusik wrote:
rv32 RVV is rare, I suppose?
I'd prefer to do it right away, so that the test in `vwsll-sdnode.ll` doesn't disappear. Handling it here prioritizes `vwmulu` over `vwsll` -- I'll debug it.
https://github.com/llvm/llvm-project/pull/121563
More information about the llvm-commits
mailing list