[llvm] [RISCV][VLOPT] Add support for checkUsers when UserMI is a Single-Width Integer Reduction (PR #120345)

Pengcheng Wang via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 1 18:54:36 PST 2025


================
@@ -12,9 +12,11 @@ define i16 @ctz_v4i32(<4 x i32> %a) {
 ; RV32-NEXT:    vsetvli zero, zero, e8, mf4, ta, ma
 ; RV32-NEXT:    vmv.v.i v8, 0
 ; RV32-NEXT:    vmerge.vim v8, v8, -1, v0
+; RV32-NEXT:    vsetivli zero, 1, e8, mf4, ta, ma
 ; RV32-NEXT:    vid.v v9
----------------
wangpc-pp wrote:

I think it is VL-specific. vid.v generates a sequence of index ([0, 1, 2, ...]).

https://github.com/llvm/llvm-project/pull/120345


More information about the llvm-commits mailing list