miscompile: miscompile rv64: add,addi,andi,andn,lb,lbu
| Run: | explore-b577f07195-20261129-105236 |
| Kind: | miscompile |
| Category: | miscompile rv64: add,addi,andi,andn,lb,lbu NEW M |
| Occurrences: | 1 in 1 configs, 1 test files |
| Snippet from: | stores-of-loads-merging.f68f9e8d.cdaa9fe6.c09c8ecd.6af4588d.5caf19fd62.ll (mutant of stores-of-loads-merging.f68f9e8d.cdaa9fe6.c09c8ecd.6af4588d.ll) @i8_i16_rotate via llvm-extract |
| Config: | -mtriple=riscv64 -verify-machineinstrs -mattr=+v,+b,+zvfh,+xtheadba,+zfh,+a,+c,+zvkb,+zfhmin -O0 |
| Local check: | reproduces at b577f07195 |
| Compiler Explorer: | not applicable: Compiler Explorer compiles RISC-V but cannot run it |
Snippet:
@G.4 = external global i1
@G.9 = external global i1
@G.10 = external global i16
declare void @g()
define void @i8_i16_rotate(ptr %p, ptr %q) {
%A = alloca ptr, align 8
%A11 = alloca i1, align 1
store ptr poison, ptr %A, align 8
%p1 = getelementptr i8, ptr %p, i64 1
%p0 = getelementptr i8, ptr %p, i64 0
%L1 = load i1, ptr %p0, align 1
%G = getelementptr i1, ptr %p0, i1 %L1
%A3 = alloca i64, align 8
store i64 -1, ptr %A3, align 4
%A1 = alloca i1, align 1
%x0 = load i8, ptr %p0, align 2
store i1 true, ptr %A11, align 1
%L4 = load i64, ptr %A3, align 4
store i1 poison, ptr %A1, align 1
switch i64 %L4, label %SW_D [
i64 -1482393206999530625, label %SW_C
]
BB: ; preds = %SW_C, %BB5
%LGV = load i16, ptr @G.10, align 2
call void @g()
%q1 = getelementptr i8, ptr %q, i64 1
%x1 = load i8, ptr %p1, align 1
store i8 %x0, ptr %q1, align 1
%G3 = getelementptr ptr, ptr %q1, i16 %LGV
%G2 = getelementptr i1, ptr %p, i8 %x1
store ptr %G2, ptr %A, align 8
store i8 %x1, ptr %G, align 2
%G1 = getelementptr i8, ptr %p, i64 %L4
store ptr %G1, ptr %G3, align 8
ret void
SW_D: ; preds = %0
%LGV6 = load i1, ptr @G.4, align 1
%G4 = getelementptr ptr, ptr %q, i64 %L4
br i1 %L1, label %T, label %F
BB5: ; preds = %F, %BB7
store ptr %G4, ptr %A1, align 8
br label %BB
SW_C: ; preds = %0
%G5 = getelementptr i64, ptr %q, i16 0
%L = load i1, ptr %G5, align 1
store ptr %G5, ptr %A3, align 8
%C = icmp ugt i1 %L, %L1
store i1 %C, ptr %A1, align 1
br label %BB
T: ; preds = %SW_D
%LGV10 = load i1, ptr @G.9, align 1
%L12 = load i1, ptr %A11, align 1
br i1 %L12, label %T8, label %F9
BB7: ; preds = %F9, %T8
br label %BB5
F: ; preds = %SW_D
br label %BB5
T8: ; preds = %T
br label %BB7
F9: ; preds = %T
br label %BB7
}
Reproduce:
./exec_oracle.py --flags '-mtriple=riscv64 -verify-machineinstrs -mattr=+v,+b,+zvfh,+xtheadba,+zfh,+a,+c,+zvkb,+zfhmin -O0' --funcs i8_i16_rotate snippet.ll
Local execution result:
62 of 64 inputs differ (first: #1)
SelectionDAG hash 4ae3fdbd9413037b, GlobalISel hash ca1e25e82afcb981
b0: llc -mtriple=riscv64 -verify-machineinstrs -mattr=+v,+b,+zvfh,+xtheadba,+zfh,+a,+c,+zvkb,+zfhmin -O0 -global-isel=0
b1: llc -mtriple=riscv64 -verify-machineinstrs -mattr=+v,+b,+zvfh,+xtheadba,+zfh,+a,+c,+zvkb,+zfhmin -O2 -global-isel=0
b2: llc -mtriple=riscv64 -verify-machineinstrs -mattr=+v,+b,+zvfh,+xtheadba,+zfh,+a,+c,+zvkb,+zfhmin -O0 -global-isel -global-isel-abort=2
Occurrences (1):
| Input | Function | Config |
|---|
| stores-of-loads-merging.f68f9e8d.cdaa9fe6.c09c8ecd.6af4588d.5caf19fd62.ll (mutant of stores-of-loads-merging.f68f9e8d.cdaa9fe6.c09c8ecd.6af4588d.ll) | i8_i16_rotate | -mtriple=riscv64 -verify-machineinstrs -mattr=+v,+b,+zvfh,+xtheadba,+zfh,+a,+c,+zvkb,+zfhmin -O0 |
Generated 2026-11-29 14:49 UTC.