fallback: translate: trunc i64~

Run:explore-db12fc36f6-20261127-115111
Kind:fallback
Category:translate: trunc i64~ M
Occurrences:3 in 3 configs, 1 test files, 2 more counted only
Snippet from:sextw-removal.e6f764ff00.ll (mutant of sextw-removal.ll) @sext_i48_arg via llvm-extract
Config:-mtriple=riscv64 -mattr=+zdinx,+zicsr -O0 -verify-machineinstrs
Local check:reproduces at db12fc36f6
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G = external global i32

declare signext i32 @bar(i32 signext)

; Function Attrs: nounwind
define void @sext_i48_arg(i48 signext %arg, i32 signext %arg1) #0 {
bb:
  %i = trunc i48 %arg to i32
  store i32 %i, ptr @G, align 4
  br label %bb2

bb2:                                              ; preds = %bb2, %bb
  %i3 = phi i32 [ %i, %bb ], [ %i5, %bb2 ]
  %i4 = tail call signext i32 @bar(i32 signext %i3)
  %i5 = shl i32 %i3, %arg1
  %i6 = icmp eq i32 %i4, 0
  br i1 %i6, label %bb7, label %bb2

bb7:                                              ; preds = %bb2
  ret void
}

attributes #0 = { nounwind }

Reproduce:

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

Local llc output:

remark: <unknown>:0:0: unable to translate instruction: trunc: '  %i = trunc i48 %arg to i32' (in function: sext_i48_arg)
warning: Instruction selection used fallback path for sext_i48_arg

Occurrences (3):

InputFunctionConfig
sextw-removal.9e73deed7e.ll (mutant of sextw-removal.ll)sext_i48_arg-mtriple=riscv64 -mattr=+zfinx -O2 -verify-machineinstrs
sextw-removal.e6f764ff00.ll (mutant of sextw-removal.ll)sext_i48_arg-mtriple=riscv64 -mattr=+zdinx,+zicsr -O0 -verify-machineinstrs
sextw-removal.f9b9377f73.ll (mutant of sextw-removal.ll)sext_i48_arg-mtriple=riscv64 -riscv-sextw-removal=0 -mattr=+zfinx -O2 -verify-machineinstrs

Generated 2026-11-29 14:49 UTC.