miscompile: miscompile rv64: addi,and,andi,auipc,beqz,bnez
| Run: | explore-db12fc36f6-20261127-115111 |
| Kind: | miscompile |
| Category: | miscompile rv64: addi,and,andi,auipc,beqz,bnez M |
| Occurrences: | 1 in 1 configs, 1 test files |
| Snippet from: | fixed-vectors-vror.32cb11e9.8648ae65.e51546935a.ll (mutant of fixed-vectors-vror.32cb11e9.8648ae65.ll) @vror_vx_v1i16 via llvm-extract |
| Config: | -mtriple=riscv64 -verify-machineinstrs -mattr=+zfhmin -O2 -code-model=medium |
| Local check: | reproduces at db12fc36f6 |
| Compiler Explorer: | not applicable: Compiler Explorer compiles RISC-V but cannot run it |
Snippet:
@G.9 = external global i1
@G.11 = external global <1 x i16>
define <1 x i16> @vror_vx_v1i16(<1 x i16> %a, i16 %b) {
%A14 = alloca <1 x i16>, align 2
store <1 x i16> poison, ptr %A14, align 2
%A9 = alloca i1, align 1
store i1 false, ptr %A9, align 1
%A2 = alloca i128, align 8
store i128 -1, ptr %A2, align 4
%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
%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
store <1 x i16> %B, ptr %A, align 2
ret <1 x i16> %x
T: ; preds = %0
%L3 = load i128, ptr %A2, align 4
switch i128 %L3, label %SW_D [
i128 13035411163055094150, label %SW_C
i128 11583156609624202325, label %SW_C4
i128 17369001618566797135, label %SW_C5
i128 12643201384136325973, label %SW_C6
i128 4057885607987709912, label %SW_C7
i128 4178179598826040366, label %SW_C8
]
BB1: ; preds = %SW_C8, %SW_C7, %SW_C6, %SW_C5, %SW_C4, %SW_C, %SW_D
ret <1 x i16> %b.splat
F: ; preds = %0
br label %BB
SW_D: ; preds = %SW_D, %T
%L10 = load i1, ptr %A9, align 1
br i1 %L10, label %BB1, label %SW_D
SW_C: ; preds = %T
br label %BB1
SW_C4: ; preds = %T
br label %BB1
SW_C5: ; preds = %SW_C5, %T
br i1 %L, label %SW_C5, label %BB1
SW_C6: ; preds = %T
br label %BB1
SW_C7: ; preds = %T
%LGV12 = load <1 x i16>, ptr @G.11, align 2
%B13 = xor <1 x i16> %b.splat, %LGV12
store <1 x i16> %B13, ptr %A14, align 2
br label %BB1
SW_C8: ; preds = %SW_C8, %T
%LGV11 = load i1, ptr @G.9, align 1
br i1 %LGV11, label %BB1, label %SW_C8
}
; 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 -O2 -code-model=medium' --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 -code-model=medium -O2 -global-isel=0
b1: llc -mtriple=riscv64 -verify-machineinstrs -mattr=+zfhmin -code-model=medium -O0 -global-isel=0
b2: llc -mtriple=riscv64 -verify-machineinstrs -mattr=+zfhmin -code-model=medium -O2 -global-isel -global-isel-abort=2
Occurrences (1):
| Input | Function | Config |
|---|
| fixed-vectors-vror.32cb11e9.8648ae65.e51546935a.ll (mutant of fixed-vectors-vror.32cb11e9.8648ae65.ll) | vror_vx_v1i16 | -mtriple=riscv64 -verify-machineinstrs -mattr=+zfhmin -O2 -code-model=medium |
Generated 2026-11-29 14:49 UTC.