miscompile: miscompile rv32: add,andi,call,lbu,li,lw
| Run: | explore-d9924131a4-20261128-105811 |
| Kind: | miscompile |
| Category: | miscompile rv32: add,andi,call,lbu,li,lw M |
| Occurrences: | 1 in 1 configs, 1 test files |
| Snippet from: | mem.c0364574.dbfe35960a.ll (mutant of mem.c0364574.ll) @load_sext_zext_anyext_i1_i16 via llvm-extract |
| Config: | -mtriple=riscv32 -verify-machineinstrs -mattr=+zicsr,+zihintpause,+zvbb -O2 |
| Local check: | reproduces at d9924131a4 |
| Compiler Explorer: | not applicable: Compiler Explorer compiles RISC-V but cannot run it |
Snippet:
; Function Attrs: nounwind
define dso_local i16 @load_sext_zext_anyext_i1_i16(ptr %a) #0 {
%A = alloca i16, align 2
store i16 poison, ptr %A, align 2
%1 = getelementptr i1, ptr %a, i32 1
%L1 = load i1, ptr %1, align 1
%2 = load i1, ptr %1, align 1
%3 = sext i1 %2 to i16
%B = sdiv i1 true, %L1
%4 = zext i1 %B to i16
%G = getelementptr ptr, ptr %a, i1 false
%5 = add i16 %3, %4
%6 = load volatile i1, ptr %a, align 1
store i16 %5, ptr %G, align 2
ret i16 %5
}
attributes #0 = { nounwind }
Reproduce:
./exec_oracle.py --flags '-mtriple=riscv32 -verify-machineinstrs -mattr=+zicsr,+zihintpause,+zvbb -O2' --funcs load_sext_zext_anyext_i1_i16 snippet.ll
Local execution result:
64 of 64 inputs differ (first: #0)
SelectionDAG hash 12c78f906f31fa0d, GlobalISel hash c3d7f3e6bac4d7d8
b0: llc -mtriple=riscv32 -verify-machineinstrs -mattr=+zicsr,+zihintpause,+zvbb -O2 -global-isel=0
b1: llc -mtriple=riscv32 -verify-machineinstrs -mattr=+zicsr,+zihintpause,+zvbb -O0 -global-isel=0
b2: llc -mtriple=riscv32 -verify-machineinstrs -mattr=+zicsr,+zihintpause,+zvbb -O2 -global-isel -global-isel-abort=2
Occurrences (1):
| Input | Function | Config |
|---|
| mem.c0364574.dbfe35960a.ll (mutant of mem.c0364574.ll) | load_sext_zext_anyext_i1_i16 | -mtriple=riscv32 -verify-machineinstrs -mattr=+zicsr,+zihintpause,+zvbb -O2 |
Generated 2026-11-29 14:49 UTC.