miscompile: miscompile rv32: add,addi,and,fcvt.wu.h,feq.s,flh
| Run: | explore-db12fc36f6-20261127-115111 |
| Kind: | miscompile |
| Category: | miscompile rv32: add,addi,and,fcvt.wu.h,feq.s,flh M |
| Occurrences: | 1 in 1 configs, 1 test files |
| Snippet from: | half-convert.06413ff2.e274fbff.ad31a496.cc894ae7.8af210a0.65342bf3.d7647af9.5c004d0a.0aec38f85c.ll (mutant of half-convert.06413ff2.e274fbff.ad31a496.cc894ae7.8af210a0.65342bf3.d7647af9.5c004d0a.ll) @fcvt_wu_s_i8 via llvm-extract |
| Config: | -mtriple=riscv32 -verify-machineinstrs -target-abi ilp32d -mattr=+zfhmin,+zvfh,+zfh,+f,+zvbb -O3 |
| Local check: | reproduces at db12fc36f6 |
| Compiler Explorer: | not applicable: Compiler Explorer compiles RISC-V but cannot run it |
Snippet:
@G.2 = external global i1
@G.3 = external global half
@G.5 = external global ptr
@G.6 = external global float
; Function Attrs: nounwind
define zeroext i8 @fcvt_wu_s_i8(half %a) #0 {
%A13 = alloca ptr, align 8
store ptr poison, ptr %A13, align 8
%A8 = alloca i1, align 1
store i1 poison, ptr %A8, align 1
%LGV2 = load float, ptr @G.6, align 4
%C3 = fcmp ord float +inf, %LGV2
%C1 = fcmp olt float +inf, 1.000000e+00
%C6 = fcmp uge half %a, +qnan
%LGV1 = load half, ptr @G.3, align 2
%A = alloca i1, align 1
br i1 %C1, label %T, label %F
BB: ; preds = %F, %BB9
%L = load i32, ptr %A, align 4
%G1 = getelementptr bfloat, ptr %A, i1 %C1
%C2 = fcmp ueq half %a, %LGV1
store i1 %C3, ptr %A, align 1
%G = getelementptr ptr, ptr %A, i32 %L
%C = fcmp ord double 0.000000e+00, 0.000000e+00
%1 = fptoui half %a to i8
%C5 = fcmp one half %a, %LGV1
store i1 %C1, ptr %G, align 1
store i1 %C6, ptr %A, align 1
%C4 = icmp sgt i1 %C, %C5
store i1 %C2, ptr @G.2, align 1
store ptr %G1, ptr @G.5, align 8
store i1 %C4, ptr %G, align 1
ret i8 %1
T: ; preds = %BB9, %0
%G12 = getelementptr float, ptr %A, i1 %C3
store ptr %G12, ptr %A13, align 8
br i1 %C3, label %T10, label %F11
BB9: ; preds = %F11, %T10
br i1 %C1, label %T, label %BB
F: ; preds = %0
%C7 = fcmp one half %a, +qnan
store i1 %C7, ptr %A8, align 1
br label %BB
T10: ; preds = %T
br label %BB9
F11: ; preds = %T
br label %BB9
}
attributes #0 = { nounwind }
Reproduce:
./exec_oracle.py --flags '-mtriple=riscv32 -verify-machineinstrs -target-abi ilp32d -mattr=+zfhmin,+zvfh,+zfh,+f,+zvbb -O3' --funcs fcvt_wu_s_i8 snippet.ll
Local execution result:
9 of 64 inputs differ (first: #12)
SelectionDAG hash c7c80994735a01b2, GlobalISel hash 50322c310da047ea
b0: llc -mtriple=riscv32 -verify-machineinstrs -target-abi ilp32d -mattr=+zfhmin,+zvfh,+zfh,+f,+zvbb -O3 -global-isel=0
b1: llc -mtriple=riscv32 -verify-machineinstrs -target-abi ilp32d -mattr=+zfhmin,+zvfh,+zfh,+f,+zvbb -O0 -global-isel=0
b2: llc -mtriple=riscv32 -verify-machineinstrs -target-abi ilp32d -mattr=+zfhmin,+zvfh,+zfh,+f,+zvbb -O3 -global-isel -global-isel-abort=2
Occurrences (1):
| Input | Function | Config |
|---|
| half-convert.06413ff2.e274fbff.ad31a496.cc894ae7.8af210a0.65342bf3.d7647af9.5c004d0a.0aec38f85c.ll (mutant of half-convert.06413ff2.e274fbff.ad31a496.cc894ae7.8af210a0.65342bf3.d7647af9.5c004d0a.ll) | fcvt_wu_s_i8 | -mtriple=riscv32 -verify-machineinstrs -target-abi ilp32d -mattr=+zfhmin,+zvfh,+zfh,+f,+zvbb -O3 |
Generated 2026-11-29 14:49 UTC.