miscompile: miscompile rv32: add,addi,and,andi,beqz,fsw
| Run: | explore-b577f07195-20261129-105236 |
| Kind: | miscompile |
| Category: | miscompile rv32: add,addi,and,andi,beqz,fsw NEW M |
| Occurrences: | 1 in 1 configs, 1 test files |
| Snippet from: | mem.8f2b3cb5.3a22d576.3ad8652a.f267ef18.74006f82.3c710de681.ll (mutant of mem.8f2b3cb5.3a22d576.3ad8652a.f267ef18.74006f82.ll) @load_sext_zext_anyext_i1_i16 via llvm-extract |
| Config: | -mtriple=riscv32 -verify-machineinstrs -mattr=+zvbb,+zfh,+zve32x -O2 |
| 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 i1
@G.6 = external global float
@G.7 = external global float
@G.8 = external global i16
@G.9 = external global ptr
; Function Attrs: nounwind
define dso_local i16 @load_sext_zext_anyext_i1_i16(ptr %a) #0 {
%LGV = load i16, ptr @G.8, align 2
%A = alloca i1, align 1
store i1 true, ptr %A, align 1
%G9 = getelementptr ptr, ptr %A, i16 %LGV
%1 = getelementptr i1, ptr %a, i32 1
%G2 = getelementptr ptr, ptr %a, i1 false
%L4 = load i1, ptr %A, align 1
store ptr %G9, ptr @G.9, align 8
br i1 %L4, label %T, label %F
BB: ; preds = %F, %T
%C3 = icmp sgt i32 65536, 42
%G = getelementptr i128, ptr %a, i16 42
%L = load i1, ptr %1, align 1
%2 = load i1, ptr %G2, align 1
%3 = sext i1 %2 to i16
%4 = getelementptr i1, ptr %a, i32 2
%B = ashr i16 %3, %3
%G5 = getelementptr <8 x i8>, ptr %1, i64 -9223372036854775808
%5 = add i16 %B, %B
%6 = load volatile i1, ptr %a, align 1
%C = icmp sgt i1 %L, %6
store i1 %C, ptr %G5, align 1
store ptr %G, ptr %4, align 8
store i1 %C3, ptr @G.4, align 1
ret i16 %5
T: ; preds = %0
br label %BB
F: ; preds = %0
%G11 = getelementptr <4 x i32>, ptr %a, i32 1
%LGV6 = load float, ptr @G.6, align 4
%B8 = fdiv float %LGV6, %LGV6
%LGV5 = load float, ptr %G11, align 4
%C7 = fcmp ule float %LGV5, %LGV6
store i1 %C7, ptr @G.2, align 1
store float %B8, ptr @G.7, align 4
br label %BB
}
attributes #0 = { nounwind }
Reproduce:
./exec_oracle.py --flags '-mtriple=riscv32 -verify-machineinstrs -mattr=+zvbb,+zfh,+zve32x -O2' --funcs load_sext_zext_anyext_i1_i16 snippet.ll
Local execution result:
62 of 64 inputs differ (first: #1)
SelectionDAG hash ea14b34906a6664b, GlobalISel hash 1cfea631c7493772
b0: llc -mtriple=riscv32 -verify-machineinstrs -mattr=+zvbb,+zfh,+zve32x -O2 -global-isel=0
b1: llc -mtriple=riscv32 -verify-machineinstrs -mattr=+zvbb,+zfh,+zve32x -O0 -global-isel=0
b2: llc -mtriple=riscv32 -verify-machineinstrs -mattr=+zvbb,+zfh,+zve32x -O2 -global-isel -global-isel-abort=2
Occurrences (1):
| Input | Function | Config |
|---|
| mem.8f2b3cb5.3a22d576.3ad8652a.f267ef18.74006f82.3c710de681.ll (mutant of mem.8f2b3cb5.3a22d576.3ad8652a.f267ef18.74006f82.ll) | load_sext_zext_anyext_i1_i16 | -mtriple=riscv32 -verify-machineinstrs -mattr=+zvbb,+zfh,+zve32x -O2 |
Generated 2026-11-29 14:49 UTC.