miscompile: miscompile rv64: add,bne,feq.s,flw,fmv.w.x,j

Run:explore-d9924131a4-20261128-105811
Kind:miscompile
Category:miscompile rv64: add,bne,feq.s,flw,fmv.w.x,j NEW M
Occurrences:1 in 1 configs, 1 test files
Snippet from:stores-of-loads-merging.f68f9e8d.cdaa9fe6.932cd787.645d03d1db.ll (mutant of stores-of-loads-merging.f68f9e8d.cdaa9fe6.932cd787.ll) @i8_i16_rotate via llvm-extract
Config:-mtriple=riscv64 -verify-machineinstrs -mattr=+v,+b,+zvfh,+xtheadba -O3
Local check:reproduces at d9924131a4
Compiler Explorer:not applicable: Compiler Explorer compiles RISC-V but cannot run it

Snippet:

@G.2 = external global i1
@G.3 = external global i1
@G.7 = external global ptr

declare void @g()

define void @i8_i16_rotate(ptr %p, ptr %q) {
  %A3 = alloca i64, align 8
  store i64 -1, ptr %A3, align 4
  %A = alloca ptr, align 8
  store ptr poison, ptr %A, align 8
  %p0 = getelementptr i8, ptr %p, i64 0
  %L1 = load i1, ptr %p0, align 1
  %p1 = getelementptr i8, ptr %p, i64 1
  %G = getelementptr i1, ptr %p0, i1 %L1
  %x0 = load i8, ptr %p0, align 2
  %L4 = load i64, ptr %A3, align 4
  switch i64 %L4, label %SW_D [
    i64 -1482393206999530625, label %SW_C
  ]

BB:                                               ; preds = %SW_C, %SW_D
  %x1 = load i8, ptr %p1, align 1
  call void @g()
  %q1 = getelementptr i8, ptr %q, i64 1
  store i8 %x1, ptr %G, align 2
  %G2 = getelementptr i1, ptr %p, i8 %x1
  store i8 %x0, ptr %q1, align 1
  store ptr %G2, ptr %A, align 8
  ret void

SW_D:                                             ; preds = %0
  %C = fcmp oeq half +inf, 6.550400e+04
  store i1 %C, ptr @G.2, align 1
  %G4 = getelementptr ptr, ptr %q, i1 %L1
  store ptr %G4, ptr @G.7, align 8
  br label %BB

SW_C:                                             ; preds = %0
  %G5 = getelementptr i64, ptr %q, i16 0
  %L = load float, ptr %G5, align 4
  store ptr %G5, ptr %A3, align 8
  %C3 = fcmp oeq float %L, f0x7F7FFFFF
  store i1 %C3, ptr @G.3, align 1
  br label %BB
}

Reproduce:

./exec_oracle.py --flags '-mtriple=riscv64 -verify-machineinstrs -mattr=+v,+b,+zvfh,+xtheadba -O3' --funcs i8_i16_rotate snippet.ll

Local execution result:

62 of 64 inputs differ (first: #1)
SelectionDAG hash 039cf65bb9a99530, GlobalISel hash 83612e0e07462fca
b0: llc -mtriple=riscv64 -verify-machineinstrs -mattr=+v,+b,+zvfh,+xtheadba -O3 -global-isel=0
b1: llc -mtriple=riscv64 -verify-machineinstrs -mattr=+v,+b,+zvfh,+xtheadba -O0 -global-isel=0
b2: llc -mtriple=riscv64 -verify-machineinstrs -mattr=+v,+b,+zvfh,+xtheadba -O3 -global-isel -global-isel-abort=2

Occurrences (1):

InputFunctionConfig
stores-of-loads-merging.f68f9e8d.cdaa9fe6.932cd787.645d03d1db.ll (mutant of stores-of-loads-merging.f68f9e8d.cdaa9fe6.932cd787.ll)i8_i16_rotate-mtriple=riscv64 -verify-machineinstrs -mattr=+v,+b,+zvfh,+xtheadba -O3

Generated 2026-11-29 14:49 UTC.