crash: LLVM ERROR: Found 24 machine code errors.

Run:explore-d9924131a4-20261128-105811
Kind:crash
Category:LLVM ERROR: Found 24 machine code errors. M
Occurrences:1 in 1 configs, 1 test files
Snippet from:callee-saved-gprs.ca893eb9c0.ll (mutant of callee-saved-gprs.ll) @caller via llvm-extract
Config:-mtriple=riscv32 -target-abi ilp32e -verify-machineinstrs -mattr=+zilsd,+zilsd-word-align,+zba -O2
Local check:reproduces at d9924131a4
Compiler Explorer:not uploaded (over --godbolt-limit or disabled)

Snippet:

@var = external global [32 x i32]
@G.2 = external global i32

declare void @callee()

define void @caller() {
  %LGV = load i32, ptr @G.2, align 4
  %val = load [32 x i32], ptr @var, align 4
  %I = insertvalue [32 x i32] %val, i32 %LGV, 20
  call void @callee()
  store volatile [32 x i32] %val, ptr @var, align 4
  store [32 x i32] %I, ptr poison, align 4
  ret void
}

Reproduce:

llc -mtriple=riscv32 -target-abi ilp32e -verify-machineinstrs -mattr=+zilsd,+zilsd-word-align,+zba -O2 -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv32 -target-abi ilp32e -verify-machineinstrs -mattr=+zilsd,+zilsd-word-align,+zba -O2 -global-isel=0 snippet.ll -o -

Local llc output:

# After RISC-V Load / Store Optimizer
# Machine code for function caller: NoPHIs, TracksLiveness, NoVRegs, Legalized, RegBankSelected, Selected, TiedOpsRewritten, TracksDebugUserValues
Frame Objects:
  fi#0: size=4, align=4, at location [SP-16]
  fi#1: size=4, align=4, at location [SP-20]
  fi#2: size=4, align=4, at location [SP-24]
  fi#3: size=4, align=4, at location [SP-28]
  fi#4: size=4, align=4, at location [SP-32]
  fi#5: size=4, align=4, at location [SP-36]
  fi#6: size=4, align=4, at location [SP-40]
  fi#7: size=4, align=4, at location [SP-44]
  fi#8: size=4, align=4, at location [SP-48]
  fi#9: size=4, align=4, at location [SP-52]
  fi#10: size=4, align=4, at location [SP-56]
  fi#11: size=4, align=4, at location [SP-60]
  fi#12: size=4, align=4, at location [SP-64]
  fi#13: size=4, align=4, at location [SP-68]
  fi#14: size=4, align=4, at location [SP-72]
  fi#15: size=4, align=4, at location [SP-76]
  fi#16: size=4, align=4, at location [SP-80]
  fi#17: size=4, align=4, at location [SP-84]
  fi#18: size=4, align=4, at location [SP-88]
  fi#19: size=4, align=4, at location [SP-92]
  fi#20: size=4, align=4, at location [SP-96]
  fi#21: size=4, align=4, at location [SP-100]
  fi#22: size=4, align=4, at location [SP-104]
  fi#23: size=4, align=4, at location [SP-108]
  fi#24: size=4, align=4, at location [SP-112]
  fi#25: size=4, align=4, at location [SP-116]
  fi#26: size=4, align=4, at location [SP-120]
  fi#27: size=4, align=4, at location [SP-124]
  fi#28: size=4, align=4, at location [SP-128]
  fi#29: size=4, align=4, at location [SP-132]
  fi#30: size=4, align=4, at location [SP-136]
  fi#31: size=4, align=4, at location [SP-140]
  fi#32: size=4, align=4, at location [SP-4]
  fi#33: size=8, align=4, at location [SP-12]
save/restore points:
save points are empty
restore points are empty
bb.0 (%ir-block.0):
  liveins: $x1, $x8_x9
  $x2 = frame-setup ADDI $x2, -140
  frame-setup CFI_INSTRUCTION def_cfa_offset 140
  frame-setup SW killed $x1, $x2, 136 :: (store (s32) into %stack.32)
  frame-setup SD_RV32 killed $x8_x9, $x2, 128 :: (store (s64) into %stack.33, align 4)
  frame-setup CFI_INSTRUCTION offset $x1, -4
  frame-setup CFI_INSTRUCTION offset $x8, -12
  frame-setup CFI_INSTRUCTION offset $x9, -8
  renamable $x10 = LUI target-flags(riscv-hi) @G.2
  renamable $x11 = LUI target-flags(riscv-hi) @var
  renamable $x9 = ADDI killed renamable $x11, target-flags(riscv-lo) @var
  renamable $x10 = LW killed renamable $x10, target-flags(riscv-lo) @G.2 :: (dereferenceable load (i32) from @G.2)
  SW killed renamable $x10, $x2, 108 :: (store (s32) into %stack.4)
  $x10_x11 = LD_RV32 $x9, 0 :: (dereferenceable load (i32) from @var), (dereferenceable load (i32) from @var + 4)
  SW killed renamable $x11, $x2, 0 :: (store (s32) into %stack.31)
  SW killed renamable $x10, $x2, 124 :: (store (s32) into %stack.0)
  $x10_x11 = LD_RV32 $x9, 8 :: (dereferenceable load (i32) from @var + 8), (dereferenceable load (i32) from @var + 12)
  SW killed renamable $x11, $x2, 116 :: (store (s32) into %stack.2)
  SW killed renamable $x10, $x2, 120 :: (store (s32) into %stack.1)
  $x10_x11 = LD_RV32 $x9, 16 :: (dereferenceable load (i32) from @var + 16), (dereferenceable load (i32) from @var + 20)
  SW killed renamable $x11, $x2, 8 :: (store (s32) into %stack.29)
  SW killed renamable $x10, $x2, 112 :: (store (s32) into %stack.3)
  $x11 = LW $x9, 24 :: (dereferenceable load (i32) from @var + 24), (dereferenceable load (i32) from @var + 28)
  $x10 = LW $x9, 28 :: (dereferenceable load (i32) from @var + 24), (dereferenceable load (i32) from @var + 28)
  SW killed renamable $x11, $x2, 4 :: (store (s32) into %stack.30)
  SW killed renamable $x10, $x2, 16 :: (store (s32) into %stack.27)
  $x11 = LW $x9, 32 :: (dereferenceable load (i32) from @var + 32), (dereferenceable load (i32) from @var + 36)
  $x10 = LW $x9, 36 :: (dereferenceable load (i32) from @var + 32), (dereferenceable load (i32) from @var + 36)
  SW killed renamable $x11, $x2, 12 :: (store 

Occurrences (1):

InputFunctionConfig
callee-saved-gprs.ca893eb9c0.ll (mutant of callee-saved-gprs.ll)-mtriple=riscv32 -target-abi ilp32e -verify-machineinstrs -mattr=+zilsd,+zilsd-word-align,+zba -O2

Generated 2026-11-29 14:49 UTC.