miscompile: miscompile rv64: add,andi,beqz,bne,bnez,j
| Run: | explore-b577f07195-20261129-105236 |
| Kind: | miscompile |
| Category: | miscompile rv64: add,andi,beqz,bne,bnez,j NEW M |
| Occurrences: | 1 in 1 configs, 1 test files |
| Snippet from: | stores-of-loads-merging.f68f9e8d.cdaa9fe6.932cd787.0099a9ab.e6a18d5265.ll (mutant of stores-of-loads-merging.f68f9e8d.cdaa9fe6.932cd787.0099a9ab.ll) @i8_i16_rotate via llvm-extract |
| Config: | -mtriple=riscv64 -verify-machineinstrs -mattr=+v,+b,+zvfh,+xtheadba,+zicond -O1 |
| 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.6 = external global ptr
declare void @g()
define void @i8_i16_rotate(ptr %p, ptr %q) {
%A6 = alloca i1, align 1
store i1 poison, ptr %A6, align 1
%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
switch i64 %L4, label %SW_D [
i64 -1482393206999530625, label %SW_C
]
BB: ; preds = %SW_C, %BB1
%x1 = load i8, ptr %p1, align 1
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
ret void
SW_D: ; preds = %0
%C = fcmp oeq half +inf, 6.550400e+04
switch i1 %C, label %SW_D2 [
i1 false, label %SW_C3
i1 true, label %SW_C4
]
BB1: ; preds = %SW_C4, %SW_C3, %SW_D2
store i1 %C, ptr @G.2, align 1
br label %BB
SW_C: ; preds = %0
%G5 = getelementptr i64, ptr %q, i16 0
%G1 = getelementptr half, ptr %q, i64 %L4
store ptr %G5, ptr %A3, align 8
store ptr %G1, ptr @G.6, align 8
br label %BB
SW_D2: ; preds = %SW_D2, %SW_D
br i1 %L1, label %SW_D2, label %BB1
SW_C3: ; preds = %SW_D
br label %BB1
SW_C4: ; preds = %SW_D
%C5 = icmp sge i64 9223372036854775807, %L4
store i1 %C5, ptr %A6, align 1
br label %BB1
}
Reproduce:
./exec_oracle.py --flags '-mtriple=riscv64 -verify-machineinstrs -mattr=+v,+b,+zvfh,+xtheadba,+zicond -O1' --funcs i8_i16_rotate snippet.ll
Local execution result:
62 of 64 inputs differ (first: #1)
SelectionDAG hash 039cf65bb9a99530, GlobalISel hash 83612e0e07462fca
b0: llc -mtriple=riscv64 -verify-machineinstrs -mattr=+v,+b,+zvfh,+xtheadba,+zicond -O1 -global-isel=0
b1: llc -mtriple=riscv64 -verify-machineinstrs -mattr=+v,+b,+zvfh,+xtheadba,+zicond -O0 -global-isel=0
b2: llc -mtriple=riscv64 -verify-machineinstrs -mattr=+v,+b,+zvfh,+xtheadba,+zicond -O1 -global-isel -global-isel-abort=2
Occurrences (1):
| Input | Function | Config |
|---|
| stores-of-loads-merging.f68f9e8d.cdaa9fe6.932cd787.0099a9ab.e6a18d5265.ll (mutant of stores-of-loads-merging.f68f9e8d.cdaa9fe6.932cd787.0099a9ab.ll) | i8_i16_rotate | -mtriple=riscv64 -verify-machineinstrs -mattr=+v,+b,+zvfh,+xtheadba,+zicond -O1 |
Generated 2026-11-29 14:49 UTC.