miscompile: miscompile rv32: add,addi,and,andi,fcvt.wu.h,feq.s

Run:explore-d9924131a4-20261128-105811
Kind:miscompile
Category:miscompile rv32: add,addi,and,andi,fcvt.wu.h,feq.s NEW M
Occurrences:1 in 1 configs, 1 test files
Snippet from:half-convert.06413ff2.e274fbff.ad31a496.cc894ae7.8af210a0.65342bf3.d7647af9.5c004d0a.e4d606004c.ll (mutant of half-convert.06413ff2.e274fbff.ad31a496.cc894ae7.8af210a0.65342bf3.d7647af9.5c004d0a.ll) @fcvt_wu_s_i8 via llvm-extract
Config:-mtriple=riscv32 -verify-machineinstrs -target-abi ilp32d -mattr=+zfhmin,+zvfh,+zfh -O1 -code-model=small
Local check:reproduces at d9924131a4
Compiler Explorer:not applicable: Compiler Explorer compiles RISC-V but cannot run it

Snippet:

@G.1 = external global i1
@G.2 = external global i1
@G.3 = external global half
@G.5 = external global ptr
@G.6 = external global float

; Function Attrs: nounwind
define zeroext i8 @fcvt_wu_s_i8(half %a) #0 {
  %LGV2 = load float, ptr @G.6, align 4
  %C3 = fcmp ord float +inf, %LGV2
  %C1 = fcmp olt float +inf, 1.000000e+00
  %LGV1 = load half, ptr @G.3, align 2
  %A = alloca i1, align 1
  %L1 = load i1, ptr %A, align 1
  %C10 = fcmp ole half %a, %LGV1
  %C7 = icmp sgt i1 %C1, %L1
  %L = load i32, ptr %A, align 4
  %B = ashr i1 %C3, %C7
  %G1 = getelementptr bfloat, ptr %A, i1 %C1
  %C2 = fcmp ueq half %a, %LGV1
  store i1 %C3, ptr %A, align 1
  %G = getelementptr ptr, ptr %A, i32 %L
  %C = fcmp ord double 0.000000e+00, 0.000000e+00
  %C11 = icmp ule i32 %L, %L
  %1 = fptoui half %a to i8
  store i1 %C10, ptr %G, align 1
  store i1 %C7, ptr %A, align 1
  %C4 = icmp sgt i1 %C, %B
  %C9 = icmp ult i1 %L1, %C2
  store i1 %C2, ptr @G.2, align 1
  store ptr %G1, ptr @G.5, align 8
  store i1 %C4, ptr %G, align 1
  store i1 %C9, ptr @G.2, align 1
  store i1 %C11, ptr @G.1, align 1
  ret i8 %1
}

attributes #0 = { nounwind }

Reproduce:

./exec_oracle.py --flags '-mtriple=riscv32 -verify-machineinstrs -target-abi ilp32d -mattr=+zfhmin,+zvfh,+zfh -O1 -code-model=small' --funcs fcvt_wu_s_i8 snippet.ll

Local execution result:

9 of 64 inputs differ (first: #12)
SelectionDAG hash c7c80994735a01b2, GlobalISel hash 50322c310da047ea
b0: llc -mtriple=riscv32 -verify-machineinstrs -target-abi ilp32d -mattr=+zfhmin,+zvfh,+zfh -code-model=small -O1 -global-isel=0
b1: llc -mtriple=riscv32 -verify-machineinstrs -target-abi ilp32d -mattr=+zfhmin,+zvfh,+zfh -code-model=small -O0 -global-isel=0
b2: llc -mtriple=riscv32 -verify-machineinstrs -target-abi ilp32d -mattr=+zfhmin,+zvfh,+zfh -code-model=small -O1 -global-isel -global-isel-abort=2

Occurrences (1):

InputFunctionConfig
half-convert.06413ff2.e274fbff.ad31a496.cc894ae7.8af210a0.65342bf3.d7647af9.5c004d0a.e4d606004c.ll (mutant of half-convert.06413ff2.e274fbff.ad31a496.cc894ae7.8af210a0.65342bf3.d7647af9.5c004d0a.ll)fcvt_wu_s_i8-mtriple=riscv32 -verify-machineinstrs -target-abi ilp32d -mattr=+zfhmin,+zvfh,+zfh -O1 -code-model=small

Generated 2026-11-29 14:49 UTC.