miscompile: miscompile rv64: add,addi,and,andi,beqz,j

Run:explore-b577f07195-20261129-105236
Kind:miscompile
Category:miscompile rv64: add,addi,and,andi,beqz,j M
Occurrences:1 in 1 configs, 1 test files
Snippet from:fixed-vectors-vror.32cb11e9.8648ae65.64a642212f.ll (mutant of fixed-vectors-vror.32cb11e9.8648ae65.ll) @vror_vx_v1i16 via llvm-extract
Config:-mtriple=riscv64 -verify-machineinstrs -O2
Local check:reproduces at b577f07195
Compiler Explorer:not applicable: Compiler Explorer compiles RISC-V but cannot run it

Snippet:

@G.9 = external global ptr
@G.11 = external global <1 x i1>
@G.13 = external global <2 x i64>

define <1 x i16> @vror_vx_v1i16(<1 x i16> %a, i16 %b) {
  %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
  %B3 = sdiv <2 x i64> splat (i64 1), splat (i64 9223372036854775807)
  %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
  store <2 x i64> %B3, ptr @G.13, align 16
  ret <1 x i16> %x

T:                                                ; preds = %0
  %B2 = lshr <1 x i16> %b.splat, %b.splat
  store <1 x i16> %B2, ptr %A, align 2
  ret <1 x i16> %b.splat

F:                                                ; preds = %0
  %G = getelementptr <1 x i16>, ptr %A, i16 %b
  %C = icmp ne i16 %b, -1
  %C1 = icmp ne <1 x i16> %a, %a
  store i1 %C, ptr %A, align 1
  store ptr %G, ptr @G.9, align 8
  store <1 x i1> %C1, ptr @G.11, 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 -O2' --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 -O2 -global-isel=0
b1: llc -mtriple=riscv64 -verify-machineinstrs -O0 -global-isel=0
b2: llc -mtriple=riscv64 -verify-machineinstrs -O2 -global-isel -global-isel-abort=2

Occurrences (1):

InputFunctionConfig
fixed-vectors-vror.32cb11e9.8648ae65.64a642212f.ll (mutant of fixed-vectors-vror.32cb11e9.8648ae65.ll)vror_vx_v1i16-mtriple=riscv64 -verify-machineinstrs -O2

Generated 2026-11-29 14:49 UTC.