fallback: legalize: G_CTTZ <N x i64>

Run:explore-d9924131a4-20261128-105811
Kind:fallback
Category:legalize: G_CTTZ <N x i64> M
Occurrences:8 in 6 configs, 1 test files, 3 more counted only
Snippet from:fixed-vectors-cttz.02edb9e91a.ll (mutant of fixed-vectors-cttz.ll) @cttz_v4i64 via llvm-extract
Config:-mtriple=riscv32 -verify-machineinstrs -mattr=+m,+zve64f,+zvl128b,+f,+zbb -O3 -code-model=medium
Local check:reproduces at d9924131a4
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

; Function Attrs: nounwind
define void @cttz_v4i64(ptr %x, ptr %y) #0 {
  %A = alloca <4 x i64>, align 32
  store <4 x i64> poison, ptr %A, align 32
  %a = load <4 x i64>, ptr %x, align 32
  %b = load <4 x i64>, ptr %y, align 32
  %c = call <4 x i64> @llvm.cttz.v4i64(<4 x i64> %a, i1 false)
  store <4 x i64> %c, ptr %x, align 32
  store <4 x i64> %c, ptr %A, align 32
  ret void
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare <4 x i64> @llvm.cttz.v4i64(<4 x i64>, i1 immarg) #1

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

Reproduce:

llc -mtriple=riscv32 -verify-machineinstrs -mattr=+m,+zve64f,+zvl128b,+f,+zbb -O3 -code-model=medium -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv32 -verify-machineinstrs -mattr=+m,+zve64f,+zvl128b,+f,+zbb -O3 -code-model=medium -global-isel=0 snippet.ll -o -

Local llc output:

remark: <unknown>:0:0: unable to legalize instruction: %6:_(<4 x i64>) = G_CTTZ %4:_(<4 x i64>) (in function: cttz_v4i64)
warning: Instruction selection used fallback path for cttz_v4i64

Occurrences (8):

InputFunctionConfig
fixed-vectors-cttz.02edb9e91a.ll (mutant of fixed-vectors-cttz.ll)cttz_v4i64-mtriple=riscv32 -verify-machineinstrs -mattr=+m,+zve64f,+zvl128b,+f,+zbb -O3 -code-model=medium
fixed-vectors-cttz.02edb9e91a.ll (mutant of fixed-vectors-cttz.ll)cttz_zero_poison_v2i64-mtriple=riscv32 -verify-machineinstrs -mattr=+m,+zve64f,+zvl128b,+f,+zbb -O3 -code-model=medium
fixed-vectors-cttz.23b8282ec6.ll (mutant of fixed-vectors-cttz.ll)cttz_v2i64-mtriple=riscv64 -verify-machineinstrs -mattr=+v,+zbb -O0
fixed-vectors-cttz.89122c704e.ll (mutant of fixed-vectors-cttz.ll)cttz_zero_poison_v4i64-mtriple=riscv32 -verify-machineinstrs -mattr=+zve64x,+zvl128b,+zbb -O3
fixed-vectors-cttz.9f3e7ac211.ll (mutant of fixed-vectors-cttz.ll)cttz_v4i64-mtriple=riscv32 -verify-machineinstrs -mattr=+m,+v,+d,+zbb -O3
fixed-vectors-cttz.9f3e7ac211.ll (mutant of fixed-vectors-cttz.ll)cttz_zero_poison_v2i64-mtriple=riscv32 -verify-machineinstrs -mattr=+m,+v,+d,+zbb -O3
fixed-vectors-cttz.deda40c536.ll (mutant of fixed-vectors-cttz.ll)cttz_v2i64-mtriple=riscv64 -verify-machineinstrs -mattr=+m,+zve64f,+zvl128b,+f,+zvfh,+zbb -O2
fixed-vectors-cttz.ee6374cb24.ll (mutant of fixed-vectors-cttz.ll)cttz_v4i64-mtriple=riscv64 -verify-machineinstrs -mattr=+m,+zve64f,+zvl128b,+f,+zbb -O0 -code-model=medium

Generated 2026-11-29 14:49 UTC.