miscompile: miscompile rv64: addi,andi,auipc,beq,beqz,bne
| Run: | explore-d9924131a4-20261128-105811 |
| Kind: | miscompile |
| Category: | miscompile rv64: addi,andi,auipc,beq,beqz,bne M |
| Occurrences: | 1 in 1 configs, 1 test files |
| Snippet from: | double-convert.6a9e415f.b4b991a3.234cbd22.03a49e3e.d469e0783f.ll (mutant of double-convert.6a9e415f.b4b991a3.234cbd22.03a49e3e.ll) @fcvt_wu_s_i8 via llvm-extract |
| Config: | -mtriple=riscv64 -verify-machineinstrs -target-abi=lp64d -mattr=+d,+a,+zicond -O1 -code-model=medium |
| Local check: | reproduces at d9924131a4 |
| Compiler Explorer: | not applicable: Compiler Explorer compiles RISC-V but cannot run it |
Snippet:
@G.2 = external global i1
@G.6 = external global i1
@G.7 = external global i8
@G.8 = external global i1
; Function Attrs: nounwind
define zeroext i8 @fcvt_wu_s_i8(double %a) #0 {
%A3 = alloca i1, align 1
store i1 poison, ptr %A3, align 1
%G7 = getelementptr ptr, ptr %A3, i1 true
%C1 = icmp sge i16 0, 0
%A = alloca i8, align 1
store i8 1, ptr %G7, align 1
%L = load i8, ptr %A, align 1
store i1 %C1, ptr @G.6, align 1
switch i8 %L, label %SW_D [
i8 62, label %SW_C
i8 -28, label %SW_C1
]
BB: ; preds = %BB1, %SW_D
%1 = fptoui double %a to i8
%C = icmp ugt i8 %1, %1
store i1 %C, ptr @G.2, align 1
ret i8 %1
SW_D: ; preds = %0
br label %BB
SW_C: ; preds = %0
%LGV2 = load i1, ptr @G.8, align 1
%G = getelementptr <4 x i32>, ptr %A, i8 %L
store ptr %G, ptr %A, align 8
br i1 %LGV2, label %T, label %F
BB1: ; preds = %T
%C5 = fcmp uno double %a, %a
store i1 %C5, ptr %A3, align 1
br label %BB
SW_C1: ; preds = %0
%B = fadd double %a, f0x7FEFFFFFFFFFFFFF
%LGV = load i8, ptr @G.7, align 1
%G1 = getelementptr double, ptr %A, i8 %L
%C3 = icmp ne i8 %LGV, %LGV
store i1 %C3, ptr poison, align 1
store ptr %G1, ptr %A, align 8
store double %B, ptr %A3, align 8
ret i8 %LGV
T: ; preds = %SW_C
%C2 = fcmp ole double %a, +qnan
store i1 %C2, ptr %A3, align 1
br label %BB1
F: ; preds = %SW_C
ret i8 0
}
attributes #0 = { nounwind }
Reproduce:
./exec_oracle.py --flags '-mtriple=riscv64 -verify-machineinstrs -target-abi=lp64d -mattr=+d,+a,+zicond -O1 -code-model=medium' --funcs fcvt_wu_s_i8 snippet.ll
Local execution result:
9 of 64 inputs differ (first: #12)
SelectionDAG hash 7671f9994d454daf, GlobalISel hash 5289e0e02a921a1b
b0: llc -mtriple=riscv64 -verify-machineinstrs -target-abi=lp64d -mattr=+d,+a,+zicond -code-model=medium -O1 -global-isel=0
b1: llc -mtriple=riscv64 -verify-machineinstrs -target-abi=lp64d -mattr=+d,+a,+zicond -code-model=medium -O0 -global-isel=0
b2: llc -mtriple=riscv64 -verify-machineinstrs -target-abi=lp64d -mattr=+d,+a,+zicond -code-model=medium -O1 -global-isel -global-isel-abort=2
Occurrences (1):
| Input | Function | Config |
|---|
| double-convert.6a9e415f.b4b991a3.234cbd22.03a49e3e.d469e0783f.ll (mutant of double-convert.6a9e415f.b4b991a3.234cbd22.03a49e3e.ll) | fcvt_wu_s_i8 | -mtriple=riscv64 -verify-machineinstrs -target-abi=lp64d -mattr=+d,+a,+zicond -O1 -code-model=medium |
Generated 2026-11-29 14:49 UTC.