fallback: legalize: G_SMULH

Run:main-db12fc36f6-20261127-110859
Kind:fallback
Category:legalize: G_SMULH
Occurrences:58 in 25 configs, 11 test files
Snippet from:div.ll @sdiv8_constant via llvm-extract
Config:-mtriple=riscv32 -verify-machineinstrs
Local check:reproduces at db12fc36f6
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

; Function Attrs: nounwind
define i8 @sdiv8_constant(i8 %a) #0 {
  %1 = sdiv i8 %a, 5
  ret i8 %1
}

attributes #0 = { nounwind }

Reproduce:

llc -mtriple=riscv32 -verify-machineinstrs -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv32 -verify-machineinstrs -global-isel=0 snippet.ll -o -

Local llc output:

remark: <unknown>:0:0: unable to legalize instruction: %9:_(i8) = G_SMULH %0:_, %5:_ (in function: sdiv8_constant)
warning: Instruction selection used fallback path for sdiv8_constant

Occurrences (58) (first 15):

InputFunctionConfig
div.llsdiv8_constant-mtriple=riscv32 -verify-machineinstrs
div.llsdiv8_constant-mtriple=riscv64 -verify-machineinstrs
div.llsdiv16_constant-mtriple=riscv64 -verify-machineinstrs
overflow-intrinsic-optimizations.llno__mulodi4-mtriple=riscv32
smulh.llsmulh_i16-mtriple=riscv32
smulh.llsmulh_i64-mtriple=riscv32
smulh.llsmulh_i96-mtriple=riscv32
smulh.llsmulh_i128-mtriple=riscv32
smulh.llsmulh_v1i64-mtriple=riscv32
smulh.llsmulh_i16-mtriple=riscv64
smulh.llsmulh_i32-mtriple=riscv64
smulh.llsmulh_i96-mtriple=riscv64
smulh.llsmulh_i128-mtriple=riscv64
srem-seteq-illegal-types.lltest_srem_odd-mtriple=riscv32
srem-seteq-illegal-types.lltest_srem_even-mtriple=riscv32

Generated 2026-11-29 14:49 UTC.