miscompile: miscompile rv32: addi,and,andi,beq,beqz,bltu
| Run: | explore-db12fc36f6-20261127-115111 |
| Kind: | miscompile |
| Category: | miscompile rv32: addi,and,andi,beq,beqz,bltu M |
| Occurrences: | 2 in 2 configs, 1 test files |
| Snippet from: | readcyclecounter.bff0a056.9ab3091612.ll (mutant of readcyclecounter.bff0a056.ll) @test_builtin_readcyclecounter via llvm-extract + llvm-reduce |
| Config: | -mtriple=riscv32 -verify-machineinstrs -mattr=+f -O2 |
| Local check: | reproduces at db12fc36f6 |
| Compiler Explorer: | not applicable: Compiler Explorer compiles RISC-V but cannot run it |
Snippet:
define i64 @test_builtin_readcyclecounter() {
SW_D:
%0 = tail call i64 @llvm.readcyclecounter()
%B = ashr i64 1, %0
ret i64 %B
}
; Function Attrs: nocallback nofree nosync nounwind willreturn
declare i64 @llvm.readcyclecounter() #0
attributes #0 = { nocallback nofree nosync nounwind willreturn }
Reproduce:
./exec_oracle.py --flags '-mtriple=riscv32 -verify-machineinstrs -mattr=+f -O2' --funcs test_builtin_readcyclecounter snippet.ll
Local execution result:
4 of 64 inputs differ (first: #11)
SelectionDAG hash d2d44143c8dea41e, GlobalISel hash b2431501b7d62d21
b0: llc -mtriple=riscv32 -verify-machineinstrs -mattr=+f -O2 -global-isel=0
b1: llc -mtriple=riscv32 -verify-machineinstrs -mattr=+f -O0 -global-isel=0
b2: llc -mtriple=riscv32 -verify-machineinstrs -mattr=+f -O2 -global-isel -global-isel-abort=2
Occurrences (2):
| Input | Function | Config |
|---|
| readcyclecounter.bff0a056.9ab3091612.ll (mutant of readcyclecounter.bff0a056.ll) | test_builtin_readcyclecounter | -mtriple=riscv32 -verify-machineinstrs -mattr=+f -O2 |
| readcyclecounter.bff0a056.e1d8d5fdbb.ll (mutant of readcyclecounter.bff0a056.ll) | test_builtin_readcyclecounter | -mtriple=riscv32 -verify-machineinstrs -O3 |
Generated 2026-11-29 14:49 UTC.