miscompile: miscompile rv64: addi,and,andi,beq,bge,blt
| Run: | explore-d9924131a4-20261128-105811 |
| Kind: | miscompile |
| Category: | miscompile rv64: addi,and,andi,beq,bge,blt NEW M |
| Occurrences: | 1 in 1 configs, 1 test files |
| Snippet from: | half-round-conv.e8fed3c8.1c3210b8ae.ll (mutant of half-round-conv.e8fed3c8.ll) @test_floor_ui16 via llvm-extract |
| Config: | -mtriple=riscv64 -verify-machineinstrs -target-abi=lp64f -mattr=+zfh,+zvbb,+f,+zbkb -O3 |
| Local check: | reproduces at d9924131a4 |
| Compiler Explorer: | not applicable: Compiler Explorer compiles RISC-V but cannot run it |
Snippet:
@G = external global i16
@G.1 = external global i1
@G.2 = external global i16
define zeroext i16 @test_floor_ui16(half %x) {
%LGV = load i16, ptr @G, align 2
switch i16 %LGV, label %SW_D [
i16 -4111, label %SW_C
i16 14947, label %SW_C1
i16 10503, label %SW_C2
i16 30028, label %SW_C3
i16 16176, label %SW_C4
i16 13493, label %SW_C5
i16 -9200, label %SW_C6
]
BB: ; preds = %SW_C6, %SW_C3, %SW_C2, %SW_D
%a = call half @llvm.floor.f16(half %x)
%b = fptoui half %a to i16
ret i16 %b
SW_D: ; preds = %SW_D, %0
%LGV7 = load i1, ptr @G.1, align 1
br i1 %LGV7, label %SW_D, label %BB
SW_C: ; preds = %0
%LGV8 = load i16, ptr @G.2, align 2
ret i16 %LGV8
SW_C1: ; preds = %0
ret i16 0
SW_C2: ; preds = %0
br label %BB
SW_C3: ; preds = %0
br label %BB
SW_C4: ; preds = %0
%C = fcmp ord half %x, +inf
store i1 %C, ptr poison, align 1
ret i16 %LGV
SW_C5: ; preds = %0
ret i16 %LGV
SW_C6: ; preds = %0
br label %BB
}
; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none)
declare half @llvm.floor.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,+zvbb,+f,+zbkb -O3' --funcs test_floor_ui16 snippet.ll
Local execution result:
7 of 64 inputs differ (first: #12)
SelectionDAG hash 5bef58d3690d6076, GlobalISel hash 4a0c640c306e95b7
b0: llc -mtriple=riscv64 -verify-machineinstrs -target-abi=lp64f -mattr=+zfh,+zvbb,+f,+zbkb -O3 -global-isel=0
b1: llc -mtriple=riscv64 -verify-machineinstrs -target-abi=lp64f -mattr=+zfh,+zvbb,+f,+zbkb -O0 -global-isel=0
b2: llc -mtriple=riscv64 -verify-machineinstrs -target-abi=lp64f -mattr=+zfh,+zvbb,+f,+zbkb -O3 -global-isel -global-isel-abort=2
Occurrences (1):
| Input | Function | Config |
|---|
| half-round-conv.e8fed3c8.1c3210b8ae.ll (mutant of half-round-conv.e8fed3c8.ll) | test_floor_ui16 | -mtriple=riscv64 -verify-machineinstrs -target-abi=lp64f -mattr=+zfh,+zvbb,+f,+zbkb -O3 |
Generated 2026-11-29 14:49 UTC.