aarch64_addr_query_type = ADDR_QUERY_M);
machine_mode aarch64_select_cc_mode (RTX_CODE, rtx, rtx);
rtx aarch64_gen_compare_reg (RTX_CODE, rtx, rtx);
+bool aarch64_maxmin_plus_const (rtx_code, rtx *, bool);
rtx aarch64_load_tp (rtx);
void aarch64_expand_compare_and_swap (rtx op[]);
return aarch64_gen_compare_reg (code, x, y);
}
+/* Consider the operation:
+
+ OPERANDS[0] = CODE (OPERANDS[1], OPERANDS[2]) + OPERANDS[3]
+
+ where:
+
+ - CODE is [SU]MAX or [SU]MIN
+ - OPERANDS[2] and OPERANDS[3] are constant integers
+ - OPERANDS[3] is a positive or negative shifted 12-bit immediate
+ - all operands have mode MODE
+
+ Decide whether it is possible to implement the operation using:
+
+ SUBS <tmp>, OPERANDS[1], -OPERANDS[3]
+ or
+ ADDS <tmp>, OPERANDS[1], OPERANDS[3]
+
+ followed by:
+
+ <insn> OPERANDS[0], <tmp>, [wx]zr, <cond>
+
+ where <insn> is one of CSEL, CSINV or CSINC. Return true if so.
+ If GENERATE_P is true, also update OPERANDS as follows:
+
+ OPERANDS[4] = -OPERANDS[3]
+ OPERANDS[5] = the rtl condition representing <cond>
+ OPERANDS[6] = <tmp>
+ OPERANDS[7] = 0 for CSEL, -1 for CSINV or 1 for CSINC. */
+bool
+aarch64_maxmin_plus_const (rtx_code code, rtx *operands, bool generate_p)
+{
+ signop sgn = (code == UMAX || code == UMIN ? UNSIGNED : SIGNED);
+ rtx dst = operands[0];
+ rtx maxmin_op = operands[2];
+ rtx add_op = operands[3];
+ machine_mode mode = GET_MODE (dst);
+
+ /* max (x, y) - z == (x >= y + 1 ? x : y) - z
+ == (x >= y ? x : y) - z
+ == (x > y ? x : y) - z
+ == (x > y - 1 ? x : y) - z
+
+ min (x, y) - z == (x <= y - 1 ? x : y) - z
+ == (x <= y ? x : y) - z
+ == (x < y ? x : y) - z
+ == (x < y + 1 ? x : y) - z
+
+ Check whether z is in { y - 1, y, y + 1 } and pick the form(s) for
+ which x is compared with z. Set DIFF to y - z. Thus the supported
+ combinations are as follows, with DIFF being the value after the ":":
+
+ max (x, y) - z == x >= y + 1 ? x - (y + 1) : -1 [z == y + 1]
+ == x >= y ? x - y : 0 [z == y]
+ == x > y ? x - y : 0 [z == y]
+ == x > y - 1 ? x - (y - 1) : 1 [z == y - 1]
+
+ min (x, y) - z == x <= y - 1 ? x - (y - 1) : 1 [z == y - 1]
+ == x <= y ? x - y : 0 [z == y]
+ == x < y ? x - y : 0 [z == y]
+ == x < y + 1 ? x - (y + 1) : -1 [z == y + 1]. */
+ auto maxmin_val = rtx_mode_t (maxmin_op, mode);
+ auto add_val = rtx_mode_t (add_op, mode);
+ auto sub_val = wi::neg (add_val);
+ auto diff = wi::sub (maxmin_val, sub_val);
+ if (!(diff == 0
+ || (diff == 1 && wi::gt_p (maxmin_val, sub_val, sgn))
+ || (diff == -1 && wi::lt_p (maxmin_val, sub_val, sgn))))
+ return false;
+
+ if (!generate_p)
+ return true;
+
+ rtx_code cmp;
+ switch (code)
+ {
+ case SMAX:
+ cmp = diff == 1 ? GT : GE;
+ break;
+ case UMAX:
+ cmp = diff == 1 ? GTU : GEU;
+ break;
+ case SMIN:
+ cmp = diff == -1 ? LT : LE;
+ break;
+ case UMIN:
+ cmp = diff == -1 ? LTU : LEU;
+ break;
+ default:
+ gcc_unreachable ();
+ }
+ rtx cc = gen_rtx_REG (CCmode, CC_REGNUM);
+
+ operands[4] = immed_wide_int_const (sub_val, mode);
+ operands[5] = gen_rtx_fmt_ee (cmp, VOIDmode, cc, const0_rtx);
+ if (can_create_pseudo_p ())
+ operands[6] = gen_reg_rtx (mode);
+ else
+ operands[6] = dst;
+ operands[7] = immed_wide_int_const (diff, mode);
+
+ return true;
+}
+
+
/* Build the SYMBOL_REF for __tls_get_addr. */
static GTY(()) rtx tls_get_addr_libfunc;
}
)
+;; Implement MAX/MIN (A, B) - C using SUBS/ADDS followed by CSEL/CSINV/CSINC.
+;; See aarch64_maxmin_plus_const for details about the supported cases.
+(define_insn_and_split "*aarch64_minmax_plus"
+ [(set (match_operand:GPI 0 "register_operand" "=r")
+ (plus:GPI
+ (MAXMIN:GPI
+ (match_operand:GPI 1 "register_operand" "r")
+ (match_operand:GPI 2 "const_int_operand"))
+ (match_operand:GPI 3 "aarch64_plus_immediate")))
+ (clobber (reg:CC CC_REGNUM))]
+ "aarch64_maxmin_plus_const (<CODE>, operands, false)"
+ "#"
+ "&& 1"
+ [(parallel
+ [(set (reg:CC CC_REGNUM)
+ (compare:CC (match_dup 1) (match_dup 4)))
+ (set (match_dup 6)
+ (plus:GPI (match_dup 1) (match_dup 3)))])
+ (set (match_dup 0)
+ (if_then_else:GPI (match_dup 5) (match_dup 6) (match_dup 7)))]
+ {
+ if (!aarch64_maxmin_plus_const (<CODE>, operands, true))
+ gcc_unreachable ();
+ }
+ [(set_attr "length" "8")]
+)
+
;; -------------------------------------------------------------------
;; Logical operations
;; -------------------------------------------------------------------
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 --save-temps" } */
+/* { dg-final { check-function-bodies "**" "" "" } } */
+
+/*
+** f1:
+** adds (w[0-9]+), w0, #4
+** csel w0, \1, wzr, g[te]
+** ret
+*/
+/*
+** f2:
+** adds (w[0-9]+), w0, #4
+** csel w0, \1, wzr, g[te]
+** ret
+*/
+/*
+** f3:
+** adds (w[0-9]+), w0, #5
+** csinc w0, \1, wzr, gt
+** ret
+*/
+/*
+** f4:
+** adds (w[0-9]+), w0, #3
+** csinv w0, \1, wzr, ge
+** ret
+*/
+
+#ifndef TYPE
+#define TYPE int32_t
+#define TYPE_MIN INT32_MIN
+#define TYPE_MAX INT32_MAX
+#define VALUE -4
+#endif
+
+#include <stdint.h>
+
+TYPE __attribute__((noipa))
+f1 (TYPE x)
+{
+ return (x > VALUE ? x - VALUE : 0);
+}
+
+TYPE __attribute__((noipa))
+f2 (TYPE x)
+{
+ return (x > VALUE ? x : VALUE) - VALUE;
+}
+
+TYPE __attribute__((noipa))
+f3 (TYPE x)
+{
+ return (x > VALUE ? x : VALUE) - (VALUE - 1);
+}
+
+TYPE __attribute__((noipa))
+f4 (TYPE x)
+{
+ return (x > VALUE ? x : VALUE) - (VALUE + 1);
+}
+
+TYPE __attribute__((noipa))
+f5 (TYPE x)
+{
+ return (x > VALUE ? x : VALUE) - (VALUE + 2);
+}
+
+TYPE __attribute__((noipa))
+f6 (TYPE x)
+{
+ return (x > VALUE ? x : VALUE) - (VALUE - 2);
+}
+
+int
+main (void)
+{
+ TYPE max_test = TYPE_MAX;
+ if (TYPE_MIN < 0 && VALUE < 0)
+ max_test += VALUE;
+
+ if (f1 (TYPE_MIN) != 0)
+ __builtin_abort ();
+ if (f1 (VALUE - 1) != 0)
+ __builtin_abort ();
+ if (f1 (VALUE) != 0)
+ __builtin_abort ();
+ if (f1 (VALUE + 1) != 1)
+ __builtin_abort ();
+ if (f1 (max_test) != max_test - VALUE)
+ __builtin_abort ();
+
+ if (f2 (TYPE_MIN) != 0)
+ __builtin_abort ();
+ if (f2 (VALUE - 1) != 0)
+ __builtin_abort ();
+ if (f2 (VALUE) != 0)
+ __builtin_abort ();
+ if (f2 (VALUE + 1) != 1)
+ __builtin_abort ();
+ if (f2 (max_test) != max_test - VALUE)
+ __builtin_abort ();
+
+ if (f3 (TYPE_MIN) != 1)
+ __builtin_abort ();
+ if (f3 (VALUE - 1) != 1)
+ __builtin_abort ();
+ if (f3 (VALUE) != 1)
+ __builtin_abort ();
+ if (f3 (VALUE + 1) != 2)
+ __builtin_abort ();
+ if (f3 (max_test - 1) != max_test - VALUE)
+ __builtin_abort ();
+
+ if (f4 (TYPE_MIN) != -1)
+ __builtin_abort ();
+ if (f4 (VALUE - 1) != -1)
+ __builtin_abort ();
+ if (f4 (VALUE) != -1)
+ __builtin_abort ();
+ if (f4 (VALUE + 1) != 0)
+ __builtin_abort ();
+ if (f4 (max_test) != max_test - VALUE - 1)
+ __builtin_abort ();
+
+ if (f5 (TYPE_MIN) != -2)
+ __builtin_abort ();
+ if (f5 (VALUE - 1) != -2)
+ __builtin_abort ();
+ if (f5 (VALUE) != -2)
+ __builtin_abort ();
+ if (f5 (VALUE + 1) != -1)
+ __builtin_abort ();
+ if (f5 (max_test) != max_test - VALUE - 2)
+ __builtin_abort ();
+
+ if (f6 (TYPE_MIN) != 2)
+ __builtin_abort ();
+ if (f6 (VALUE - 1) != 2)
+ __builtin_abort ();
+ if (f6 (VALUE) != 2)
+ __builtin_abort ();
+ if (f6 (VALUE + 1) != 3)
+ __builtin_abort ();
+ if (VALUE <= max_test - 2 && f6 (max_test - 2) != max_test - VALUE)
+ __builtin_abort ();
+
+ return 0;
+}
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 --save-temps" } */
+/* { dg-final { check-function-bodies "**" "" "" } } */
+
+/*
+** f1:
+** adds (x[0-9]+), x0, #4094
+** csel x0, \1, xzr, g[te]
+** ret
+*/
+/*
+** f2:
+** adds (x[0-9]+), x0, #4094
+** csel x0, \1, xzr, g[te]
+** ret
+*/
+/*
+** f3:
+** adds (x[0-9]+), x0, #4095
+** csinc x0, \1, xzr, gt
+** ret
+*/
+/*
+** f4:
+** adds (x[0-9]+), x0, #4093
+** csinv x0, \1, xzr, ge
+** ret
+*/
+
+#define TYPE int64_t
+#define TYPE_MIN INT64_MIN
+#define TYPE_MAX INT64_MAX
+#define VALUE -4094
+
+#include "max_plus_1.c"
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 --save-temps" } */
+/* { dg-final { check-function-bodies "**" "" "" } } */
+
+/*
+** f1:
+** adds (w[0-9]+), w0, #4095
+** csel w0, \1, wzr, g[te]
+** ret
+*/
+/*
+** f2:
+** adds (w[0-9]+), w0, #4095
+** csel w0, \1, wzr, g[te]
+** ret
+*/
+/*
+** f3:
+** adds (w[0-9]+), w0, #4096
+** csinc w0, \1, wzr, gt
+** ret
+*/
+/*
+** f4:
+** adds (w[0-9]+), w0, #4094
+** csinv w0, \1, wzr, ge
+** ret
+*/
+
+#define TYPE int32_t
+#define TYPE_MIN INT32_MIN
+#define TYPE_MAX INT32_MAX
+#define VALUE -4095
+
+#include "max_plus_1.c"
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 --save-temps" } */
+/* { dg-final { check-function-bodies "**" "" "" } } */
+
+/*
+** f1:
+** adds (x[0-9]+), x0, #4096
+** csel x0, \1, xzr, g[te]
+** ret
+*/
+/*
+** f2:
+** adds (x[0-9]+), x0, #4096
+** csel x0, \1, xzr, g[te]
+** ret
+*/
+/* f3 out of range */
+/*
+** f4:
+** adds (x[0-9]+), x0, #4095
+** csinv x0, \1, xzr, ge
+** ret
+*/
+
+#define TYPE int64_t
+#define TYPE_MIN INT64_MIN
+#define TYPE_MAX INT64_MAX
+#define VALUE -4096
+
+#include "max_plus_1.c"
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 --save-temps" } */
+/* { dg-final { check-function-bodies "**" "" "" } } */
+
+/*
+** f1:
+** adds (w[0-9]+), w0, #4095
+** csel w0, \1, wzr, (cs|hi)
+** ret
+*/
+/*
+** f2:
+** adds (w[0-9]+), w0, #4095
+** csel w0, \1, wzr, (cs|hi)
+** ret
+*/
+/*
+** f3:
+** adds (w[0-9]+), w0, #4096
+** csinc w0, \1, wzr, hi
+** ret
+*/
+/*
+** f4:
+** adds (w[0-9]+), w0, #4094
+** csinv w0, \1, wzr, cs
+** ret
+*/
+
+#define TYPE uint32_t
+#define TYPE_MIN 0
+#define TYPE_MAX UINT32_MAX
+#define VALUE (uint32_t)-4095
+
+#include "max_plus_1.c"
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 --save-temps" } */
+
+#define TYPE uint64_t
+#define TYPE_MIN 0
+#define TYPE_MAX UINT64_MAX
+#define VALUE (uint64_t)-2
+
+#include "max_plus_1.c"
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 --save-temps" } */
+/* { dg-final { check-function-bodies "**" "" "" } } */
+
+/*
+** f1:
+** adds (x[0-9]+), x0, #3
+** csel x0, \1, xzr, (cs|hi)
+** ret
+*/
+/*
+** f2:
+** adds (x[0-9]+), x0, #3
+** csel x0, \1, xzr, (cs|hi)
+** ret
+*/
+/*
+** f3:
+** adds (x[0-9]+), x0, #4
+** csinc x0, \1, xzr, hi
+** ret
+*/
+/*
+** f4:
+** adds (x[0-9]+), x0, #2
+** csinv x0, \1, xzr, cs
+** ret
+*/
+
+#define TYPE uint64_t
+#define TYPE_MIN 0
+#define TYPE_MAX UINT64_MAX
+#define VALUE (uint64_t)-3
+
+#include "max_plus_1.c"
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 --save-temps" } */
+/* { dg-final { check-function-bodies "**" "" "" } } */
+
+/*
+** f1:
+** subs (w[0-9]+), w0, #?4
+** csel w0, \1, wzr, l[te]
+** ret
+*/
+/*
+** f2:
+** subs (w[0-9]+), w0, #?4
+** csel w0, \1, wzr, l[te]
+** ret
+*/
+/*
+** f3:
+** subs (w[0-9]+), w0, #?3
+** csinc w0, \1, wzr, le
+** ret
+*/
+/*
+** f4:
+** subs (w[0-9]+), w0, #?5
+** csinv w0, \1, wzr, lt
+** ret
+*/
+
+#ifndef TYPE
+#define TYPE int32_t
+#define TYPE_MIN INT32_MIN
+#define TYPE_MAX INT32_MAX
+#define VALUE 4
+#endif
+
+#include <stdint.h>
+
+TYPE __attribute__((noipa))
+f1 (TYPE x)
+{
+ return (x < VALUE ? x - VALUE : 0);
+}
+
+TYPE __attribute__((noipa))
+f2 (TYPE x)
+{
+ return (x < VALUE ? x : VALUE) - VALUE;
+}
+
+TYPE __attribute__((noipa))
+f3 (TYPE x)
+{
+ return (x < VALUE ? x : VALUE) - (VALUE - 1);
+}
+
+TYPE __attribute__((noipa))
+f4 (TYPE x)
+{
+ return (x < VALUE ? x : VALUE) - (VALUE + 1);
+}
+
+TYPE __attribute__((noipa))
+f5 (TYPE x)
+{
+ return (x < VALUE ? x : VALUE) - (VALUE + 2);
+}
+
+TYPE __attribute__((noipa))
+f6 (TYPE x)
+{
+ return (x < VALUE ? x : VALUE) - (VALUE - 2);
+}
+
+int
+main (void)
+{
+ TYPE min_test = TYPE_MIN;
+ if (TYPE_MIN < 0 && VALUE > 0)
+ min_test += VALUE;
+
+ if (f1 (min_test) != min_test - VALUE)
+ __builtin_abort ();
+ if (f1 (VALUE - 1) != -1)
+ __builtin_abort ();
+ if (f1 (VALUE) != 0)
+ __builtin_abort ();
+ if (f1 (VALUE + 1) != 0)
+ __builtin_abort ();
+ if (f1 (TYPE_MAX) != 0)
+ __builtin_abort ();
+
+ if (f2 (min_test) != min_test - VALUE)
+ __builtin_abort ();
+ if (f2 (VALUE - 1) != -1)
+ __builtin_abort ();
+ if (f2 (VALUE) != 0)
+ __builtin_abort ();
+ if (f2 (VALUE + 1) != 0)
+ __builtin_abort ();
+ if (f2 (TYPE_MAX) != 0)
+ __builtin_abort ();
+
+ if (f3 (min_test) != min_test - VALUE + 1)
+ __builtin_abort ();
+ if (f3 (VALUE - 1) != 0)
+ __builtin_abort ();
+ if (f3 (VALUE) != 1)
+ __builtin_abort ();
+ if (f3 (VALUE + 1) != 1)
+ __builtin_abort ();
+ if (f3 (TYPE_MAX) != 1)
+ __builtin_abort ();
+
+ if (f4 (min_test + 1) != min_test - VALUE)
+ __builtin_abort ();
+ if (f4 (VALUE - 1) != -2)
+ __builtin_abort ();
+ if (f4 (VALUE) != -1)
+ __builtin_abort ();
+ if (f4 (VALUE + 1) != -1)
+ __builtin_abort ();
+ if (f4 (TYPE_MAX) != -1)
+ __builtin_abort ();
+
+ if (VALUE >= min_test + 2 && f5 (min_test + 2) != min_test - VALUE)
+ __builtin_abort ();
+ if (f5 (VALUE - 1) != -3)
+ __builtin_abort ();
+ if (f5 (VALUE) != -2)
+ __builtin_abort ();
+ if (f5 (VALUE + 1) != -2)
+ __builtin_abort ();
+ if (f5 (TYPE_MAX) != -2)
+ __builtin_abort ();
+
+ if (f6 (min_test) != min_test - VALUE + 2)
+ __builtin_abort ();
+ if (f6 (VALUE - 1) != 1)
+ __builtin_abort ();
+ if (f6 (VALUE) != 2)
+ __builtin_abort ();
+ if (f6 (VALUE + 1) != 2)
+ __builtin_abort ();
+ if (f6 (TYPE_MAX) != 2)
+ __builtin_abort ();
+
+ return 0;
+}
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 --save-temps" } */
+/* { dg-final { check-function-bodies "**" "" "" } } */
+
+/*
+** f1:
+** subs (x[0-9]+), x0, #?4094
+** csel x0, \1, xzr, l[te]
+** ret
+*/
+/*
+** f2:
+** subs (x[0-9]+), x0, #?4094
+** csel x0, \1, xzr, l[te]
+** ret
+*/
+/*
+** f3:
+** subs (x[0-9]+), x0, #?4093
+** csinc x0, \1, xzr, le
+** ret
+*/
+/*
+** f4:
+** subs (x[0-9]+), x0, #?4095
+** csinv x0, \1, xzr, lt
+** ret
+*/
+
+#define TYPE int64_t
+#define TYPE_MIN INT64_MIN
+#define TYPE_MAX INT64_MAX
+#define VALUE 4094
+
+#include "min_plus_1.c"
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 --save-temps" } */
+/* { dg-final { check-function-bodies "**" "" "" } } */
+
+/*
+** f1:
+** subs (w[0-9]+), w0, #?4095
+** csel w0, \1, wzr, l[te]
+** ret
+*/
+/*
+** f2:
+** subs (w[0-9]+), w0, #?4095
+** csel w0, \1, wzr, l[te]
+** ret
+*/
+/*
+** f3:
+** subs (w[0-9]+), w0, #?4094
+** csinc w0, \1, wzr, le
+** ret
+*/
+/*
+** f4:
+** subs (w[0-9]+), w0, #?4096
+** csinv w0, \1, wzr, lt
+** ret
+*/
+
+#define TYPE int32_t
+#define TYPE_MIN INT32_MIN
+#define TYPE_MAX INT32_MAX
+#define VALUE 4095
+
+#include "min_plus_1.c"
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 --save-temps" } */
+/* { dg-final { check-function-bodies "**" "" "" } } */
+
+/*
+** f1:
+** subs (x[0-9]+), x0, #?4096
+** csel x0, \1, xzr, l[te]
+** ret
+*/
+/*
+** f2:
+** subs (x[0-9]+), x0, #?4096
+** csel x0, \1, xzr, l[te]
+** ret
+*/
+/*
+** f3:
+** subs (x[0-9]+), x0, #?4095
+** csinc x0, \1, xzr, le
+** ret
+*/
+/* f4 out of range */
+
+#define TYPE int64_t
+#define TYPE_MIN INT64_MIN
+#define TYPE_MAX INT64_MAX
+#define VALUE 4096
+
+#include "min_plus_1.c"
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 --save-temps" } */
+/* { dg-final { check-function-bodies "**" "" "" } } */
+
+/*
+** f1:
+** subs (w[0-9]+), w0, #?4095
+** csel w0, \1, wzr, (cc|ls)
+** ret
+*/
+/*
+** f2:
+** subs (w[0-9]+), w0, #?4095
+** csel w0, \1, wzr, (cc|ls)
+** ret
+*/
+/*
+** f3:
+** subs (w[0-9]+), w0, #?4094
+** csinc w0, \1, wzr, ls
+** ret
+*/
+/*
+** f4:
+** subs (w[0-9]+), w0, #?4096
+** csinv w0, \1, wzr, cc
+** ret
+*/
+
+#define TYPE uint32_t
+#define TYPE_MIN 0
+#define TYPE_MAX UINT32_MAX
+#define VALUE 4095
+
+#include "min_plus_1.c"
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 --save-temps" } */
+
+#define TYPE uint64_t
+#define TYPE_MIN 0
+#define TYPE_MAX UINT64_MAX
+#define VALUE 1
+
+#include "min_plus_1.c"
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 --save-temps" } */
+/* { dg-final { check-function-bodies "**" "" "" } } */
+
+/*
+** f1:
+** subs (x[0-9]+), x0, #?2
+** csel x0, \1, xzr, (cc|ls)
+** ret
+*/
+/*
+** f2:
+** subs (x[0-9]+), x0, #?2
+** csel x0, \1, xzr, (cc|ls)
+** ret
+*/
+/*
+** f3:
+** subs (x[0-9]+), x0, #?1
+** csinc x0, \1, xzr, ls
+** ret
+*/
+/*
+** f4:
+** subs (x[0-9]+), x0, #?3
+** csinv x0, \1, xzr, cc
+** ret
+*/
+
+#define TYPE uint64_t
+#define TYPE_MIN 0
+#define TYPE_MAX UINT64_MAX
+#define VALUE 2
+
+#include "min_plus_1.c"