fallback: legalize: G_ASHR <4 x s32>

Run:explore-04ca53e65f-20261014-114124
Kind:fallback
Category:legalize: G_ASHR <4 x s32>
Occurrences:7 in 3 configs, 2 test files
Snippet from:rvp-simd-64.ll @test_paadd_h via llvm-extract
Config:-mtriple=riscv64 -mattr=+experimental-p,+m,+zbb -verify-machineinstrs
Local check:reproduces at 04ca53e65f
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

define <4 x i16> @test_paadd_h(<4 x i16> %a, <4 x i16> %b) {
  %ext.a = sext <4 x i16> %a to <4 x i32>
  %ext.b = sext <4 x i16> %b to <4 x i32>
  %add = add nsw <4 x i32> %ext.a, %ext.b
  %shift = ashr <4 x i32> %add, splat (i32 1)
  %res = trunc <4 x i32> %shift to <4 x i16>
  ret <4 x i16> %res
}

Reproduce:

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

Local llc output:

remark: <unknown>:0:0: unable to legalize instruction: %7:_(<4 x s32>) = G_ASHR %4:_, %5:_(<4 x s32>) (in function: test_paadd_h)
warning: Instruction selection used fallback path for test_paadd_h

Occurrences (7):

InputFunctionConfig
rvp-simd-64.lltest_paadd_h-mtriple=riscv64 -mattr=+experimental-p,+m,+zbb -verify-machineinstrs
rvp-simd-64.lltest_pasub_h-mtriple=riscv64 -mattr=+experimental-p,+m,+zbb -verify-machineinstrs
rvp-simd-64.lltest_pmulh_v4i16-mtriple=riscv64 -mattr=+experimental-p,+m,+zbb -verify-machineinstrs
smulh.llsmulh_v4i16-mtriple=riscv32 -mattr=+m
smulh.llsmulh_v4i16-mtriple=riscv64 -mattr=+m
smulh.63c9ff0092.ll (mutant of smulh.ll)smulh_v4i16-mtriple=riscv64 -mattr=+m
smulh.89848cb616.ll (mutant of smulh.ll)smulh_v4i16-mtriple=riscv32 -mattr=+m

Generated 2026-10-15 08:05 UTC.