miscompile: miscompile rv64: add,addi,andi,bne,call,j

Run:explore-b577f07195-20261129-105236
Kind:miscompile
Category:miscompile rv64: add,addi,andi,bne,call,j NEW M
Occurrences:1 in 1 configs, 1 test files
Snippet from:fixed-vectors-vrol.6abad9bf.7fe79276.e1269152d6.ll (mutant of fixed-vectors-vrol.6abad9bf.7fe79276.ll) @vrol_vv_v1i32 via llvm-extract
Config:-mtriple=riscv64 -verify-machineinstrs -mattr=+zicond,+d -O2
Local check:reproduces at b577f07195
Compiler Explorer:not applicable: Compiler Explorer compiles RISC-V but cannot run it

Snippet:

@G = external global <4 x i32>
@G.1 = external global i16
@G.2 = external global i32
@G.4 = external global i1
@G.5 = external global i16

define <1 x i32> @vrol_vv_v1i32(<1 x i32> %a, <1 x i32> %b) {
  %A6 = alloca ptr, align 8
  store ptr poison, ptr %A6, align 8
  %A5 = alloca i1, align 1
  store i1 poison, ptr %A5, align 1
  %A = alloca i16, align 2
  store i16 0, ptr %A, align 2
  %LGV2 = load i16, ptr @G.1, align 2
  %LGV1 = load i16, ptr @G.1, align 2
  %G = getelementptr <1 x i32>, ptr %A5, i16 %LGV1
  %L = load i16, ptr %A, align 2
  store ptr %G, ptr %A6, align 8
  switch i16 %L, label %SW_D [
    i16 6906, label %SW_C
  ]

BB:                                               ; preds = %SW_C, %SW_D
  %LGV = load <4 x i32>, ptr @G, align 16
  %E = extractelement <4 x i32> %LGV, i16 %LGV1
  %x = call <1 x i32> @llvm.fshl.v1i32(<1 x i32> %a, <1 x i32> %a, <1 x i32> %b)
  store i32 %E, ptr @G.2, align 4
  ret <1 x i32> %x

SW_D:                                             ; preds = %0
  br label %BB

SW_C:                                             ; preds = %0
  %B = and i16 %LGV1, %LGV1
  %C = icmp ult i16 %LGV2, 42
  store i1 %C, ptr @G.4, align 1
  store i16 %B, ptr @G.5, align 2
  %B4 = sdiv i1 %C, false
  store i1 %B4, ptr %A5, align 1
  br label %BB
}

; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none)
declare <1 x i32> @llvm.fshl.v1i32(<1 x i32>, <1 x i32>, <1 x i32>) #0

attributes #0 = { nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none) }

Reproduce:

./exec_oracle.py --flags '-mtriple=riscv64 -verify-machineinstrs -mattr=+zicond,+d -O2' --funcs vrol_vv_v1i32 snippet.ll

Local execution result:

27 of 64 inputs differ (first: #1)
SelectionDAG hash e80159fb23549387, GlobalISel hash 12361178916109d6
b0: llc -mtriple=riscv64 -verify-machineinstrs -mattr=+zicond,+d -O2 -global-isel=0
b1: llc -mtriple=riscv64 -verify-machineinstrs -mattr=+zicond,+d -O0 -global-isel=0
b2: llc -mtriple=riscv64 -verify-machineinstrs -mattr=+zicond,+d -O2 -global-isel -global-isel-abort=2

Occurrences (1):

InputFunctionConfig
fixed-vectors-vrol.6abad9bf.7fe79276.e1269152d6.ll (mutant of fixed-vectors-vrol.6abad9bf.7fe79276.ll)vrol_vv_v1i32-mtriple=riscv64 -verify-machineinstrs -mattr=+zicond,+d -O2

Generated 2026-11-29 14:49 UTC.