fallback: legalize: G_OR <16 x s16>

Run:main-bc8218b282-20261015-074651
Kind:fallback
Category:legalize: G_OR <16 x s16> NEW
Occurrences:2 in 2 configs, 1 test files
Snippet from:double_reduct.69e6c99d48.ll (mutant of double_reduct.ll) @add_ext_i16 via llvm-extract
Config:-mtriple=riscv64 -mattr=+d,+zfh,+zvfh,+v,+m -target-abi=lp64d -verify-machineinstrs
Local check:reproduces at bc8218b282
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@G = external global <16 x i16>

define i16 @add_ext_i16(<16 x i8> %a, <16 x i8> %b) {
  %LGV = load <16 x i16>, ptr @G, align 32
  %ae = zext <16 x i8> %a to <16 x i16>
  %be = zext <16 x i8> %b to <16 x i16>
  %r1 = call i16 @llvm.vector.reduce.add.v16i16(<16 x i16> %ae)
  %r2 = call i16 @llvm.vector.reduce.add.v16i16(<16 x i16> %be)
  %B = or <16 x i16> %be, %LGV
  %r = add i16 %r1, %r2
  store <16 x i16> %B, ptr poison, align 32
  ret i16 %r
}

; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none)
declare i16 @llvm.vector.reduce.add.v16i16(<16 x i16>) #0

attributes #0 = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) }

Reproduce:

llc -mtriple=riscv64 -mattr=+d,+zfh,+zvfh,+v,+m -target-abi=lp64d -verify-machineinstrs -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv64 -mattr=+d,+zfh,+zvfh,+v,+m -target-abi=lp64d -verify-machineinstrs -global-isel=0 snippet.ll -o -

Local llc output:

remark: <unknown>:0:0: unable to legalize instruction: %10:_(<16 x s16>) = G_OR %7:_, %4:_ (in function: add_ext_i16)
warning: Instruction selection used fallback path for add_ext_i16

Occurrences (2):

InputFunctionConfig
double_reduct.69e6c99d48.ll (mutant of double_reduct.ll)add_ext_i16-mtriple=riscv64 -mattr=+d,+zfh,+zvfh,+v,+m -target-abi=lp64d -verify-machineinstrs
double_reduct.92783dfd06.ll (mutant of double_reduct.ll)add_ext_i16-mtriple=riscv32 -mattr=+d,+zfh,+zvfh,+v,+m -target-abi=ilp32d -verify-machineinstrs

Generated 2026-10-15 08:05 UTC.