fallback: translate: call llvm.cttz.i16

Run:explore-b577f07195-20261129-105236
Kind:fallback
Category:translate: call llvm.cttz.i16 M
Occurrences:4 in 4 configs, 3 test files, 7 more counted only
Snippet from:shl-cttz.3d01eed170.ll (mutant of shl-cttz.ll) @shl_cttz_i16 via llvm-extract
Config:-mtriple=riscv32 -mattr=+m,+zfinx -O3 -code-model=small -verify-machineinstrs
Local check:reproduces at b577f07195
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G = external global i16

define i16 @shl_cttz_i16(i16 %x, i16 %y) {
entry:
  %cttz = call i16 @llvm.cttz.i16(i16 %y, i1 true)
  %B = xor i16 %y, 0
  %res = shl i16 %x, %cttz
  store i16 %B, ptr @G, align 2
  ret i16 %res
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i16 @llvm.cttz.i16(i16, i1 immarg) #0

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

Reproduce:

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

Local llc output:

remark: <unknown>:0:0: unable to translate instruction: call llvm.cttz.i16: '  %cttz = call i16 @llvm.cttz.i16(i16 %y, i1 true)' (in function: shl_cttz_i16)
warning: Instruction selection used fallback path for shl_cttz_i16

Occurrences (4):

InputFunctionConfig
ctlz-cttz-ctpop.cb5f76b06c.ll (mutant of ctlz-cttz-ctpop.ll)test_cttz_i16-mtriple=riscv64 -verify-machineinstrs -mattr=+zbb,+zicsr,+zdinx -O2
rv32xtheadbb.d898d9d3c8.ll (mutant of rv32xtheadbb.ll)cttz_zero_poison_i16-mtriple=riscv32 -mattr=+xtheadbb,+zbkb,+zfinx -O0 -verify-machineinstrs
shl-cttz.3d01eed170.ll (mutant of shl-cttz.ll)shl_cttz_i16-mtriple=riscv32 -mattr=+m,+zfinx -O3 -code-model=small -verify-machineinstrs
shl-cttz.864f5fdab1.ll (mutant of shl-cttz.ll)shl_cttz_constant_i16-mtriple=riscv64 -mattr=+m,+zbb,+zba,+zhinx -O3 -verify-machineinstrs

Generated 2026-11-29 14:49 UTC.