miscompile: miscompile rv64: addi,and,andi,fadd.h,fcvt.lu.h,fcvt.wu.h

Run:explore-db12fc36f6-20261127-115111
Kind:miscompile
Category:miscompile rv64: addi,and,andi,fadd.h,fcvt.lu.h,fcvt.wu.h NEW M
Occurrences:1 in 1 configs, 1 test files
Snippet from:half-round-conv.40491e27.fa0dfd5b.23abe253.b476fd6f.2c384fff.4b45625eeb.ll (mutant of half-round-conv.40491e27.fa0dfd5b.23abe253.b476fd6f.2c384fff.ll) @test_round_ui8 via llvm-extract
Config:-mtriple=riscv64 -verify-machineinstrs -target-abi=lp64f -mattr=+zfh,+zfa,+zbs -O0
Local check:reproduces at db12fc36f6
Compiler Explorer:not applicable: Compiler Explorer compiles RISC-V but cannot run it

Snippet:

@G = external global i1
@G.6 = external global i1
@G.7 = external global float
@G.8 = external global i1
@G.9 = external global half
@G.10 = external global i128
@G.11 = external global half

define zeroext i8 @test_round_ui8(half %x) {
  %A6 = alloca i1, align 1
  store i1 poison, ptr %A6, align 1
  %A = alloca half, align 2
  %L = load float, ptr %A, align 4
  %B4 = fadd half %x, 4.200000e+01
  store half poison, ptr %A, align 2
  %LGV3 = load half, ptr @G.9, align 2
  %LGV = load float, ptr @G.7, align 4
  %C = fcmp oge half %x, %x
  %B1 = fmul half %x, %x
  %C2 = fcmp uno float %LGV, %L
  %B = udiv i128 18446744073709551616, 1
  %a = call half @llvm.round.f16(half %x)
  br label %BB

BB:                                               ; preds = %0
  %C9 = fcmp true half %B4, %x
  %b = fptoui half %a to i8
  %C4 = fcmp uno half %x, %LGV3
  store i1 %C, ptr @G, align 1
  store i1 %C2, ptr @G, align 1
  store i1 %C4, ptr @G.8, align 1
  %C8 = fcmp uge half %x, %x
  store i128 %B, ptr @G.10, align 4
  store half %B1, ptr %A, align 2
  store half %B4, ptr @G.11, align 2
  store i1 %C8, ptr %A6, align 1
  store i1 %C9, ptr @G.6, align 1
  ret i8 %b
}

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

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

Reproduce:

./exec_oracle.py --flags '-mtriple=riscv64 -verify-machineinstrs -target-abi=lp64f -mattr=+zfh,+zfa,+zbs -O0' --funcs test_round_ui8 snippet.ll

Local execution result:

9 of 64 inputs differ (first: #12)
SelectionDAG hash 5bef58d3690d6076, GlobalISel hash 5289e0e02a921a1b
b0: llc -mtriple=riscv64 -verify-machineinstrs -target-abi=lp64f -mattr=+zfh,+zfa,+zbs -O0 -global-isel=0
b1: llc -mtriple=riscv64 -verify-machineinstrs -target-abi=lp64f -mattr=+zfh,+zfa,+zbs -O2 -global-isel=0
b2: llc -mtriple=riscv64 -verify-machineinstrs -target-abi=lp64f -mattr=+zfh,+zfa,+zbs -O0 -global-isel -global-isel-abort=2

Occurrences (1):

InputFunctionConfig
half-round-conv.40491e27.fa0dfd5b.23abe253.b476fd6f.2c384fff.4b45625eeb.ll (mutant of half-round-conv.40491e27.fa0dfd5b.23abe253.b476fd6f.2c384fff.ll)test_round_ui8-mtriple=riscv64 -verify-machineinstrs -target-abi=lp64f -mattr=+zfh,+zfa,+zbs -O0

Generated 2026-11-29 14:49 UTC.