miscompile: miscompile rv64: sgtz,slli,slt,srai,srli,sub
| Run: | explore-db12fc36f6-20261127-115111 |
| Kind: | miscompile |
| Category: | miscompile rv64: sgtz,slli,slt,srai,srli,sub M |
| Occurrences: | 1 in 1 configs, 1 test files |
| Snippet from: | scmp.9f84261f.078d0859e2.ll (mutant of scmp.9f84261f.ll) @scmp.8.8 via llvm-extract |
| Config: | -mtriple=riscv64 -verify-machineinstrs -mattr=+zfhmin,+zve32x -O2 |
| Local check: | reproduces at db12fc36f6 |
| Compiler Explorer: | not applicable: Compiler Explorer compiles RISC-V but cannot run it |
Snippet:
@G.2 = external global <8 x i8>
; Function Attrs: nounwind
define i8 @scmp.8.8(i8 signext %x, i8 signext %y) #0 {
%A2 = alloca i8, align 1
store i8 poison, ptr %A2, align 1
%A = alloca i8, align 1
store i8 poison, ptr %A, align 1
%B = shl i8 %y, 16
%LGV = load <8 x i8>, ptr @G.2, align 8
%E = extractelement <8 x i8> %LGV, i32 65536
%1 = call i8 @llvm.scmp.i8.i8(i8 %E, i8 %y)
store i8 %B, ptr %A, align 1
%B1 = shl i8 %E, %y
store i8 %B1, ptr %A2, align 1
ret i8 %1
}
; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none)
declare range(i8 -1, 2) i8 @llvm.scmp.i8.i8(i8, i8) #1
attributes #0 = { nounwind }
attributes #1 = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) }
Reproduce:
./exec_oracle.py --flags '-mtriple=riscv64 -verify-machineinstrs -mattr=+zfhmin,+zve32x -O2' --funcs scmp.8.8 snippet.ll
Local execution result:
18 of 64 inputs differ (first: #0)
SelectionDAG hash f8b9494ba981e5fb, GlobalISel hash ddfb3624bb44b711
b0: llc -mtriple=riscv64 -verify-machineinstrs -mattr=+zfhmin,+zve32x -O2 -global-isel=0
b1: llc -mtriple=riscv64 -verify-machineinstrs -mattr=+zfhmin,+zve32x -O0 -global-isel=0
b2: llc -mtriple=riscv64 -verify-machineinstrs -mattr=+zfhmin,+zve32x -O2 -global-isel -global-isel-abort=2
Occurrences (1):
| Input | Function | Config |
|---|
| scmp.9f84261f.078d0859e2.ll (mutant of scmp.9f84261f.ll) | scmp.8.8 | -mtriple=riscv64 -verify-machineinstrs -mattr=+zfhmin,+zve32x -O2 |
Generated 2026-11-29 14:49 UTC.