fallback: translate: trunc i128

Run:explore-db12fc36f6-20261127-115111
Kind:fallback
Category:translate: trunc i128 M
Occurrences:3 in 3 configs, 3 test files, 4 more counted only
Snippet from:calling-conv-lp64-lp64f-lp64d-common.0430230a96.ll (mutant of calling-conv-lp64-lp64f-lp64d-common.ll) @callee_i128_in_regs via llvm-extract
Config:-mtriple=riscv64 -verify-machineinstrs -mattr=+zicsr,+zfinx -O1
Local check:reproduces at db12fc36f6
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G.5 = external global i1

; Function Attrs: nounwind
define i64 @callee_i128_in_regs(i64 %a, i128 %b) #0 {
  %b_trunc = trunc i128 %b to i64
  %C = icmp sgt i1 true, true
  %1 = add i64 %a, %b_trunc
  store i1 %C, ptr @G.5, align 1
  ret i64 %1
}

attributes #0 = { nounwind }

Reproduce:

llc -mtriple=riscv64 -verify-machineinstrs -mattr=+zicsr,+zfinx -O1 -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv64 -verify-machineinstrs -mattr=+zicsr,+zfinx -O1 -global-isel=0 snippet.ll -o -

Local llc output:

remark: <unknown>:0:0: unable to translate instruction: trunc: '  %b_trunc = trunc i128 %b to i64' (in function: callee_i128_in_regs)
warning: Instruction selection used fallback path for callee_i128_in_regs

Occurrences (3):

InputFunctionConfig
calling-conv-lp64-lp64f-lp64d-common.0430230a96.ll (mutant of calling-conv-lp64-lp64f-lp64d-common.ll)callee_i128_in_regs-mtriple=riscv64 -verify-machineinstrs -mattr=+zicsr,+zfinx -O1
calling-conv-lp64.428a27f922.ll (mutant of calling-conv-lp64.ll)callee_float_on_stack-mtriple=riscv64 -verify-machineinstrs -mattr=+zdinx -O1
calling-conv-lp64e.94dd7cfe87.ll (mutant of calling-conv-lp64e.ll)callee_i128_on_stack-mtriple=riscv64 -target-abi lp64e -verify-machineinstrs -mattr=+zfinx -O2

Generated 2026-11-29 14:49 UTC.