;; gimple_fold'd to the IFN_REDUC_(MAX|MIN) function. (This is FP smax/smin).
(define_expand "reduc_<optab>_scal_<mode>"
[(match_operand:<VEL> 0 "register_operand")
- (unspec:VHSDF [(match_operand:VHSDF 1 "register_operand")]
- FMAXMINV)]
+ (unspec:<VEL> [(match_operand:VHSDF 1 "register_operand")]
+ FMAXMINV)]
"TARGET_SIMD"
{
rtx elt = aarch64_endian_lane_rtx (<MODE>mode, 0);
}
)
+(define_expand "reduc_<fmaxmin>_scal_<mode>"
+ [(match_operand:<VEL> 0 "register_operand")
+ (unspec:<VEL> [(match_operand:VHSDF 1 "register_operand")]
+ FMAXMINNMV)]
+ "TARGET_SIMD"
+ {
+ emit_insn (gen_reduc_<optab>_scal_<mode> (operands[0], operands[1]));
+ DONE;
+ }
+)
+
;; Likewise for integer cases, signed and unsigned.
(define_expand "reduc_<optab>_scal_<mode>"
[(match_operand:<VEL> 0 "register_operand")
}
)
+(define_expand "reduc_<fmaxmin>_scal_<mode>"
+ [(match_operand:<VEL> 0 "register_operand")
+ (unspec:<VEL> [(match_operand:SVE_FULL_F 1 "register_operand")]
+ FMAXMINNMV)]
+ "TARGET_SVE"
+ {
+ emit_insn (gen_reduc_<optab>_scal_<mode> (operands[0], operands[1]));
+ DONE;
+ }
+)
+
;; Predicated floating-point tree reductions.
(define_insn "@aarch64_pred_reduc_<optab>_<mode>"
[(set (match_operand:<VEL> 0 "register_operand" "=w")
(define_int_iterator FMAXMINV [UNSPEC_FMAXV UNSPEC_FMINV
UNSPEC_FMAXNMV UNSPEC_FMINNMV])
+(define_int_iterator FMAXMINNMV [UNSPEC_FMAXNMV UNSPEC_FMINNMV])
+
(define_int_iterator SVE_INT_ADDV [UNSPEC_SADDV UNSPEC_UADDV])
(define_int_iterator USADDLP [UNSPEC_SADDLP UNSPEC_UADDLP])
(define_int_attr fmaxmin [(UNSPEC_FMAX "fmax_nan")
(UNSPEC_FMAXNM "fmax")
+ (UNSPEC_FMAXNMV "fmax")
(UNSPEC_FMIN "fmin_nan")
(UNSPEC_FMINNM "fmin")
+ (UNSPEC_FMINNMV "fmin")
(UNSPEC_COND_FMAXNM "fmax")
(UNSPEC_COND_FMINNM "fmin")])
operand 1, and operand 0 is the scalar result, with mode equal to the mode of
the elements of the input vector.
+@cindex @code{reduc_fmin_scal_@var{m}} instruction pattern
+@cindex @code{reduc_fmax_scal_@var{m}} instruction pattern
+@item @samp{reduc_fmin_scal_@var{m}}, @samp{reduc_fmax_scal_@var{m}}
+Find the floating-point minimum/maximum of the elements of a vector,
+using the same rules as @code{fmin@var{m}3} and @code{fmax@var{m}3}.
+Operand 1 is a vector of mode @var{m} and operand 0 is the scalar
+result, which has mode @code{GET_MODE_INNER (@var{m})}.
+
@cindex @code{reduc_plus_scal_@var{m}} instruction pattern
@item @samp{reduc_plus_scal_@var{m}}
Compute the sum of the elements of a vector. The vector is operand 1, and
reduc_smax_scal, reduc_umax_scal, unary)
DEF_INTERNAL_SIGNED_OPTAB_FN (REDUC_MIN, ECF_CONST | ECF_NOTHROW, first,
reduc_smin_scal, reduc_umin_scal, unary)
+DEF_INTERNAL_OPTAB_FN (REDUC_FMAX, ECF_CONST | ECF_NOTHROW,
+ reduc_fmax_scal, unary)
+DEF_INTERNAL_OPTAB_FN (REDUC_FMIN, ECF_CONST | ECF_NOTHROW,
+ reduc_fmin_scal, unary)
DEF_INTERNAL_OPTAB_FN (REDUC_AND, ECF_CONST | ECF_NOTHROW,
reduc_and_scal, unary)
DEF_INTERNAL_OPTAB_FN (REDUC_IOR, ECF_CONST | ECF_NOTHROW,
OPTAB_D (fmin_optab, "fmin$a3")
/* Vector reduction to a scalar. */
+OPTAB_D (reduc_fmax_scal_optab, "reduc_fmax_scal_$a")
+OPTAB_D (reduc_fmin_scal_optab, "reduc_fmin_scal_$a")
OPTAB_D (reduc_smax_scal_optab, "reduc_smax_scal_$a")
OPTAB_D (reduc_smin_scal_optab, "reduc_smin_scal_$a")
OPTAB_D (reduc_plus_scal_optab, "reduc_plus_scal_$a")
--- /dev/null
+#include "tree-vect.h"
+
+#ifndef TYPE
+#define TYPE float
+#define FN __builtin_fmaxf
+#endif
+
+TYPE __attribute__((noipa))
+test (TYPE x, TYPE *ptr, int n)
+{
+ for (int i = 0; i < n; ++i)
+ x = FN (x, ptr[i]);
+ return x;
+}
+
+#define N 128
+#define HALF (N / 2)
+
+int
+main (void)
+{
+ check_vect ();
+
+ TYPE a[N];
+
+ for (int i = 0; i < N; ++i)
+ a[i] = i;
+
+ if (test (-1, a, 1) != 0)
+ __builtin_abort ();
+ if (test (-1, a, 64) != 63)
+ __builtin_abort ();
+ if (test (-1, a, 65) != 64)
+ __builtin_abort ();
+ if (test (-1, a, 66) != 65)
+ __builtin_abort ();
+ if (test (-1, a, 67) != 66)
+ __builtin_abort ();
+ if (test (-1, a, 128) != 127)
+ __builtin_abort ();
+ if (test (127, a, 128) != 127)
+ __builtin_abort ();
+ if (test (128, a, 128) != 128)
+ __builtin_abort ();
+
+ for (int i = 0; i < N; ++i)
+ a[i] = -i;
+
+ if (test (-60, a, 4) != 0)
+ __builtin_abort ();
+ if (test (0, a, 4) != 0)
+ __builtin_abort ();
+ if (test (1, a, 4) != 1)
+ __builtin_abort ();
+
+ for (int i = 0; i < HALF; ++i)
+ {
+ a[i] = i;
+ a[HALF + i] = HALF - i;
+ }
+
+ if (test (0, a, HALF - 16) != HALF - 17)
+ __builtin_abort ();
+ if (test (0, a, HALF - 2) != HALF - 3)
+ __builtin_abort ();
+ if (test (0, a, HALF - 1) != HALF - 2)
+ __builtin_abort ();
+ if (test (0, a, HALF) != HALF - 1)
+ __builtin_abort ();
+ if (test (0, a, HALF + 1) != HALF)
+ __builtin_abort ();
+ if (test (0, a, HALF + 2) != HALF)
+ __builtin_abort ();
+ if (test (0, a, HALF + 3) != HALF)
+ __builtin_abort ();
+ if (test (0, a, HALF + 16) != HALF)
+ __builtin_abort ();
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "Detected reduction" "vect" } } */
+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target vect_max_reduc } } } */
--- /dev/null
+#define TYPE double
+#define FN __builtin_fmax
+
+#include "vect-fmax-1.c"
+
+/* { dg-final { scan-tree-dump "Detected reduction" "vect" } } */
+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target vect_max_reduc } } } */
--- /dev/null
+#include "tree-vect.h"
+
+void __attribute__((noipa))
+test (double x0, double x1, double *restrict res, double *restrict ptr, int n)
+{
+ for (int i = 0; i < n; i += 2)
+ {
+ x0 = __builtin_fmax (x0, ptr[i + 0]);
+ x1 = __builtin_fmax (x1, ptr[i + 1]);
+ }
+ res[0] = x0;
+ res[1] = x1;
+}
+
+#define N 128
+#define HALF (N / 2)
+
+int
+main (void)
+{
+ check_vect ();
+
+ double res[2], a[N];
+
+ for (int i = 0; i < N; i += 2)
+ {
+ a[i] = i < HALF ? i : HALF;
+ a[i + 1] = i / 8;
+ }
+
+ test (-1, -1, res, a, 2);
+ if (res[0] != 0 || res[1] != 0)
+ __builtin_abort ();
+
+ test (-1, -1, res, a, 6);
+ if (res[0] != 4 || res[1] != 0)
+ __builtin_abort ();
+
+ test (-1, -1, res, a, 8);
+ if (res[0] != 6 || res[1] != 0)
+ __builtin_abort ();
+
+ test (-1, -1, res, a, 10);
+ if (res[0] != 8 || res[1] != 1)
+ __builtin_abort ();
+
+ test (-1, -1, res, a, HALF - 2);
+ if (res[0] != HALF - 4 || res[1] != HALF / 8 - 1)
+ __builtin_abort ();
+
+ test (-1, -1, res, a, HALF);
+ if (res[0] != HALF - 2 || res[1] != HALF / 8 - 1)
+ __builtin_abort ();
+
+ test (-1, -1, res, a, HALF + 2);
+ if (res[0] != HALF || res[1] != HALF / 8)
+ __builtin_abort ();
+
+ test (-1, -1, res, a, HALF + 8);
+ if (res[0] != HALF || res[1] != HALF / 8)
+ __builtin_abort ();
+
+ test (-1, -1, res, a, HALF + 10);
+ if (res[0] != HALF || res[1] != HALF / 8 + 1)
+ __builtin_abort ();
+
+ test (-1, -1, res, a, N);
+ if (res[0] != HALF || res[1] != N / 8 - 1)
+ __builtin_abort ();
+
+ test (HALF + 1, -1, res, a, N);
+ if (res[0] != HALF + 1 || res[1] != N / 8 - 1)
+ __builtin_abort ();
+
+ test (HALF + 1, N, res, a, N);
+ if (res[0] != HALF + 1 || res[1] != N)
+ __builtin_abort ();
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "Detected reduction" "vect" } } */
+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target vect_max_reduc } } } */
--- /dev/null
+#include "tree-vect.h"
+
+#ifndef TYPE
+#define TYPE float
+#define FN __builtin_fminf
+#endif
+
+TYPE __attribute__((noipa))
+test (TYPE x, TYPE *ptr, int n)
+{
+ for (int i = 0; i < n; ++i)
+ x = FN (x, ptr[i]);
+ return x;
+}
+
+#define N 128
+#define HALF (N / 2)
+
+int
+main (void)
+{
+ check_vect ();
+
+ TYPE a[N];
+
+ for (int i = 0; i < N; ++i)
+ a[i] = -i;
+
+ if (test (1, a, 1) != 0)
+ __builtin_abort ();
+ if (test (1, a, 64) != -63)
+ __builtin_abort ();
+ if (test (1, a, 65) != -64)
+ __builtin_abort ();
+ if (test (1, a, 66) != -65)
+ __builtin_abort ();
+ if (test (1, a, 67) != -66)
+ __builtin_abort ();
+ if (test (1, a, 128) != -127)
+ __builtin_abort ();
+ if (test (-127, a, 128) != -127)
+ __builtin_abort ();
+ if (test (-128, a, 128) != -128)
+ __builtin_abort ();
+
+ for (int i = 0; i < N; ++i)
+ a[i] = i;
+
+ if (test (1, a, 4) != 0)
+ __builtin_abort ();
+ if (test (0, a, 4) != 0)
+ __builtin_abort ();
+ if (test (-1, a, 4) != -1)
+ __builtin_abort ();
+
+ for (int i = 0; i < HALF; ++i)
+ {
+ a[i] = HALF - i;
+ a[HALF + i] = i;
+ }
+
+ if (test (N, a, HALF - 16) != 17)
+ __builtin_abort ();
+ if (test (N, a, HALF - 2) != 3)
+ __builtin_abort ();
+ if (test (N, a, HALF - 1) != 2)
+ __builtin_abort ();
+ if (test (N, a, HALF) != 1)
+ __builtin_abort ();
+ if (test (N, a, HALF + 1) != 0)
+ __builtin_abort ();
+ if (test (N, a, HALF + 2) != 0)
+ __builtin_abort ();
+ if (test (N, a, HALF + 3) != 0)
+ __builtin_abort ();
+ if (test (N, a, HALF + 16) != 0)
+ __builtin_abort ();
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "Detected reduction" "vect" } } */
+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target vect_max_reduc } } } */
+
+/* { dg-final { scan-tree-dump "Detected reduction" "vect" } } */
+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target vect_max_reduc } } } */
--- /dev/null
+#ifndef TYPE
+#define TYPE double
+#define FN __builtin_fmin
+#endif
+
+#include "vect-fmin-1.c"
+
+/* { dg-final { scan-tree-dump "Detected reduction" "vect" } } */
+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target vect_max_reduc } } } */
--- /dev/null
+#include "tree-vect.h"
+
+void __attribute__((noipa))
+test (double x0, double x1, double *restrict res, double *restrict ptr, int n)
+{
+ for (int i = 0; i < n; i += 2)
+ {
+ x0 = __builtin_fmin (x0, ptr[i + 0]);
+ x1 = __builtin_fmin (x1, ptr[i + 1]);
+ }
+ res[0] = x0;
+ res[1] = x1;
+}
+
+#define N 128
+#define HALF (N / 2)
+
+int
+main (void)
+{
+ check_vect ();
+
+ double res[2], a[N];
+
+ for (int i = 0; i < N; i += 2)
+ {
+ a[i] = i < HALF ? HALF - i : 0;
+ a[i + 1] = -i / 8;
+ }
+
+ test (N, N, res, a, 2);
+ if (res[0] != HALF || res[1] != 0)
+ __builtin_abort ();
+
+ test (N, N, res, a, 6);
+ if (res[0] != HALF - 4 || res[1] != 0)
+ __builtin_abort ();
+
+ test (N, N, res, a, 8);
+ if (res[0] != HALF - 6 || res[1] != 0)
+ __builtin_abort ();
+
+ test (N, N, res, a, 10);
+ if (res[0] != HALF - 8 || res[1] != -1)
+ __builtin_abort ();
+
+ test (N, N, res, a, HALF - 2);
+ if (res[0] != 4 || res[1] != -HALF / 8 + 1)
+ __builtin_abort ();
+
+ test (N, N, res, a, HALF);
+ if (res[0] != 2 || res[1] != -HALF / 8 + 1)
+ __builtin_abort ();
+
+ test (N, N, res, a, HALF + 2);
+ if (res[0] != 0 || res[1] != -HALF / 8)
+ __builtin_abort ();
+
+ test (N, N, res, a, HALF + 8);
+ if (res[0] != 0 || res[1] != -HALF / 8)
+ __builtin_abort ();
+
+ test (N, N, res, a, HALF + 10);
+ if (res[0] != 0 || res[1] != -HALF / 8 - 1)
+ __builtin_abort ();
+
+ test (N, N, res, a, N);
+ if (res[0] != 0 || res[1] != -N / 8 + 1)
+ __builtin_abort ();
+
+ test (-1, N, res, a, N);
+ if (res[0] != -1 || res[1] != -N / 8 + 1)
+ __builtin_abort ();
+
+ test (-1, -N / 8, res, a, N);
+ if (res[0] != -1 || res[1] != -N / 8)
+ __builtin_abort ();
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "Detected reduction" "vect" } } */
+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target vect_max_reduc } } } */
--- /dev/null
+/* { dg-options "-O2 -ftree-vectorize -fno-vect-cost-model" } */
+
+#pragma GCC target "+nosve"
+
+float
+f1 (float x, float *ptr)
+{
+ for (int i = 0; i < 128; ++i)
+ x = __builtin_fmaxf (x, ptr[i]);
+ return x;
+}
+
+double
+f2 (double x, double *ptr)
+{
+ for (int i = 0; i < 128; ++i)
+ x = __builtin_fmax (x, ptr[i]);
+ return x;
+}
+
+/* { dg-final { scan-assembler-times {\tfmaxnm\tv[0-9]+\.4s, v[0-9]+\.4s, v[0-9]+\.4s\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmaxnmv\ts[0-9]+, v[0-9]+\.4s\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmaxnm\tv[0-9]+\.2d, v[0-9]+\.2d, v[0-9]+\.2d\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfmaxnmp\td[0-9]+, v[0-9]+\.2d\n} 1 } } */
--- /dev/null
+/* { dg-options "-O2 -ftree-vectorize -fno-vect-cost-model" } */
+
+#pragma GCC target "+nosve"
+
+void
+f (double *restrict res, double *restrict ptr)
+{
+ double x0 = res[0];
+ double x1 = res[1];
+ for (int i = 0; i < 128; i += 2)
+ {
+ x0 = __builtin_fmax (x0, ptr[i + 0]);
+ x1 = __builtin_fmax (x1, ptr[i + 1]);
+ }
+ res[0] = x0;
+ res[1] = x1;
+}
+
+/* { dg-final { scan-assembler-times {\tfmaxnm\tv[0-9]+\.2d, v[0-9]+\.2d, v[0-9]+\.2d\n} 1 } } */
+/* { dg-final { scan-assembler {\tstr\tq[0-9]+, \[x0\]\n} } } */
--- /dev/null
+/* { dg-options "-O2 -ftree-vectorize -fno-vect-cost-model" } */
+
+#pragma GCC target "+nosve"
+
+float
+f1 (float x, float *ptr)
+{
+ for (int i = 0; i < 128; ++i)
+ x = __builtin_fminf (x, ptr[i]);
+ return x;
+}
+
+double
+f2 (double x, double *ptr)
+{
+ for (int i = 0; i < 128; ++i)
+ x = __builtin_fmin (x, ptr[i]);
+ return x;
+}
+
+/* { dg-final { scan-assembler-times {\tfminnm\tv[0-9]+\.4s, v[0-9]+\.4s, v[0-9]+\.4s\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfminnmv\ts[0-9]+, v[0-9]+\.4s\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfminnm\tv[0-9]+\.2d, v[0-9]+\.2d, v[0-9]+\.2d\n} 1 } } */
+/* { dg-final { scan-assembler-times {\tfminnmp\td[0-9]+, v[0-9]+\.2d\n} 1 } } */
--- /dev/null
+/* { dg-options "-O2 -ftree-vectorize -fno-vect-cost-model" } */
+
+#pragma GCC target "+nosve"
+
+void
+f (double *restrict res, double *restrict ptr)
+{
+ double x0 = res[0];
+ double x1 = res[1];
+ for (int i = 0; i < 128; i += 2)
+ {
+ x0 = __builtin_fmin (x0, ptr[i + 0]);
+ x1 = __builtin_fmin (x1, ptr[i + 1]);
+ }
+ res[0] = x0;
+ res[1] = x1;
+}
+
+/* { dg-final { scan-assembler-times {\tfminnm\tv[0-9]+\.2d, v[0-9]+\.2d, v[0-9]+\.2d\n} 1 } } */
+/* { dg-final { scan-assembler {\tstr\tq[0-9]+, \[x0\]\n} } } */
--- /dev/null
+/* { dg-options "-O2 -ftree-vectorize -fno-vect-cost-model" } */
+
+float
+f1 (float x, float *ptr)
+{
+ for (int i = 0; i < 128; ++i)
+ x = __builtin_fmaxf (x, ptr[i]);
+ return x;
+}
+
+double
+f2 (double x, double *ptr)
+{
+ for (int i = 0; i < 128; ++i)
+ x = __builtin_fmax (x, ptr[i]);
+ return x;
+}
+
+/* { dg-final { scan-assembler {\twhilelo\t(p[0-7])\.s,.*\tfmaxnm\tz[0-9]+\.s, \1/m, z[0-9]+\.s, z[0-9]+\.s\n} } } */
+/* { dg-final { scan-assembler-times {\tfmaxnmv\ts[0-9]+, p[0-7], z[0-9]+\.s\n} 1 } } */
+/* { dg-final { scan-assembler {\twhilelo\t(p[0-7])\.d,.*\tfmaxnm\tz[0-9]+\.d, \1/m, z[0-9]+\.d, z[0-9]+\.d\n} } } */
+/* { dg-final { scan-assembler-times {\tfmaxnmv\td[0-9]+, p[0-7], z[0-9]+\.d\n} 1 } } */
--- /dev/null
+/* { dg-options "-O2 -ftree-vectorize -fno-vect-cost-model" } */
+
+void
+f (double *restrict res, double *restrict ptr)
+{
+ double x0 = res[0];
+ double x1 = res[1];
+ for (int i = 0; i < 128; i += 2)
+ {
+ x0 = __builtin_fmax (x0, ptr[i + 0]);
+ x1 = __builtin_fmax (x1, ptr[i + 1]);
+ }
+ res[0] = x0;
+ res[1] = x1;
+}
+
+/* { dg-final { scan-assembler {\twhilelo\t(p[0-7])\.d,.*\tfmaxnm\tz[0-9]+\.d, \1/m, z[0-9]+\.d, z[0-9]+\.d\n} } } */
+/* { dg-final { scan-assembler-times {\tfmaxnmv\td[0-9]+, p[0-7], z[0-9]+\.d\n} 2 } } */
--- /dev/null
+/* { dg-options "-O2 -ftree-vectorize -fno-vect-cost-model" } */
+
+float
+f1 (float x, float *ptr)
+{
+ for (int i = 0; i < 128; ++i)
+ x = __builtin_fminf (x, ptr[i]);
+ return x;
+}
+
+double
+f2 (double x, double *ptr)
+{
+ for (int i = 0; i < 128; ++i)
+ x = __builtin_fmin (x, ptr[i]);
+ return x;
+}
+
+/* { dg-final { scan-assembler {\twhilelo\t(p[0-7])\.s,.*\tfminnm\tz[0-9]+\.s, \1/m, z[0-9]+\.s, z[0-9]+\.s\n} } } */
+/* { dg-final { scan-assembler-times {\tfminnmv\ts[0-9]+, p[0-7], z[0-9]+\.s\n} 1 } } */
+/* { dg-final { scan-assembler {\twhilelo\t(p[0-7])\.d,.*\tfminnm\tz[0-9]+\.d, \1/m, z[0-9]+\.d, z[0-9]+\.d\n} } } */
+/* { dg-final { scan-assembler-times {\tfminnmv\td[0-9]+, p[0-7], z[0-9]+\.d\n} 1 } } */
--- /dev/null
+/* { dg-options "-O2 -ftree-vectorize -fno-vect-cost-model" } */
+
+void
+f (double *restrict res, double *restrict ptr)
+{
+ double x0 = res[0];
+ double x1 = res[1];
+ for (int i = 0; i < 128; i += 2)
+ {
+ x0 = __builtin_fmin (x0, ptr[i + 0]);
+ x1 = __builtin_fmin (x1, ptr[i + 1]);
+ }
+ res[0] = x0;
+ res[1] = x1;
+}
+
+/* { dg-final { scan-assembler {\twhilelo\t(p[0-7])\.d,.*\tfminnm\tz[0-9]+\.d, \1/m, z[0-9]+\.d, z[0-9]+\.d\n} } } */
+/* { dg-final { scan-assembler-times {\tfminnmv\td[0-9]+, p[0-7], z[0-9]+\.d\n} 2 } } */
return true;
default:
- break;
- }
- return false;
+ return false;
+ }
+ else
+ switch (combined_fn (code))
+ {
+ CASE_CFN_FMAX:
+ *reduc_fn = IFN_REDUC_FMAX;
+ return true;
+
+ CASE_CFN_FMIN:
+ *reduc_fn = IFN_REDUC_FMIN;
+ return true;
+
+ default:
+ return false;
+ }
}
/* If there is a neutral value X such that a reduction would not be affected
return initial_value;
default:
- break;
+ return NULL_TREE;
+ }
+ else
+ switch (combined_fn (code))
+ {
+ CASE_CFN_FMIN:
+ CASE_CFN_FMAX:
+ return initial_value;
+
+ default:
+ return NULL_TREE;
}
- return NULL_TREE;
}
/* Error reporting helper for vect_is_simple_reduction below. GIMPLE statement
return false;
default:
- break;
+ return !flag_associative_math;
+ }
+ else
+ switch (combined_fn (code))
+ {
+ CASE_CFN_FMIN:
+ CASE_CFN_FMAX:
+ return false;
+
+ default:
+ return !flag_associative_math;
}
- return !flag_associative_math;
}
if (INTEGRAL_TYPE_P (type))