miscompile: miscompile rv64: add,addi,andi,auipc,beq,bge
| Run: | explore-d9924131a4-20261128-105811 |
| Kind: | miscompile |
| Category: | miscompile rv64: add,addi,andi,auipc,beq,bge M |
| Occurrences: | 1 in 1 configs, 1 test files |
| Snippet from: | double-convert.46d2c237.909163b1.980cdf54.52bb9d85.3c13eaec52.ll (mutant of double-convert.46d2c237.909163b1.980cdf54.52bb9d85.ll) @fcvt_w_s_i8 via llvm-extract |
| Config: | -mtriple=riscv64 -verify-machineinstrs -target-abi=lp64d -mattr=+d,+zvfh,+zcb,+zvkb -O2 -code-model=medium |
| Local check: | reproduces at d9924131a4 |
| Compiler Explorer: | not applicable: Compiler Explorer compiles RISC-V but cannot run it |
Snippet:
@G.6 = external global ptr
@G.11 = external global ptr
@G.12 = external global i8
; Function Attrs: nounwind
define signext i8 @fcvt_w_s_i8(double %a) #0 {
%A7 = alloca i1, align 1
store i1 true, ptr %A7, align 1
%A6 = alloca i1, align 1
store i1 true, ptr %A6, align 1
%1 = fptosi double %a to i8
%C = fcmp ueq double %a, +inf
%A = alloca i1, align 1
%L1 = load i64, ptr %A, align 4
%G = getelementptr half, ptr %A, i64 %L1
store i1 poison, ptr %A, align 1
store i1 %C, ptr %A, align 1
store ptr %G, ptr @G.6, align 8
%G2 = getelementptr i8, ptr %G, i128 -1
switch i8 %1, label %SW_D [
i8 -1, label %SW_C
i8 92, label %SW_C1
i8 -68, label %SW_C2
i8 -55, label %SW_C3
i8 107, label %SW_C4
i8 -88, label %SW_C5
]
BB: ; preds = %SW_C4, %SW_C1, %SW_C, %SW_D
store ptr %G2, ptr @G.11, align 8
ret i8 %1
SW_D: ; preds = %SW_D, %0
%L = load i1, ptr %A6, align 1
br i1 %L, label %BB, label %SW_D
SW_C: ; preds = %0
br label %BB
SW_C1: ; preds = %SW_C1, %0
%L8 = load i1, ptr %A7, align 1
br i1 %L8, label %SW_C1, label %BB
SW_C2: ; preds = %0
ret i8 %1
SW_C3: ; preds = %0
%LGV = load i8, ptr @G.12, align 1
ret i8 %LGV
SW_C4: ; preds = %0
br label %BB
SW_C5: ; preds = %0
%LGV9 = load i8, ptr @G.12, align 1
ret i8 %1
}
attributes #0 = { nounwind }
Reproduce:
./exec_oracle.py --flags '-mtriple=riscv64 -verify-machineinstrs -target-abi=lp64d -mattr=+d,+zvfh,+zcb,+zvkb -O2 -code-model=medium' --funcs fcvt_w_s_i8 snippet.ll
Local execution result:
3 of 64 inputs differ (first: #12)
SelectionDAG hash a0c2d26326127464, GlobalISel hash 5289e0e02a921a1b
b0: llc -mtriple=riscv64 -verify-machineinstrs -target-abi=lp64d -mattr=+d,+zvfh,+zcb,+zvkb -code-model=medium -O2 -global-isel=0
b1: llc -mtriple=riscv64 -verify-machineinstrs -target-abi=lp64d -mattr=+d,+zvfh,+zcb,+zvkb -code-model=medium -O0 -global-isel=0
b2: llc -mtriple=riscv64 -verify-machineinstrs -target-abi=lp64d -mattr=+d,+zvfh,+zcb,+zvkb -code-model=medium -O2 -global-isel -global-isel-abort=2
Occurrences (1):
| Input | Function | Config |
|---|
| double-convert.46d2c237.909163b1.980cdf54.52bb9d85.3c13eaec52.ll (mutant of double-convert.46d2c237.909163b1.980cdf54.52bb9d85.ll) | fcvt_w_s_i8 | -mtriple=riscv64 -verify-machineinstrs -target-abi=lp64d -mattr=+d,+zvfh,+zcb,+zvkb -O2 -code-model=medium |
Generated 2026-11-29 14:49 UTC.