[llvm] [CodeGen] Add widening support for ISD::CTTZ_ELTS (PR #205841)

Chandana Mudda via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 29 00:52:32 PDT 2026


================
@@ -201,4 +201,64 @@ define i16 @ctz_v8i1_i16_ret(<8 x i1> %a) {
   ret i16 %res
 }
 
+define i32 @ctz_v3i32(<3 x i32> %a) {
----------------
chandmudda wrote:

A scalable test that actually exercises this change needs a type that triggers widening (e.g. nxv3i32 → nxv4i32), but RISC-V then aborts with Cannot select: nxv4i1 = get_active_lane_mask ... — a separate RISC-V gap, not introduced here. The SVE nxv3i1 test already covers the scalable widening path. I can still add a scalable RISC-V test that doesn't need widening if you'd like, but it wouldn't exercise this change.

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


More information about the llvm-commits mailing list