miscompile: miscompile rv64: addi,and,andi,ld,lh,lhu
| Run: | explore-db12fc36f6-20261127-115111 |
| Kind: | miscompile |
| Category: | miscompile rv64: addi,and,andi,ld,lh,lhu NEW M |
| Occurrences: | 1 in 1 configs, 1 test files |
| Snippet from: | fixed-vectors-vror.32cb11e9.8648ae65.3839d0b282.ll (mutant of fixed-vectors-vror.32cb11e9.8648ae65.ll) @vror_vx_v1i16 via llvm-extract |
| Config: | -mtriple=riscv64 -verify-machineinstrs -mattr=+zfhmin -O0 |
| Local check: | reproduces at db12fc36f6 |
| Compiler Explorer: | not applicable: Compiler Explorer compiles RISC-V but cannot run it |
Snippet:
@G.9 = external global i16
@G.12 = external global <1 x i1>
define <1 x i16> @vror_vx_v1i16(<1 x i16> %a, i16 %b) {
%A2 = alloca <1 x i16>, align 2
store <1 x i16> poison, ptr %A2, align 2
%A = alloca i1, align 1
store i1 false, ptr %A, align 1
%b.head = insertelement <1 x i16> poison, i16 %b, i32 0
%b.splat = shufflevector <1 x i16> %b.head, <1 x i16> poison, <1 x i32> zeroinitializer
%L = load i1, ptr %A, align 1
br i1 %L, label %T, label %F
BB: ; preds = %F
%LGV = load i16, ptr @G.9, align 2
%x = call <1 x i16> @llvm.fshr.v1i16(<1 x i16> %a, <1 x i16> %a, <1 x i16> %b.splat)
%B = lshr <1 x i16> %b.head, %a
%B3 = lshr i16 %b, %LGV
store <1 x i16> %B, ptr %A, align 2
store i16 %B3, ptr %A2, align 2
ret <1 x i16> %x
T: ; preds = %0
ret <1 x i16> %b.splat
F: ; preds = %0
%B1 = and <1 x i16> %a, %b.head
%C = icmp eq <1 x i16> %a, splat (i16 -1)
store <1 x i16> %B1, ptr %A2, align 2
store <1 x i1> %C, ptr @G.12, align 1
br label %BB
}
; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none)
declare <1 x i16> @llvm.fshr.v1i16(<1 x i16>, <1 x i16>, <1 x i16>) #0
attributes #0 = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) }
Reproduce:
./exec_oracle.py --flags '-mtriple=riscv64 -verify-machineinstrs -mattr=+zfhmin -O0' --funcs vror_vx_v1i16 snippet.ll
Local execution result:
29 of 64 inputs differ (first: #1)
SelectionDAG hash e80159fb23549387, GlobalISel hash a3c4be9285a215bc
b0: llc -mtriple=riscv64 -verify-machineinstrs -mattr=+zfhmin -O0 -global-isel=0
b1: llc -mtriple=riscv64 -verify-machineinstrs -mattr=+zfhmin -O2 -global-isel=0
b2: llc -mtriple=riscv64 -verify-machineinstrs -mattr=+zfhmin -O0 -global-isel -global-isel-abort=2
Occurrences (1):
| Input | Function | Config |
|---|
| fixed-vectors-vror.32cb11e9.8648ae65.3839d0b282.ll (mutant of fixed-vectors-vror.32cb11e9.8648ae65.ll) | vror_vx_v1i16 | -mtriple=riscv64 -verify-machineinstrs -mattr=+zfhmin -O0 |
Generated 2026-11-29 14:49 UTC.