miscompile: miscompile rv32: add,andi,slli,srai,sub
| Run: | explore-b577f07195-20261129-105236 |
| Kind: | miscompile |
| Category: | miscompile rv32: add,andi,slli,srai,sub M |
| Occurrences: | 1 in 1 configs, 1 test files |
| Snippet from: | mem.1b504d71ee.ll (mutant of mem.ll) @load_sext_zext_anyext_i1 via llvm-extract |
| Config: | -mtriple=riscv32 -verify-machineinstrs -O3 |
| Local check: | reproduces at b577f07195 |
| Compiler Explorer: | not applicable: Compiler Explorer compiles RISC-V but cannot run it |
Snippet:
@G.1 = external global i16
; Function Attrs: nounwind
define dso_local i32 @load_sext_zext_anyext_i1(ptr %a) #0 {
%LGV = load i16, ptr @G.1, align 2
%1 = getelementptr i1, ptr %a, i32 1
%2 = load i1, ptr %1, align 1
%3 = sext i1 %2 to i32
%4 = getelementptr i1, ptr %a, i32 2
%G = getelementptr i1, ptr %4, i16 %LGV
%5 = load i1, ptr %G, align 1
%6 = zext i1 %5 to i32
%7 = add i32 %3, %6
%8 = load volatile i1, ptr %a, align 1
ret i32 %7
}
attributes #0 = { nounwind }
Reproduce:
./exec_oracle.py --flags '-mtriple=riscv32 -verify-machineinstrs -O3' --funcs load_sext_zext_anyext_i1 snippet.ll
Local execution result:
64 of 64 inputs differ (first: #0)
SelectionDAG hash 3ab9248e31d8910d, GlobalISel hash 8baf844483cfab66
b0: llc -mtriple=riscv32 -verify-machineinstrs -O3 -global-isel=0
b1: llc -mtriple=riscv32 -verify-machineinstrs -O0 -global-isel=0
b2: llc -mtriple=riscv32 -verify-machineinstrs -O3 -global-isel -global-isel-abort=2
Occurrences (1):
| Input | Function | Config |
|---|
| mem.1b504d71ee.ll (mutant of mem.ll) | load_sext_zext_anyext_i1 | -mtriple=riscv32 -verify-machineinstrs -O3 |
Generated 2026-11-29 14:49 UTC.