miscompile: miscompile rv32: add,addi,andi,beqz,bnez,flt.s
| Run: | explore-b577f07195-20261129-105236 |
| Kind: | miscompile |
| Category: | miscompile rv32: add,addi,andi,beqz,bnez,flt.s NEW M |
| Occurrences: | 1 in 1 configs, 1 test files |
| Snippet from: | mem.8f2b3cb5.3a22d576.3ad8652a.e6464b35.f22e6171.0c3af0c484.ll (mutant of mem.8f2b3cb5.3a22d576.3ad8652a.e6464b35.f22e6171.ll) @load_sext_zext_anyext_i1_i16 via llvm-extract |
| Config: | -mtriple=riscv32 -verify-machineinstrs -mattr=+m,+d,+zvbb -O3 |
| Local check: | reproduces at b577f07195 |
| Compiler Explorer: | not applicable: Compiler Explorer compiles RISC-V but cannot run it |
Snippet:
@G.2 = external global i1
@G.4 = external global ptr
@G.6 = external global i1
@G.8 = external global i16
; Function Attrs: nounwind
define dso_local i16 @load_sext_zext_anyext_i1_i16(ptr %a) #0 {
%LGV6 = load i1, ptr @G.6, align 1
%G3 = getelementptr ptr, ptr %a, i8 16
%1 = getelementptr inbounds i1, ptr %a, i32 1
%L5 = load i1, ptr %1, align 1
%L3 = load float, ptr %1, align 4
%G = getelementptr inbounds i128, ptr %a, i16 42
%G2 = getelementptr ptr, ptr %a, i1 %L5
%L = load float, ptr %G, align 4
%2 = load i1, ptr %G2, align 1
%3 = sext i1 %2 to i16
%4 = getelementptr i1, ptr %G3, i32 2
%G1 = getelementptr i1, ptr %G, i1 %2
br i1 %2, label %T, label %F
BB: ; preds = %T
%5 = load i1, ptr %4, align 1
%B = ashr exact i16 %3, %3
%C7 = icmp ne i1 %L5, %LGV6
%G5 = getelementptr <8 x i8>, ptr %1, i64 -9223372036854775808
%6 = zext i1 %5 to i16
%7 = add i16 %B, %6
%8 = load volatile i1, ptr %a, align 1
store i1 %C7, ptr %G5, align 1
store ptr %G, ptr %4, align 8
%C4 = fcmp olt float %L, %L3
store ptr %G1, ptr @G.4, align 8
store i1 %C4, ptr @G.2, align 1
store ptr %G2, ptr %G4, align 8
store i16 %6, ptr @G.8, align 2
ret i16 %7
T: ; preds = %0
%G4 = getelementptr i128, ptr %a, i64 -1
br label %BB
F: ; preds = %0
ret i16 %3
}
attributes #0 = { nounwind }
Reproduce:
./exec_oracle.py --flags '-mtriple=riscv32 -verify-machineinstrs -mattr=+m,+d,+zvbb -O3' --funcs load_sext_zext_anyext_i1_i16 snippet.ll
Local execution result:
15 of 64 inputs differ (first: #2)
SelectionDAG hash 4bcaf7538948f841, GlobalISel hash 517c0678befd4ca5
b0: llc -mtriple=riscv32 -verify-machineinstrs -mattr=+m,+d,+zvbb -O3 -global-isel=0
b1: llc -mtriple=riscv32 -verify-machineinstrs -mattr=+m,+d,+zvbb -O0 -global-isel=0
b2: llc -mtriple=riscv32 -verify-machineinstrs -mattr=+m,+d,+zvbb -O3 -global-isel -global-isel-abort=2
Occurrences (1):
| Input | Function | Config |
|---|
| mem.8f2b3cb5.3a22d576.3ad8652a.e6464b35.f22e6171.0c3af0c484.ll (mutant of mem.8f2b3cb5.3a22d576.3ad8652a.e6464b35.f22e6171.ll) | load_sext_zext_anyext_i1_i16 | -mtriple=riscv32 -verify-machineinstrs -mattr=+m,+d,+zvbb -O3 |
Generated 2026-11-29 14:49 UTC.