miscompile: miscompile rv64: add,addi,andi,beq,beqz,bge
| Run: | explore-d9924131a4-20261128-105811 |
| Kind: | miscompile |
| Category: | miscompile rv64: add,addi,andi,beq,beqz,bge M |
| Occurrences: | 1 in 1 configs, 1 test files |
| Snippet from: | double-convert.6a9e415f.b4b991a3.234cbd22.03a49e3e.ef24ea1a4d.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,+zve32x -O3 |
| 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.7 = external global i8
@G.8 = external global i1
@G.9 = external global i1
; Function Attrs: nounwind
define zeroext i8 @fcvt_wu_s_i8(double %a) #0 {
%A20 = alloca i1, align 1
store i1 false, ptr %A20, align 1
%A4 = alloca i16, align 2
store i16 256, ptr %A4, align 2
%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
%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
%G2 = getelementptr i1, ptr %G, i8 %L
store ptr %G2, ptr poison, align 8
br i1 %LGV2, label %T, label %F
BB1: ; preds = %BB3
br label %BB
SW_C1: ; preds = %0
%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
ret i8 %LGV
T: ; preds = %SW_C
%L5 = load i16, ptr %A4, align 2
switch i16 %L5, label %SW_D6 [
i16 12072, label %SW_C7
i16 6875, label %SW_C8
i16 -47, label %SW_C9
i16 -29573, label %SW_C10
i16 32420, label %SW_C11
i16 22060, label %SW_C12
i16 21700, label %SW_C13
]
BB3: ; preds = %SW_C13, %SW_C11, %SW_C8
br label %BB1
F: ; preds = %SW_C
ret i8 0
SW_D6: ; preds = %T
ret i8 %L
SW_C7: ; preds = %T
%L21 = load i1, ptr %A20, align 1
br i1 %L21, label %T18, label %F19
BB17: ; preds = %F19, %T18
ret i8 1
SW_C8: ; preds = %SW_C8, %T
%C16 = fcmp olt double %a, %a
%LGV14 = load i1, ptr @G.9, align 1
store i1 %C16, ptr poison, align 1
br i1 %LGV14, label %BB3, label %SW_C8
SW_C9: ; preds = %T
ret i8 %L
SW_C10: ; preds = %T
ret i8 -128
SW_C11: ; preds = %T
br label %BB3
SW_C12: ; preds = %T
ret i8 127
SW_C13: ; preds = %SW_C13, %T
br i1 %LGV2, label %BB3, label %SW_C13
T18: ; preds = %T18, %SW_C7
br i1 %LGV2, label %T18, label %BB17
F19: ; preds = %SW_C7
br label %BB17
}
attributes #0 = { nounwind }
Reproduce:
./exec_oracle.py --flags '-mtriple=riscv64 -verify-machineinstrs -target-abi=lp64d -mattr=+d,+a,+zicond,+zve32x -O3' --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,+zve32x -O3 -global-isel=0
b1: llc -mtriple=riscv64 -verify-machineinstrs -target-abi=lp64d -mattr=+d,+a,+zicond,+zve32x -O0 -global-isel=0
b2: llc -mtriple=riscv64 -verify-machineinstrs -target-abi=lp64d -mattr=+d,+a,+zicond,+zve32x -O3 -global-isel -global-isel-abort=2
Occurrences (1):
| Input | Function | Config |
|---|
| double-convert.6a9e415f.b4b991a3.234cbd22.03a49e3e.ef24ea1a4d.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,+zve32x -O3 |
Generated 2026-11-29 14:49 UTC.