miscompile: miscompile rv64: add,addi,beq,bge,blt,bne
| Run: | explore-db12fc36f6-20261127-115111 |
| Kind: | miscompile |
| Category: | miscompile rv64: add,addi,beq,bge,blt,bne M |
| Occurrences: | 1 in 1 configs, 1 test files |
| Snippet from: | stores-of-loads-merging.f68f9e8d.cdaa9fe6.ea7d9a72.01b6ae7cdb.ll (mutant of stores-of-loads-merging.f68f9e8d.cdaa9fe6.ea7d9a72.ll) @i8_i16_rotate via llvm-extract |
| Config: | -mtriple=riscv64 -verify-machineinstrs -mattr=+v,+b,+zvfh,+xtheadba,+zbs -O1 |
| Local check: | reproduces at db12fc36f6 |
| Compiler Explorer: | not applicable: Compiler Explorer compiles RISC-V but cannot run it |
Snippet:
@G.5 = external global ptr
@G.9 = external global i16
declare void @g()
define void @i8_i16_rotate(ptr %p, ptr %q) {
%LGV = load i16, ptr @G.9, align 2
%B = fmul <4 x float> splat (float 1.401300e-45), splat (float +inf)
%A3 = alloca i64, align 8
store i64 -1, ptr %A3, align 4
%A = alloca ptr, align 8
store ptr poison, ptr %A, align 8
%p0 = getelementptr i8, ptr %p, i64 0
%L1 = load i1, ptr %p0, align 1
%p1 = getelementptr i8, ptr %p, i64 1
%G = getelementptr i1, ptr %p0, i1 %L1
%x0 = load i8, ptr %p0, align 2
%L4 = load i64, ptr %A3, align 4
store <4 x float> %B, ptr %p0, align 16
switch i16 %LGV, label %SW_D5 [
i16 -10195, label %SW_C6
i16 27850, label %SW_C7
i16 -27436, label %SW_C8
i16 -3274, label %SW_C9
i16 6364, label %SW_C10
]
BB4: ; preds = %SW_C7, %SW_D5
switch i64 %L4, label %SW_D [
i64 -1482393206999530625, label %SW_C
]
BB: ; preds = %SW_C, %SW_D
%x1 = load i8, ptr %p1, align 1
%G1 = getelementptr i64, ptr %p0, i64 0
call void @g()
%q1 = getelementptr i8, ptr %q, i64 1
store i8 %x1, ptr %G, align 2
%G2 = getelementptr i1, ptr %p, i8 %x1
store i8 %x0, ptr %q1, align 1
store ptr %G2, ptr %A, align 8
store ptr %G1, ptr %A3, align 8
ret void
SW_D: ; preds = %BB4
br label %BB
SW_C: ; preds = %BB4
%G5 = getelementptr i64, ptr %q, i16 0
%G3 = getelementptr i8, ptr %q, i128 -170141183460469231731687303715884105728
store ptr %G5, ptr %A3, align 8
store ptr %G3, ptr @G.5, align 8
br label %BB
SW_D5: ; preds = %0
br label %BB4
SW_C6: ; preds = %0
ret void
SW_C7: ; preds = %0
br label %BB4
SW_C8: ; preds = %0
ret void
SW_C9: ; preds = %0
ret void
SW_C10: ; preds = %0
ret void
}
Reproduce:
./exec_oracle.py --flags '-mtriple=riscv64 -verify-machineinstrs -mattr=+v,+b,+zvfh,+xtheadba,+zbs -O1' --funcs i8_i16_rotate snippet.ll
Local execution result:
62 of 64 inputs differ (first: #1)
SelectionDAG hash 229d4cfd671f9735, GlobalISel hash a8b2147e88ec6024
b0: llc -mtriple=riscv64 -verify-machineinstrs -mattr=+v,+b,+zvfh,+xtheadba,+zbs -O1 -global-isel=0
b1: llc -mtriple=riscv64 -verify-machineinstrs -mattr=+v,+b,+zvfh,+xtheadba,+zbs -O0 -global-isel=0
b2: llc -mtriple=riscv64 -verify-machineinstrs -mattr=+v,+b,+zvfh,+xtheadba,+zbs -O1 -global-isel -global-isel-abort=2
Occurrences (1):
| Input | Function | Config |
|---|
| stores-of-loads-merging.f68f9e8d.cdaa9fe6.ea7d9a72.01b6ae7cdb.ll (mutant of stores-of-loads-merging.f68f9e8d.cdaa9fe6.ea7d9a72.ll) | i8_i16_rotate | -mtriple=riscv64 -verify-machineinstrs -mattr=+v,+b,+zvfh,+xtheadba,+zbs -O1 |
Generated 2026-11-29 14:49 UTC.