Skip to content

Commit 62f81a9

Browse files
authored
[llvm] Add extra tests for atomicrmw fmaximum/fminimum (#138252)
Add extra tests for `atomicrmw fmaximum/fminimum`, that I missed in my original PR #137701, and also `fmaximum`/`fminimum` should be defined in the ocaml bindings.
1 parent e55172f commit 62f81a9

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

llvm/bindings/ocaml/llvm/llvm.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,8 @@ module AtomicRMWBinOp = struct
302302
| UDec_Wrap
303303
| USub_Cond
304304
| USub_Sat
305+
| FMaximum
306+
| FMinimum
305307
end
306308

307309
module ValueKind = struct

llvm/bindings/ocaml/llvm/llvm.mli

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,8 @@ module AtomicRMWBinOp : sig
337337
| UDec_Wrap
338338
| USub_Cond
339339
| USub_Sat
340+
| FMaximum
341+
| FMinimum
340342
end
341343

342344
(** The kind of an [llvalue], the result of [classify_value v].

llvm/test/Bindings/llvm-c/atomics.ll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ define void @atomic_rmw_ops(ptr %p, i32 %i, float %f) {
5454
%a.fsub = atomicrmw fsub ptr %p, float %f acq_rel, align 8
5555
%a.fmax = atomicrmw fmax ptr %p, float %f acq_rel, align 8
5656
%a.fmin = atomicrmw fmin ptr %p, float %f acq_rel, align 8
57+
%a.fmaximum = atomicrmw fmaximum ptr %p, float %f acq_rel, align 8
58+
%a.fminimum = atomicrmw fminimum ptr %p, float %f acq_rel, align 8
5759

5860
%a.uinc_wrap = atomicrmw uinc_wrap ptr %p, i32 %i acq_rel, align 8
5961
%a.udec_wrap = atomicrmw udec_wrap ptr %p, i32 %i acq_rel, align 8

0 commit comments

Comments
 (0)