--- /dev/null
+/* { dg-do compile { target { aarch64*-*-* } } } */
+/* { dg-options "-march=armv8-a+sve -w -Ofast" } */
+
+typedef struct {
+ int red
+} MagickPixelPacket;
+
+GetImageChannelMoments_image, GetImageChannelMoments_image_0,
+ GetImageChannelMoments___trans_tmp_1, GetImageChannelMoments_M11_0,
+ GetImageChannelMoments_pixel_3, GetImageChannelMoments_y,
+ GetImageChannelMoments_p;
+
+double GetImageChannelMoments_M00_0, GetImageChannelMoments_M00_1,
+ GetImageChannelMoments_M01_1;
+
+MagickPixelPacket GetImageChannelMoments_pixel;
+
+SetMagickPixelPacket(int color, MagickPixelPacket *pixel) {
+ pixel->red = color;
+}
+
+GetImageChannelMoments() {
+ for (; GetImageChannelMoments_y; GetImageChannelMoments_y++) {
+ SetMagickPixelPacket(GetImageChannelMoments_p,
+ &GetImageChannelMoments_pixel);
+ GetImageChannelMoments_M00_1 += GetImageChannelMoments_pixel.red;
+ if (GetImageChannelMoments_image)
+ GetImageChannelMoments_M00_1++;
+ GetImageChannelMoments_M01_1 +=
+ GetImageChannelMoments_y * GetImageChannelMoments_pixel_3;
+ if (GetImageChannelMoments_image_0)
+ GetImageChannelMoments_M00_0++;
+ GetImageChannelMoments_M01_1 +=
+ GetImageChannelMoments_y * GetImageChannelMoments_p++;
+ }
+ GetImageChannelMoments___trans_tmp_1 = atan(GetImageChannelMoments_M11_0);
+}
/* Get NCOPIES vector definitions for all operands except the reduction
definition. */
- vect_get_vec_defs (loop_vinfo, stmt_info, slp_node, ncopies,
- single_defuse_cycle && reduc_index == 0
- ? NULL_TREE : op.ops[0], &vec_oprnds0,
- single_defuse_cycle && reduc_index == 1
- ? NULL_TREE : op.ops[1], &vec_oprnds1,
- op.num_ops == 4
- || (op.num_ops == 3
- && !(single_defuse_cycle && reduc_index == 2))
- ? op.ops[2] : NULL_TREE, &vec_oprnds2);
+ if (!cond_fn_p)
+ {
+ vect_get_vec_defs (loop_vinfo, stmt_info, slp_node, ncopies,
+ single_defuse_cycle && reduc_index == 0
+ ? NULL_TREE : op.ops[0], &vec_oprnds0,
+ single_defuse_cycle && reduc_index == 1
+ ? NULL_TREE : op.ops[1], &vec_oprnds1,
+ op.num_ops == 3
+ && !(single_defuse_cycle && reduc_index == 2)
+ ? op.ops[2] : NULL_TREE, &vec_oprnds2);
+ }
+ else
+ {
+ /* For a conditional operation pass the truth type as mask
+ vectype. */
+ gcc_assert (single_defuse_cycle && reduc_index == 1);
+ vect_get_vec_defs (loop_vinfo, stmt_info, slp_node, ncopies,
+ op.ops[0], &vec_oprnds0,
+ truth_type_for (vectype_in),
+ NULL_TREE, &vec_oprnds1, NULL_TREE,
+ op.ops[2], &vec_oprnds2, NULL_TREE);
+ }
/* For single def-use cycles get one copy of the vectorized reduction
definition. */