miscompile: miscompile rv32: add,addi,andi,flt.s,lbu,lui
| Run: | explore-b577f07195-20261129-105236 |
| Kind: | miscompile |
| Category: | miscompile rv32: add,addi,andi,flt.s,lbu,lui NEW M |
| Occurrences: | 1 in 1 configs, 1 test files |
| Snippet from: | mem.8f2b3cb5.3a22d576.3ad8652a.e6464b35.f22e6171.4e105db414.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=+zicond,+m,+d,+zvbb,+zbb,+zfa -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.7 = external global ptr
; 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
%L4 = load i1, ptr %G3, align 1
%1 = getelementptr inbounds i1, ptr %a, i32 1
%L5 = load i1, ptr %1, align 1
%L3 = load float, ptr %1, align 4
br i1 %LGV6, label %T, label %F
BB: ; preds = %F, %T
%G = getelementptr inbounds i128, ptr %a, i16 42
%G6 = getelementptr ptr, ptr %G, i1 %L4
%L = load float, ptr %G, align 4
%2 = load i1, ptr %1, align 1
%3 = sext i1 %2 to i16
%4 = getelementptr i1, ptr %G3, i32 2
%G1 = getelementptr i1, ptr %G, i1 %2
%L1 = load i1, ptr %G1, align 1
%B = ashr exact i16 %3, %3
%C7 = icmp ne i1 %L5, %LGV6
%G5 = getelementptr <8 x i8>, ptr %1, i64 -9223372036854775808
%B2 = lshr i1 %C7, %L1
%5 = zext i1 %B2 to i16
%6 = add i16 %B, %5
%7 = 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 %G6, ptr @G.7, align 8
ret i16 %6
T: ; preds = %0
br label %BB
F: ; preds = %0
br label %BB
}
attributes #0 = { nounwind }
Reproduce:
./exec_oracle.py --flags '-mtriple=riscv32 -verify-machineinstrs -mattr=+zicond,+m,+d,+zvbb,+zbb,+zfa -O3' --funcs load_sext_zext_anyext_i1_i16 snippet.ll
Local execution result:
64 of 64 inputs differ (first: #0)
SelectionDAG hash 938571c4cd5b16e8, GlobalISel hash 77ad5debe1a8cb62
b0: llc -mtriple=riscv32 -verify-machineinstrs -mattr=+zicond,+m,+d,+zvbb,+zbb,+zfa -O3 -global-isel=0
b1: llc -mtriple=riscv32 -verify-machineinstrs -mattr=+zicond,+m,+d,+zvbb,+zbb,+zfa -O0 -global-isel=0
b2: llc -mtriple=riscv32 -verify-machineinstrs -mattr=+zicond,+m,+d,+zvbb,+zbb,+zfa -O3 -global-isel -global-isel-abort=2
Occurrences (1):
| Input | Function | Config |
|---|
| mem.8f2b3cb5.3a22d576.3ad8652a.e6464b35.f22e6171.4e105db414.ll (mutant of mem.8f2b3cb5.3a22d576.3ad8652a.e6464b35.f22e6171.ll) | load_sext_zext_anyext_i1_i16 | -mtriple=riscv32 -verify-machineinstrs -mattr=+zicond,+m,+d,+zvbb,+zbb,+zfa -O3 |
Generated 2026-11-29 14:49 UTC.