fallback: translate: call llvm.ctlz.i64

Run:explore-d9924131a4-20261128-105811
Kind:fallback
Category:translate: call llvm.ctlz.i64 M
Occurrences:5 in 5 configs, 2 test files, 4 more counted only
Snippet from:ctlz-cttz-ctpop.288b46cd03.ll (mutant of ctlz-cttz-ctpop.ll) @test_ctlz_i64 via llvm-extract
Config:-mtriple=riscv64 -verify-machineinstrs -mattr=+zdinx -O0
Local check:reproduces at d9924131a4
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

; Function Attrs: nounwind
define i64 @test_ctlz_i64(i64 %a) #0 {
  %tmp = call i64 @llvm.ctlz.i64(i64 %a, i1 false)
  %C = icmp ugt i64 %a, %a
  store i1 %C, ptr poison, align 1
  ret i64 %tmp
}

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.ctlz.i64(i64, i1 immarg) #1

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

Reproduce:

llc -mtriple=riscv64 -verify-machineinstrs -mattr=+zdinx -O0 -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv64 -verify-machineinstrs -mattr=+zdinx -O0 -global-isel=0 snippet.ll -o -

Local llc output:

remark: <unknown>:0:0: unable to translate instruction: call llvm.ctlz.i64: '  %tmp = call i64 @llvm.ctlz.i64(i64 %a, i1 false)' (in function: test_ctlz_i64)
warning: Instruction selection used fallback path for test_ctlz_i64

Occurrences (5):

InputFunctionConfig
ctlz-cttz-ctpop.0cb7fd1909.ll (mutant of ctlz-cttz-ctpop.ll)test_ctlz_i64-mtriple=riscv64 -verify-machineinstrs -mattr=+zbb,+zhinx -O0
ctlz-cttz-ctpop.288b46cd03.ll (mutant of ctlz-cttz-ctpop.ll)test_ctlz_i64-mtriple=riscv64 -verify-machineinstrs -mattr=+zdinx -O0
ctlz-cttz-ctpop.3928e10b72.ll (mutant of ctlz-cttz-ctpop.ll)test_ctlz_i64-mtriple=riscv64 -verify-machineinstrs -mattr=+zbb,+zfinx,+a -O2
ctlz-cttz-ctpop.c5a04cf881.ll (mutant of ctlz-cttz-ctpop.ll)test_ctlz_i64-mtriple=riscv64 -verify-machineinstrs -mattr=+zicond,+zfinx -O0
ctz_zero_return_test.6a82b59854.ll (mutant of ctz_zero_return_test.ll)ctlz-mtriple=riscv64 -verify-machineinstrs -mattr=+zfinx -O1

Generated 2026-11-29 14:49 UTC.