miscompile: miscompile rv64: add,addi,and,andi,beqz,bgeu
| Run: | explore-b577f07195-20261129-105236 |
| Kind: | miscompile |
| Category: | miscompile rv64: add,addi,and,andi,beqz,bgeu NEW M |
| Occurrences: | 1 in 1 configs, 1 test files |
| Snippet from: | half-convert.8268b6ca.21218c28.6abe3e79.a9636032.f92c565845.ll (mutant of half-convert.8268b6ca.21218c28.6abe3e79.a9636032.ll) @fcvt_ui_h via llvm-extract |
| Config: | -mtriple=riscv64 -verify-machineinstrs -target-abi lp64f -mattr=+zfhmin,+zicond,+f,+zvkb -O2 |
| Local check: | reproduces at b577f07195 |
| Compiler Explorer: | not applicable: Compiler Explorer compiles RISC-V but cannot run it |
Snippet:
@G.1 = external global i128
@G.2 = external global i1
@G.6 = external global i1
@G.7 = external global half
@G.8 = external global i128
; Function Attrs: nounwind
define i16 @fcvt_ui_h(half %a) #0 {
%LGV4 = load half, ptr @G.7, align 2
%LGV = load i128, ptr @G.1, align 4
%C1 = fcmp ord half %a, 5.960460e-08
%A = alloca i128, align 8
%G = getelementptr i128, ptr %A, i8 0
%C = fcmp oge half %a, %LGV4
%1 = fptoui half %a to i16
store i1 %C, ptr @G.2, align 1
store i128 poison, ptr %A, align 4
%A3 = alloca ptr, align 8
%B = or i128 %LGV, %LGV
%L = load i1, ptr %A, align 1
store i1 %C1, ptr @G.2, align 1
store ptr poison, ptr %A3, align 8
store i128 %B, ptr %A, align 4
store ptr %G, ptr %A3, align 8
br i1 %L, label %T, label %F
BB: ; preds = %F, %T
%C7 = fcmp uno half %a, %a
store i1 %C7, ptr @G.6, align 1
ret i16 %1
T: ; preds = %T, %0
%LGV3 = load i128, ptr @G.8, align 4
%C2 = fcmp oge half %a, %LGV4
%B4 = lshr i128 %B, %LGV3
%LGV2 = load i1, ptr @G.6, align 1
store i1 %C2, ptr %A3, align 1
%B6 = add i128 %LGV3, 0
%C5 = fcmp ueq half 4.200000e+01, 0.000000e+00
store i128 %B4, ptr %A, align 4
store i1 %C5, ptr %A, align 1
store i128 %B6, ptr poison, align 4
br i1 %LGV2, label %T, label %BB
F: ; preds = %0
br label %BB
}
attributes #0 = { nounwind }
Reproduce:
./exec_oracle.py --flags '-mtriple=riscv64 -verify-machineinstrs -target-abi lp64f -mattr=+zfhmin,+zicond,+f,+zvkb -O2' --funcs fcvt_ui_h snippet.ll
Local execution result:
21 of 64 inputs differ (first: #1)
SelectionDAG hash 591594ef7dd87b7c, GlobalISel hash e80159fb23549387
b0: llc -mtriple=riscv64 -verify-machineinstrs -target-abi lp64f -mattr=+zfhmin,+zicond,+f,+zvkb -O2 -global-isel=0
b1: llc -mtriple=riscv64 -verify-machineinstrs -target-abi lp64f -mattr=+zfhmin,+zicond,+f,+zvkb -O0 -global-isel=0
b2: llc -mtriple=riscv64 -verify-machineinstrs -target-abi lp64f -mattr=+zfhmin,+zicond,+f,+zvkb -O2 -global-isel -global-isel-abort=2
Occurrences (1):
| Input | Function | Config |
|---|
| half-convert.8268b6ca.21218c28.6abe3e79.a9636032.f92c565845.ll (mutant of half-convert.8268b6ca.21218c28.6abe3e79.a9636032.ll) | fcvt_ui_h | -mtriple=riscv64 -verify-machineinstrs -target-abi lp64f -mattr=+zfhmin,+zicond,+f,+zvkb -O2 |
Generated 2026-11-29 14:49 UTC.