fallback: translate: zext i8

Run:explore-d9924131a4-20261128-105811
Kind:fallback
Category:translate: zext i8 M
Occurrences:7 in 6 configs, 5 test files, 70 more counted only
Snippet from:typepromotion-overflow.4affa87b4a.ll (mutant of typepromotion-overflow.ll) @safe_add_underflow_neg via llvm-extract
Config:-mtriple=riscv64 -mattr=+m,+zdinx -O3 -verify-machineinstrs
Local check:reproduces at d9924131a4
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G = external global i1

define i32 @safe_add_underflow_neg(i8 zeroext %a) {
  %add = add i8 %a, -2
  %cmp = icmp ult i8 %add, -5
  %res = select i1 %cmp, i32 8, i32 16
  %C = icmp sgt i8 %a, %a
  store i1 %C, ptr @G, align 1
  ret i32 %res
}

Reproduce:

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

Local llc output:

remark: <unknown>:0:0: unable to translate instruction: zext: '  %1 = zext i8 %a to i64' (in function: safe_add_underflow_neg)
warning: Instruction selection used fallback path for safe_add_underflow_neg

Occurrences (7):

InputFunctionConfig
abdu-neg.cfaa47d139.ll (mutant of abdu-neg.ll)abd_ext_i8_undef-mtriple=riscv64 -mattr=+zbb,+zfinx,+xtheadba -O1 -verify-machineinstrs
clmulh.203ef8f3b6.ll (mutant of clmulh.ll)clmulh_i8-mtriple=riscv32 -verify-machineinstrs -mattr=+m,+zbs,+zfinx -O2
clmulh.203ef8f3b6.ll (mutant of clmulh.ll)commutative_clmulh_i8-mtriple=riscv32 -verify-machineinstrs -mattr=+m,+zbs,+zfinx -O2
clmulh.9da708d865.ll (mutant of clmulh.ll)commutative_clmulh_i8-mtriple=riscv64 -verify-machineinstrs -mattr=+zbc,+zhinx -O2 -code-model=small
csr-first-use-cost.d663a8051b.ll (mutant of csr-first-use-cost.ll)Perl_sv_setnv-mtriple=riscv64 -regalloc-csr-first-time-cost=0 -mattr=+zhinx,+zicsr -O1 -verify-machineinstrs
sext-zext-trunc.e7abe0213d.ll (mutant of sext-zext-trunc.ll)zext_i8_to_i64-mtriple=riscv64 -verify-machineinstrs -mattr=+zhinx -O0
typepromotion-overflow.4affa87b4a.ll (mutant of typepromotion-overflow.ll)safe_add_underflow_neg-mtriple=riscv64 -mattr=+m,+zdinx -O3 -verify-machineinstrs

Generated 2026-11-29 14:49 UTC.