miscompile: miscompile rv64: addi,andi,beqz,bge,blt,bnez

Run:explore-b577f07195-20261129-105236
Kind:miscompile
Category:miscompile rv64: addi,andi,beqz,bge,blt,bnez NEW M
Occurrences:1 in 1 configs, 1 test files
Snippet from:stores-of-loads-merging.ef442835.893a6b4156.ll (mutant of stores-of-loads-merging.ef442835.ll) @two_float_rotate via llvm-extract
Config:-mtriple=riscv64 -verify-machineinstrs -mattr=+v,+b,+zvfh,+m -O2
Local check:reproduces at b577f07195
Compiler Explorer:not applicable: Compiler Explorer compiles RISC-V but cannot run it

Snippet:

@G = external global i1
@G.1 = external global i32

declare void @g()

define void @two_float_rotate(ptr %p, ptr %q) {
  %A = alloca i1, align 1
  store i1 false, ptr %A, align 1
  %p0 = getelementptr i8, ptr %p, i64 0
  %L = load i1, ptr %p0, align 1
  %p1 = getelementptr i8, ptr %p, i64 4
  br i1 %L, label %T, label %F

BB:                                               ; preds = %BB1
  %x0 = load float, ptr %p0, align 8
  %x1 = load float, ptr %p1, align 4
  call void @g()
  %q1 = getelementptr i8, ptr %q, i64 4
  store float %x1, ptr %G, align 8
  store float %x0, ptr %q1, align 4
  ret void

T:                                                ; preds = %0
  %LGV = load i32, ptr @G.1, align 4
  switch i32 %LGV, label %SW_D [
    i32 -1115581060, label %SW_C
    i32 -1015568409, label %SW_C2
    i32 1383429166, label %SW_C3
    i32 -782556467, label %SW_C4
    i32 -1302022547, label %SW_C5
    i32 141801076, label %SW_C6
  ]

BB1:                                              ; preds = %SW_C4, %SW_C3, %SW_C2, %SW_C, %SW_D
  %G = getelementptr ptr, ptr %q, i32 0
  br label %BB

F:                                                ; preds = %0
  ret void

SW_D:                                             ; preds = %SW_D, %T
  %L7 = load i1, ptr %A, align 1
  br i1 %L7, label %SW_D, label %BB1

SW_C:                                             ; preds = %T
  br label %BB1

SW_C2:                                            ; preds = %T
  br label %BB1

SW_C3:                                            ; preds = %SW_C3, %T
  %LGV8 = load i1, ptr @G, align 1
  br i1 %L, label %SW_C3, label %BB1

SW_C4:                                            ; preds = %T
  br label %BB1

SW_C5:                                            ; preds = %T
  ret void

SW_C6:                                            ; preds = %T
  ret void
}

Reproduce:

./exec_oracle.py --flags '-mtriple=riscv64 -verify-machineinstrs -mattr=+v,+b,+zvfh,+m -O2' --funcs two_float_rotate snippet.ll

Local execution result:

62 of 64 inputs differ (first: #1)
SelectionDAG hash 72bd0d7dbf15e118, GlobalISel hash 0cb3ecf4e31b9ab6
b0: llc -mtriple=riscv64 -verify-machineinstrs -mattr=+v,+b,+zvfh,+m -O2 -global-isel=0
b1: llc -mtriple=riscv64 -verify-machineinstrs -mattr=+v,+b,+zvfh,+m -O0 -global-isel=0
b2: llc -mtriple=riscv64 -verify-machineinstrs -mattr=+v,+b,+zvfh,+m -O2 -global-isel -global-isel-abort=2

Occurrences (1):

InputFunctionConfig
stores-of-loads-merging.ef442835.893a6b4156.ll (mutant of stores-of-loads-merging.ef442835.ll)two_float_rotate-mtriple=riscv64 -verify-machineinstrs -mattr=+v,+b,+zvfh,+m -O2

Generated 2026-11-29 14:49 UTC.