fallback: translate: sub i32

Run:explore-d9924131a4-20261128-105811
Kind:fallback
Category:translate: sub i32 M
Occurrences:11 in 11 configs, 9 test files, 162 more counted only
Snippet from:attributes.40df7bba7c.ll (mutant of attributes.ll) @addi via llvm-extract
Config:-mtriple=riscv32 -mattr=+zve32x,+zbkb,+zhinx -O3 -verify-machineinstrs
Local check:reproduces at d9924131a4
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

define i32 @addi(i32 %a) {
  %B = sub i32 %a, 0
  ret i32 %B
}

Reproduce:

llc -mtriple=riscv32 -mattr=+zve32x,+zbkb,+zhinx -O3 -verify-machineinstrs -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv32 -mattr=+zve32x,+zbkb,+zhinx -O3 -verify-machineinstrs -global-isel=0 snippet.ll -o -

Local llc output:

remark: <unknown>:0:0: unable to translate instruction: sub: '  %B = sub i32 %a, 0' (in function: addi)
warning: Instruction selection used fallback path for addi

Occurrences (11):

InputFunctionConfig
abds-neg.07b76dcd40.ll (mutant of abds-neg.ll)abd_subnsw_i32_undef-mtriple=riscv32 -mattr=+zdinx -O3 -verify-machineinstrs
abds-neg.758cc483c1.ll (mutant of abds-neg.ll)abd_subnsw_i32-mtriple=riscv64 -mattr=+zbb,+zhinx -O1 -verify-machineinstrs
atomic-rmw-sub.8b1778ed97.ll (mutant of atomic-rmw-sub.ll)atomicrmw_sub_i32_neg-mtriple=riscv32 -verify-machineinstrs -mattr=+zalrsc,+zbkb,+zdinx -O0
atomicrmw-add-sub.27787e3ade.ll (mutant of atomicrmw-add-sub.ll)atomicrmw_sub_i32_neg-mtriple=riscv32 -mattr=+a,+zabha,+zfinx -O1 -verify-machineinstrs
attributes.40df7bba7c.ll (mutant of attributes.ll)addi-mtriple=riscv32 -mattr=+zve32x,+zbkb,+zhinx -O3 -verify-machineinstrs
rotl-rotr.e7a4bf213d.ll (mutant of rotl-rotr.ll)rotr_32-mtriple=riscv32 -verify-machineinstrs -mattr=+zfinx -O2 -code-model=medium
rotl-rotr.fd54677102.ll (mutant of rotl-rotr.ll)rotr_32_mask-mtriple=riscv64 -verify-machineinstrs -enable-legalize-types-checking -mattr=+zfinx -O2
shifts.aac8227fec.ll (mutant of shifts.ll)lshr64_shamt32-mtriple=riscv64 -verify-machineinstrs -mattr=+zba,+zhinx -O2 -code-model=small
xaluo.20b37a0658.ll (mutant of xaluo.ll)smulo.not.i64-mtriple=riscv64 -verify-machineinstrs -mattr=+m,+zba,+zfinx,+zve32x -O1 -code-model=medium
xcvbitmanip.87da0315bf.ll (mutant of xcvbitmanip.ll)test.ctlz.zero.defined-mtriple=riscv32 -verify-machineinstrs -mattr=+xcvbitmanip,+zfinx -O2
zfhmin-half-intrinsics.51942f8514.ll (mutant of zfhmin-half-intrinsics.ll)lround_f16-mtriple=riscv32 -verify-machineinstrs -target-abi ilp32 -mattr=+zhinxmin -O3 -code-model=small

Generated 2026-11-29 14:49 UTC.