miscompile: miscompile rv64: addi,and,fadd.h,fcvt.lu.h,fcvt.wu.h,feq.h
| Run: | explore-d9924131a4-20261128-105811 |
| Kind: | miscompile |
| Category: | miscompile rv64: addi,and,fadd.h,fcvt.lu.h,fcvt.wu.h,feq.h M |
| Occurrences: | 1 in 1 configs, 1 test files |
| Snippet from: | half-round-conv.40491e27.fa0dfd5b.23abe253.b476fd6f.2c384fff.aecb2d85.24f6c823b5.ll (mutant of half-round-conv.40491e27.fa0dfd5b.23abe253.b476fd6f.2c384fff.aecb2d85.ll) @test_round_ui8 via llvm-extract |
| Config: | -mtriple=riscv64 -verify-machineinstrs -target-abi=lp64f -mattr=+zfh,+zfa,+zbs,+zvfh -O1 |
| Local check: | reproduces at d9924131a4 |
| Compiler Explorer: | not applicable: Compiler Explorer compiles RISC-V but cannot run it |
Snippet:
@G = external global i1
@G.6 = external global i1
@G.7 = external global float
@G.8 = external global i1
@G.9 = external global half
@G.10 = external global i128
@G.11 = external global half
define zeroext i8 @test_round_ui8(half %x) {
%A3 = alloca i1, align 1
store i1 poison, ptr %A3, align 1
%A6 = alloca i1, align 1
store i1 poison, ptr %A6, align 1
%A = alloca half, align 2
%L = load float, ptr %A, align 4
%B4 = fadd half %x, 4.200000e+01
store half poison, ptr %A, align 2
%LGV3 = load half, ptr @G.9, align 2
%LGV = load float, ptr @G.7, align 4
%C = fcmp oge half %x, %x
%B1 = fmul half %x, %x
%C2 = fcmp uno float %LGV, %L
%B = udiv i128 18446744073709551616, 1
%a = call half @llvm.round.f16(half %x)
br label %BB
BB: ; preds = %0
%C9 = fcmp true half %B4, %x
%b = fptoui half %a to i8
%C4 = fcmp uno half %x, %LGV3
%B2 = add i1 %C4, false
store i1 %C, ptr @G, align 1
store i1 %C2, ptr @G, align 1
store i1 %C4, ptr @G.8, align 1
%C1 = icmp ugt i1 %C9, true
%C5 = fcmp ult half %x, %a
%C8 = fcmp uge half %x, %x
store i128 %B, ptr @G.10, align 4
store half %B1, ptr %A, align 2
store half %B4, ptr @G.11, align 2
store i1 %C8, ptr %A6, align 1
store i1 %C1, ptr @G.6, align 1
store i1 %B2, ptr %A3, align 1
store i1 %C5, ptr @G, align 1
ret i8 %b
}
; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none)
declare half @llvm.round.f16(half) #0
attributes #0 = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) }
Reproduce:
./exec_oracle.py --flags '-mtriple=riscv64 -verify-machineinstrs -target-abi=lp64f -mattr=+zfh,+zfa,+zbs,+zvfh -O1' --funcs test_round_ui8 snippet.ll
Local execution result:
9 of 64 inputs differ (first: #12)
SelectionDAG hash 5bef58d3690d6076, GlobalISel hash 5289e0e02a921a1b
b0: llc -mtriple=riscv64 -verify-machineinstrs -target-abi=lp64f -mattr=+zfh,+zfa,+zbs,+zvfh -O1 -global-isel=0
b1: llc -mtriple=riscv64 -verify-machineinstrs -target-abi=lp64f -mattr=+zfh,+zfa,+zbs,+zvfh -O0 -global-isel=0
b2: llc -mtriple=riscv64 -verify-machineinstrs -target-abi=lp64f -mattr=+zfh,+zfa,+zbs,+zvfh -O1 -global-isel -global-isel-abort=2
Occurrences (1):
| Input | Function | Config |
|---|
| half-round-conv.40491e27.fa0dfd5b.23abe253.b476fd6f.2c384fff.aecb2d85.24f6c823b5.ll (mutant of half-round-conv.40491e27.fa0dfd5b.23abe253.b476fd6f.2c384fff.aecb2d85.ll) | test_round_ui8 | -mtriple=riscv64 -verify-machineinstrs -target-abi=lp64f -mattr=+zfh,+zfa,+zbs,+zvfh -O1 |
Generated 2026-11-29 14:49 UTC.