fallback: legalize: G_SHL <2 x s64>

Run:main-bc8218b282-20261015-074651
Kind:fallback
Category:legalize: G_SHL <2 x s64> NEW
Occurrences:2 in 2 configs, 2 test files
Snippet from:ghccc-rv32.4fa2fc3357.ll (mutant of ghccc-rv32.ll) @foo via llvm-extract
Config:-mtriple=riscv32 -mattr=+f,+d
Local check:reproduces at bc8218b282
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@base = external global i32
@sp = external global i32
@hp = external global i32
@r1 = external global i32
@r2 = external global i32
@r3 = external global i32
@r4 = external global i32
@r5 = external global i32
@r6 = external global i32
@r7 = external global i32
@splim = external global i32
@f1 = external global float
@f2 = external global float
@f3 = external global float
@f4 = external global float
@f5 = external global float
@f6 = external global float
@d2 = external global double
@d3 = external global double
@d4 = external global double
@d5 = external global double
@d6 = external global double
@G = external global <2 x i64>
@G.1 = external global <2 x i64>

; Function Attrs: nounwind
define ghccc void @foo() #0 {
entry:
  %LGV1 = load <2 x i64>, ptr @G, align 16
  %0 = load double, ptr @d6, align 8
  %B2 = fsub double %0, 4.200000e+01
  %1 = load double, ptr @d5, align 8
  %2 = load double, ptr @d4, align 8
  %3 = load double, ptr @d3, align 8
  %4 = load double, ptr @d2, align 8
  %5 = load float, ptr @f6, align 4
  %6 = load float, ptr @f5, align 4
  %7 = load float, ptr @f4, align 4
  %8 = load float, ptr @f3, align 4
  %9 = load float, ptr @f2, align 4
  %10 = load float, ptr @f1, align 4
  %11 = load i32, ptr @splim, align 4
  %12 = load i32, ptr @r7, align 4
  %13 = load i32, ptr @r6, align 4
  %14 = load i32, ptr @r5, align 4
  %15 = load i32, ptr @r4, align 4
  %B = shl <2 x i64> splat (i64 42), %LGV1
  %16 = load i32, ptr @r3, align 4
  %17 = load i32, ptr @r2, align 4
  %18 = load i32, ptr @r1, align 4
  %19 = load i32, ptr @hp, align 4
  %20 = load i32, ptr @sp, align 4
  %21 = load i32, ptr @base, align 4
  tail call ghccc void @bar(i32 %21, i32 %20, i32 %19, i32 %18, i32 %17, i32 %16, i32 %15, i32 %14, i32 %13, i32 %12, i32 %11, float %10, float %9, float %8, float %7, float %6, float %5, double %B2, double %4, double %3, double %2, double %1, double %0) #0
  store <2 x i64> %B, ptr @G.1, align 16
  ret void
}

declare ghccc void @bar(i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, float, float, float, float, float, float, double, double, double, double, double, double)

attributes #0 = { nounwind }

Reproduce:

llc -mtriple=riscv32 -mattr=+f,+d -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv32 -mattr=+f,+d -global-isel=0 snippet.ll -o -

Local llc output:

remark: <unknown>:0:0: unable to legalize instruction: %38:_(<2 x s64>) = G_SHL %36:_, %0:_(<2 x s64>) (in function: foo)
warning: Instruction selection used fallback path for foo

Occurrences (2):

InputFunctionConfig
ghccc-rv32.4fa2fc3357.ll (mutant of ghccc-rv32.ll)foo-mtriple=riscv32 -mattr=+f,+d
ghccc-rv64.af6f9bea03.ll (mutant of ghccc-rv64.ll)foo-mtriple=riscv64 -mattr=+f,+d

Generated 2026-10-15 08:05 UTC.