miscompile: miscompile rv32: and,beqz,fabs.h,fcvt.h.w,fcvt.w.h,fcvt.wu.h

Run:explore-db12fc36f6-20261127-115111
Kind:miscompile
Category:miscompile rv32: and,beqz,fabs.h,fcvt.h.w,fcvt.w.h,fcvt.wu.h M
Occurrences:1 in 1 configs, 1 test files
Snippet from:half-round-conv.cac5873d.3881cb25.f7f5a6033c.ll (mutant of half-round-conv.cac5873d.3881cb25.ll) @test_trunc_ui8 via llvm-extract
Config:-mtriple=riscv32 -verify-machineinstrs -target-abi=ilp32f -mattr=+zfh,+zbb,+f,+zicsr -O3
Local check:reproduces at db12fc36f6
Compiler Explorer:not applicable: Compiler Explorer compiles RISC-V but cannot run it

Snippet:

@G.1 = external global half
@G.3 = external global half
@G.4 = external global i1
@G.7 = external global i32

define zeroext i8 @test_trunc_ui8(half %x) {
  %LGV1 = load half, ptr @G.3, align 2
  %A = alloca i1, align 1
  %L3 = load i32, ptr %A, align 4
  store i1 poison, ptr %A, align 1
  %B = add i32 0, %L3
  %LGV = load half, ptr @G.1, align 2
  %a = call half @llvm.trunc.f16(half %x)
  %C2 = fcmp ord half %LGV1, %LGV
  %b = fptoui half %a to i8
  %C = fcmp oeq half %x, %LGV
  store i1 %C, ptr %A, align 1
  store i1 %C2, ptr @G.4, align 1
  store i32 %B, ptr @G.7, align 4
  ret i8 %b
}

; Function Attrs: nocallback nocreateundeforpoison nofree nosync nounwind speculatable willreturn memory(none)
declare half @llvm.trunc.f16(half) #0

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

Reproduce:

./exec_oracle.py --flags '-mtriple=riscv32 -verify-machineinstrs -target-abi=ilp32f -mattr=+zfh,+zbb,+f,+zicsr -O3' --funcs test_trunc_ui8 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=ilp32f -mattr=+zfh,+zbb,+f,+zicsr -O3 -global-isel=0
b1: llc -mtriple=riscv32 -verify-machineinstrs -target-abi=ilp32f -mattr=+zfh,+zbb,+f,+zicsr -O0 -global-isel=0
b2: llc -mtriple=riscv32 -verify-machineinstrs -target-abi=ilp32f -mattr=+zfh,+zbb,+f,+zicsr -O3 -global-isel -global-isel-abort=2

Occurrences (1):

InputFunctionConfig
half-round-conv.cac5873d.3881cb25.f7f5a6033c.ll (mutant of half-round-conv.cac5873d.3881cb25.ll)test_trunc_ui8-mtriple=riscv32 -verify-machineinstrs -target-abi=ilp32f -mattr=+zfh,+zbb,+f,+zicsr -O3

Generated 2026-11-29 14:49 UTC.