crash: LLVM ERROR: Found 4 machine code errors.
| Run: | explore-b577f07195-20261129-105236 |
| Kind: | crash |
| Category: | LLVM ERROR: Found 4 machine code errors. M |
| Occurrences: | 1 in 1 configs, 1 test files |
| Snippet from: | vararg-lp64e.bf035bd830.ll (mutant of vararg-lp64e.ll) @caller_i128_on_stack via llvm-extract |
| Config: | -mtriple=riscv64 -target-abi lp64e -frame-pointer=all -verify-machineinstrs -mattr=+zbs,+zvbb -O1 |
| Local check: | reproduces at b577f07195 |
| Compiler Explorer: | not uploaded (over --godbolt-limit or disabled) |
Snippet:
@G = external global i1
define void @caller_i128_on_stack() {
entry:
%A = alloca i128, align 8
%L1 = load i32, ptr %A, align 4
%L = load i32, ptr %A, align 4
store i128 poison, ptr %A, align 4
call void (i32, ...) @va_i128(i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i128 8)
%C = icmp ult i32 %L, %L1
%B = srem i128 42, 0
store i128 %B, ptr %A, align 4
store i1 %C, ptr @G, align 1
ret void
}
declare i64 @va_i128(i32, ...)
Reproduce:
llc -mtriple=riscv64 -target-abi lp64e -frame-pointer=all -verify-machineinstrs -mattr=+zbs,+zvbb -O1 -global-isel -global-isel-abort=2 -pass-remarks-missed=gisel.* snippet.ll -o -
llc -mtriple=riscv64 -target-abi lp64e -frame-pointer=all -verify-machineinstrs -mattr=+zbs,+zvbb -O1 -global-isel=0 snippet.ll -o -
Local llc output:
# After Prologue/Epilogue Insertion & Frame Finalization
# Machine code for function caller_i128_on_stack: NoPHIs, TracksLiveness, NoVRegs, Legalized, RegBankSelected, Selected, TiedOpsRewritten, TracksDebugUserValues
Frame Objects:
fi#0: size=16, align=8, at location [SP-40]
fi#1: size=8, align=8, at location [SP-48]
fi#2: size=8, align=8, at location [SP-8]
fi#3: size=8, align=8, at location [SP-16]
fi#4: size=8, align=8, at location [SP-24]
save/restore points:
save points are empty
restore points are empty
bb.0.entry:
liveins: $x1, $x9
$x2 = frame-setup ADDI $x2, -48
frame-setup CFI_INSTRUCTION def_cfa_offset 48
frame-setup SD killed $x1, $x2, 40 :: (store (s64) into %stack.2)
frame-setup SD killed $x8, $x2, 32 :: (store (s64) into %stack.3)
frame-setup SD killed $x9, $x2, 24 :: (store (s64) into %stack.4)
frame-setup CFI_INSTRUCTION offset $x1, -8
frame-setup CFI_INSTRUCTION offset $x8, -16
frame-setup CFI_INSTRUCTION offset $x9, -24
$x8 = frame-setup ADDI $x2, 48
frame-setup CFI_INSTRUCTION def_cfa $x8, 0
$x2 = frame-setup ANDI $x2, -16
$x9 = frame-setup ADDI $x2, 0
renamable $x10 = LW $x9, 8 :: (dereferenceable load (i32) from %ir.A)
SD killed renamable $x10, $x9, 0 :: (store (s64) into %stack.1)
renamable $x9 = LW $x9, 8 :: (dereferenceable load (i32) from %ir.A)
$x2 = ADDI $x2, -24
renamable $x16 = ADDI $x0, 7
renamable $x17 = ADDI $x0, 8
$x10 = ADDI $x0, 1
$x11 = ADDI $x0, 2
$x12 = ADDI $x0, 3
$x13 = ADDI $x0, 4
$x14 = ADDI $x0, 5
$x15 = ADDI $x0, 6
SD killed renamable $x16, $x2, 0 :: (store (i64) into stack, align 16)
SD killed renamable $x17, $x2, 8 :: (store (i64) into stack + 8)
SD $x0, $x2, 16 :: (store (i64) into stack + 16, align 16)
PseudoCALL target-flags(riscv-call) @va_i128, <regmask $vlenb $x0 $x1 $x8 $x9 $x0_h $x1_h $x8_h $x9_h $x0_w $x1_w $x8_w $x9_w $x0_y $x8_x9>, implicit-def dead $x1, implicit $x10, implicit $x11, implicit $x12, implicit $x13, implicit $x14, implicit $x15
$x2 = ADDI $x2, 24
renamable $x10 = LD $x9, 0 :: (load (s64) from %stack.1)
renamable $x10 = SLTU killed renamable $x9, killed renamable $x10
renamable $x12 = ADDI $x0, 42
renamable $x11 = SRLI renamable $x12, 32
renamable $x13 = ADDI $x9, 8
SW $x0, killed renamable $x13, 12 :: (store (s32) into %ir.A + 12)
SW killed renamable $x12, $x9, 8 :: (store (s32) into %ir.A)
SW killed renamable $x11, $x9, 12 :: (store (s32) into %ir.A + 4)
SW $x0, $x9, 16 :: (store (s32) into %ir.A + 8)
renamable $x11 = LUI target-flags(riscv-hi) @G
SB killed renamable $x10, killed renamable $x11, target-flags(riscv-lo) @G :: (store (i8) into @G)
$x2 = frame-destroy ADDI $x8, -48
frame-destroy CFI_INSTRUCTION def_cfa $x2, 48
$x1 = frame-destroy LD $x2, 40 :: (load (s64) from %stack.2)
$x8 = frame-destroy LD $x2, 32 :: (load (s64) from %stack.3)
$x9 = frame-destroy LD $x2, 24 :: (load (s64) from %stack.4)
frame-destroy CFI_INSTRUCTION restore $x1
frame-destroy CFI_INSTRUCTION restore $x8
frame-destroy CFI_INSTRUCTION restore $x9
$x2 = frame-destroy ADDI $x2, 48
frame-destroy CFI_INSTRUCTION def_cfa_offset 0
PseudoRET
# End machine code for function caller_i128_on_stack.
*** Bad machine code: Using an undefined physical register ***
- function: caller_i128_on_stack
- basic block: %bb.0 entry (0x558d28f829a0)
- instruction: renamable $x13 = ADDI $x9, 8
- operand 1: $x9
*** Bad machine code: Using an undefined physical register ***
- function: caller_i128_on_stack
- basic block: %bb.0 entry (0x558d28f829a0)
- instruction: SW killed renamable $x12, $x9, 8 :: (store (s32) into %ir.A)
- operand 1: $x9
*** Bad machine code: Using an undefined physical register ***
- function: caller_i128_on_stack
- basic block: %bb.0 entry (0x558d28f829a0)
- instruction: SW killed renamable $x11, $x9, 12 :: (store (s32) into %ir.A + 4)
- operand 1: $x9
*** Bad machine code: Using an undefined physical register ***
- function: caller_i128_on_stack
- bas
Occurrences (1):
| Input | Function | Config |
|---|
| vararg-lp64e.bf035bd830.ll (mutant of vararg-lp64e.ll) | | -mtriple=riscv64 -target-abi lp64e -frame-pointer=all -verify-machineinstrs -mattr=+zbs,+zvbb -O1 |
Generated 2026-11-29 14:49 UTC.