miscompile: miscompile rv64: add,addi,andi,beq,beqz,bne
| Run: | explore-b577f07195-20261129-105236 |
| Kind: | miscompile |
| Category: | miscompile rv64: add,addi,andi,beq,beqz,bne M |
| Occurrences: | 1 in 1 configs, 1 test files |
| Snippet from: | double-convert.6a9e415f.b4b991a3.234cbd22.b04ba64e.d98bec92.290c80f2.cbdb04e2f0.ll (mutant of double-convert.6a9e415f.b4b991a3.234cbd22.b04ba64e.d98bec92.290c80f2.ll) @fcvt_wu_s_i8 via llvm-extract |
| Config: | -mtriple=riscv64 -verify-machineinstrs -target-abi=lp64d -mattr=+d,+zcb,+zfa,+zfh,+zvkb -O2 |
| Local check: | reproduces at b577f07195 |
| Compiler Explorer: | not applicable: Compiler Explorer compiles RISC-V but cannot run it |
Snippet:
@G.2 = external global i1
@G.7 = external global i8
@G.8 = external global i1
@G.9 = external global i64
@G.10 = external global i32
@G.11 = external global <2 x i64>
; Function Attrs: nounwind
define zeroext i8 @fcvt_wu_s_i8(double %a) #0 {
%A3 = alloca ptr, align 8
store ptr poison, ptr %A3, align 8
%A = alloca i8, align 1
store i8 1, ptr %A, align 1
%L = load i8, ptr %A, align 1
switch i8 %L, label %SW_D [
i8 62, label %SW_C
i8 -28, label %SW_C1
]
BB: ; preds = %BB1, %SW_D
%LGV1 = load i64, ptr @G.9, align 4
%1 = fptoui double %a to i8
%C2 = icmp ne i64 -1, %LGV1
store i1 %C2, 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
br label %BB
SW_C1: ; preds = %0
%LGV = load i8, ptr @G.7, align 1
%C3 = icmp ne i8 %LGV, %LGV
store i1 %C3, ptr poison, align 1
ret i8 %LGV
T: ; preds = %SW_C
%LGV3 = load i32, ptr @G.10, align 4
%C5 = fcmp false double %a, %a
%G1 = getelementptr ptr, ptr %G, i16 -32768
%L4 = load i32, ptr %G1, align 4
%B = add i32 %LGV3, %L4
store ptr %G1, ptr poison, align 8
store i32 %B, ptr poison, align 4
store i1 %C5, ptr %G, align 1
br label %BB1
F: ; preds = %SW_C
%C = icmp ult i8 %L, 16
store i1 %C, ptr poison, align 1
%B6 = urem <2 x i64> splat (i64 9223372036854775807), splat (i64 4294967296)
%G2 = getelementptr half, ptr %A, i8 %L
store ptr %G2, ptr %A3, align 8
store <2 x i64> %B6, ptr @G.11, align 16
ret i8 0
}
attributes #0 = { nounwind }
Reproduce:
./exec_oracle.py --flags '-mtriple=riscv64 -verify-machineinstrs -target-abi=lp64d -mattr=+d,+zcb,+zfa,+zfh,+zvkb -O2' --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,+zcb,+zfa,+zfh,+zvkb -O2 -global-isel=0
b1: llc -mtriple=riscv64 -verify-machineinstrs -target-abi=lp64d -mattr=+d,+zcb,+zfa,+zfh,+zvkb -O0 -global-isel=0
b2: llc -mtriple=riscv64 -verify-machineinstrs -target-abi=lp64d -mattr=+d,+zcb,+zfa,+zfh,+zvkb -O2 -global-isel -global-isel-abort=2
Occurrences (1):
| Input | Function | Config |
|---|
| double-convert.6a9e415f.b4b991a3.234cbd22.b04ba64e.d98bec92.290c80f2.cbdb04e2f0.ll (mutant of double-convert.6a9e415f.b4b991a3.234cbd22.b04ba64e.d98bec92.290c80f2.ll) | fcvt_wu_s_i8 | -mtriple=riscv64 -verify-machineinstrs -target-abi=lp64d -mattr=+d,+zcb,+zfa,+zfh,+zvkb -O2 |
Generated 2026-11-29 14:49 UTC.