fallback: legalize: G_CTLZ <N x i16>

Run:explore-db12fc36f6-20261127-115111
Kind:fallback
Category:legalize: G_CTLZ <N x i16> M
Occurrences:3 in 2 configs, 1 test files, 4 more counted only
Snippet from:fixed-vectors-ctlz.a402694c1e.ll (mutant of fixed-vectors-ctlz.ll) @ctlz_v8i16 via llvm-extract
Config:-mtriple=riscv32 -verify-machineinstrs -mattr=+v,+zvbb,+zbb -O3
Local check:reproduces at db12fc36f6
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

; Function Attrs: nounwind
define void @ctlz_v8i16(ptr %x, ptr %y) #0 {
  %a = load <8 x i16>, ptr %x, align 16
  %c = call <8 x i16> @llvm.ctlz.v8i16(<8 x i16> %a, i1 false)
  store <8 x i16> %c, ptr %x, align 16
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <8 x i16> @llvm.ctlz.v8i16(<8 x i16>, i1 immarg) #1

attributes #0 = { nounwind }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }

Reproduce:

llc -mtriple=riscv32 -verify-machineinstrs -mattr=+v,+zvbb,+zbb -O3 -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv32 -verify-machineinstrs -mattr=+v,+zvbb,+zbb -O3 -global-isel=0 snippet.ll -o -

Local llc output:

remark: <unknown>:0:0: unable to legalize instruction: %3:_(<8 x i16>) = G_CTLZ %2:_(<8 x i16>) (in function: ctlz_v8i16)
warning: Instruction selection used fallback path for ctlz_v8i16

Occurrences (3):

InputFunctionConfig
fixed-vectors-ctlz.a402694c1e.ll (mutant of fixed-vectors-ctlz.ll)ctlz_v8i16-mtriple=riscv32 -verify-machineinstrs -mattr=+v,+zvbb,+zbb -O3
fixed-vectors-ctlz.a402694c1e.ll (mutant of fixed-vectors-ctlz.ll)ctlz_v16i16-mtriple=riscv32 -verify-machineinstrs -mattr=+v,+zvbb,+zbb -O3
fixed-vectors-ctlz.e4b5dfcc77.ll (mutant of fixed-vectors-ctlz.ll)ctlz_v16i16-mtriple=riscv32 -verify-machineinstrs -mattr=+v,+zbb -O2

Generated 2026-11-29 14:49 UTC.