fallback: translate: call llvm.ctpop.v2i64

Run:explore-b577f07195-20261129-105236
Kind:fallback
Category:translate: call llvm.ctpop.v2i64 M
Occurrences:3 in 3 configs, 2 test files, 6 more counted only
Snippet from:rv64zbb.399dcfb2ff.ll (mutant of rv64zbb.ll) @ctpop_v2i64 via llvm-extract
Config:-mtriple=riscv64 -verify-machineinstrs -mattr=+zbb,+zfinx -O0 -code-model=medium
Local check:reproduces at b577f07195
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G.2 = external global <2 x i1>

; Function Attrs: nounwind
define <2 x i64> @ctpop_v2i64(<2 x i64> %a) #0 {
  %1 = call <2 x i64> @llvm.ctpop.v2i64(<2 x i64> %a)
  %C = icmp sle <2 x i64> %a, %a
  store <2 x i1> %C, ptr @G.2, align 1
  ret <2 x i64> %1
}

; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none)
declare <2 x i64> @llvm.ctpop.v2i64(<2 x i64>) #1

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

Reproduce:

llc -mtriple=riscv64 -verify-machineinstrs -mattr=+zbb,+zfinx -O0 -code-model=medium -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv64 -verify-machineinstrs -mattr=+zbb,+zfinx -O0 -code-model=medium -global-isel=0 snippet.ll -o -

Local llc output:

remark: <unknown>:0:0: unable to translate instruction: call llvm.ctpop.v2i64: '  %1 = call <2 x i64> @llvm.ctpop.v2i64(<2 x i64> %a)' (in function: ctpop_v2i64)
warning: Instruction selection used fallback path for ctpop_v2i64

Occurrences (3):

InputFunctionConfig
rv32zbb.e8aafdb67c.ll (mutant of rv32zbb.ll)ctpop_v2i64_ne_one-mtriple=riscv32 -verify-machineinstrs -mattr=+zbb,+zhinx -O2
rv64zbb.399dcfb2ff.ll (mutant of rv64zbb.ll)ctpop_v2i64-mtriple=riscv64 -verify-machineinstrs -mattr=+zbb,+zfinx -O0 -code-model=medium
rv64zbb.a819d486e4.ll (mutant of rv64zbb.ll)ctpop_v2i64_eq_one-mtriple=riscv64 -verify-machineinstrs -mattr=+zfinx -O0

Generated 2026-11-29 14:49 UTC.