miscompile: miscompile rv64: addi,andi,beqz,bnez,fcvt.d.l,fcvt.l.d
| Run: | explore-d9924131a4-20261128-105811 |
| Kind: | miscompile |
| Category: | miscompile rv64: addi,andi,beqz,bnez,fcvt.d.l,fcvt.l.d M |
| Occurrences: | 1 in 1 configs, 1 test files |
| Snippet from: | double-round-conv.95f4c3b8.b9364c85.af6fe18c.9ce3a6a739.ll (mutant of double-round-conv.95f4c3b8.b9364c85.af6fe18c.ll) @test_trunc_si8 via llvm-extract |
| Config: | -mtriple=riscv64 -verify-machineinstrs -target-abi=lp64d -mattr=+d,+c,+zfh,+zbb -O2 |
| Local check: | reproduces at d9924131a4 |
| Compiler Explorer: | not applicable: Compiler Explorer compiles RISC-V but cannot run it |
Snippet:
@G = external global double
@G.4 = external global i1
@G.5 = external global <2 x i64>
define signext i8 @test_trunc_si8(double %x) {
%A = alloca i1, align 1
store i1 true, ptr %A, align 1
%a = call double @llvm.trunc.f64(double %x)
%L = load i1, ptr %A, align 1
br i1 %L, label %T, label %F
BB: ; preds = %F, %T
%B = fadd double %x, 4.200000e+01
br i1 %L, label %T3, label %F4
BB2: ; preds = %T3
%b = fptosi double %a to i8
store double %B, ptr @G, align 8
ret i8 %b
T: ; preds = %0
%B1 = add <2 x i64> splat (i64 42), splat (i64 -9223372036854775808)
store <2 x i64> %B1, ptr @G.5, align 16
br label %BB
F: ; preds = %0
br label %BB
T3: ; preds = %BB
br label %BB2
F4: ; preds = %BB
%C = icmp ne i64 4294967296, 0
store i1 %C, ptr @G.4, align 1
ret i8 -128
}
; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.trunc.f64(double) #0
attributes #0 = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) }
Reproduce:
./exec_oracle.py --flags '-mtriple=riscv64 -verify-machineinstrs -target-abi=lp64d -mattr=+d,+c,+zfh,+zbb -O2' --funcs test_trunc_si8 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,+c,+zfh,+zbb -O2 -global-isel=0
b1: llc -mtriple=riscv64 -verify-machineinstrs -target-abi=lp64d -mattr=+d,+c,+zfh,+zbb -O0 -global-isel=0
b2: llc -mtriple=riscv64 -verify-machineinstrs -target-abi=lp64d -mattr=+d,+c,+zfh,+zbb -O2 -global-isel -global-isel-abort=2
Occurrences (1):
| Input | Function | Config |
|---|
| double-round-conv.95f4c3b8.b9364c85.af6fe18c.9ce3a6a739.ll (mutant of double-round-conv.95f4c3b8.b9364c85.af6fe18c.ll) | test_trunc_si8 | -mtriple=riscv64 -verify-machineinstrs -target-abi=lp64d -mattr=+d,+c,+zfh,+zbb -O2 |
Generated 2026-11-29 14:49 UTC.