miscompile: miscompile rv32: add,addi,andi,andn,call,lbu
| Run: | explore-d9924131a4-20261128-105811 |
| Kind: | miscompile |
| Category: | miscompile rv32: add,addi,andi,andn,call,lbu NEW M |
| Occurrences: | 1 in 1 configs, 1 test files |
| Snippet from: | mem.8f2b3cb5.3a22d576.57dcc594.c56d7c42.d2dce897b5.ll (mutant of mem.8f2b3cb5.3a22d576.57dcc594.c56d7c42.ll) @load_sext_zext_anyext_i1_i16 via llvm-extract |
| Config: | -mtriple=riscv32 -verify-machineinstrs -mattr=+zicond,+zbb,+zba,+zihintpause,+zfa,+v -O1 -code-model=small |
| Local check: | reproduces at d9924131a4 |
| Compiler Explorer: | not applicable: Compiler Explorer compiles RISC-V but cannot run it |
Snippet:
@G.2 = external global i1
@G.3 = external global i64
@G.4 = external global i16
@G.5 = external global i1
@G.6 = external global i1
; Function Attrs: nounwind
define dso_local i16 @load_sext_zext_anyext_i1_i16(ptr %a) #0 {
%B10 = sub i32 2147483647, 0
%LGV6 = load i1, ptr @G.6, align 1
%LGV1 = load i1, ptr @G.5, align 1
%LGV = load i64, ptr @G.3, align 4
%1 = getelementptr i1, ptr %a, i32 1
%L1 = load i16, ptr %1, align 2
%G = getelementptr <2 x i64>, ptr %a, i64 %LGV
%G6 = getelementptr half, ptr %a, i64 4294967296
%L = load i1, ptr %1, align 1
%2 = load i1, ptr %1, align 1
%3 = sext i1 %2 to i16
%B4 = sdiv i1 %L, %LGV1
%G8 = getelementptr i1, ptr %a, i1 %LGV6
%B2 = or i64 %LGV, -1
%G7 = getelementptr ptr, ptr %G8, i1 %2
%B3 = or i16 %3, %L1
%4 = getelementptr i1, ptr %a, i32 2
%5 = load i1, ptr %4, align 1
%B = ashr i16 %3, %3
%6 = zext i1 %5 to i16
%7 = add i16 %B, %6
%8 = load volatile i1, ptr %a, align 1
%C = icmp sgt i1 %B4, %8
store i1 %C, ptr @G.2, align 1
store i64 %B2, ptr %4, align 4
store ptr %G, ptr %4, align 8
store ptr %G7, ptr %4, align 8
store i16 %B3, ptr @G.4, align 2
store ptr %G6, ptr %G7, align 8
store i32 %B10, ptr %4, align 4
ret i16 %7
}
attributes #0 = { nounwind }
Reproduce:
./exec_oracle.py --flags '-mtriple=riscv32 -verify-machineinstrs -mattr=+zicond,+zbb,+zba,+zihintpause,+zfa,+v -O1 -code-model=small' --funcs load_sext_zext_anyext_i1_i16 snippet.ll
Local execution result:
64 of 64 inputs differ (first: #0)
SelectionDAG hash 9b6adb5b11399ec6, GlobalISel hash 40a6012a176bbca7
b0: llc -mtriple=riscv32 -verify-machineinstrs -mattr=+zicond,+zbb,+zba,+zihintpause,+zfa,+v -code-model=small -O1 -global-isel=0
b1: llc -mtriple=riscv32 -verify-machineinstrs -mattr=+zicond,+zbb,+zba,+zihintpause,+zfa,+v -code-model=small -O0 -global-isel=0
b2: llc -mtriple=riscv32 -verify-machineinstrs -mattr=+zicond,+zbb,+zba,+zihintpause,+zfa,+v -code-model=small -O1 -global-isel -global-isel-abort=2
Occurrences (1):
| Input | Function | Config |
|---|
| mem.8f2b3cb5.3a22d576.57dcc594.c56d7c42.d2dce897b5.ll (mutant of mem.8f2b3cb5.3a22d576.57dcc594.c56d7c42.ll) | load_sext_zext_anyext_i1_i16 | -mtriple=riscv32 -verify-machineinstrs -mattr=+zicond,+zbb,+zba,+zihintpause,+zfa,+v -O1 -code-model=small |
Generated 2026-11-29 14:49 UTC.