+2019-10-21 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/92161
+ * tree-vect-loop.c (vect_analyze_loop_2): Reset stmts def-type
+ for reductions.
+
2019-10-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* config/aarch64/aarch64.md (UNSPEC_RNDR, UNSPEC_RNDRRS): Define.
+2019-10-21 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/92161
+ * gfortran.dg/pr92161.f: New testcase.
+
2019-10-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* gcc.target/aarch64/acle/rng_1.c: New test.
--- /dev/null
+! { dg-do compile }
+! { dg-options "-O1 -ftree-loop-vectorize -fno-signed-zeros -fno-trapping-math" }
+! { dg-additional-options "-mvsx" { target { powerpc*-*-* } } }
+ COMPLEX FUNCTION R1 (ZR, CC, EA, U6)
+
+ INTEGER ZR, U6, FZ, J2
+ COMPLEX EA(*), CC
+ DOUBLE PRECISION OS, GA, YU, XT
+
+ OS = DBLE(REAL(CC))
+ GA = DBLE(AIMAG(CC))
+ J2 = 1
+
+ DO 5 FZ = 1, ZR
+ YU = DBLE(REAL(EA(J2)))
+ XT = DBLE(AIMAG(EA(J2)))
+ OS = OS + (YU * 2) - (XT * 2)
+ GA = GA + (YU * 3) + (XT * 3)
+ J2 = J2 + U6
+ 5 CONTINUE
+ R1 = CMPLX(REAL(OS), REAL(GA))
+ RETURN
+ END
{
stmt_vec_info stmt_info = loop_vinfo->lookup_stmt (gsi_stmt (si));
STMT_SLP_TYPE (stmt_info) = loop_vect;
+ if (STMT_VINFO_DEF_TYPE (stmt_info) == vect_reduction_def
+ || STMT_VINFO_DEF_TYPE (stmt_info) == vect_double_reduction_def)
+ {
+ /* vectorizable_reduction adjusts reduction stmt def-types,
+ restore them to that of the PHI. */
+ STMT_VINFO_DEF_TYPE (STMT_VINFO_REDUC_DEF (stmt_info))
+ = STMT_VINFO_DEF_TYPE (stmt_info);
+ STMT_VINFO_DEF_TYPE (vect_stmt_to_vectorize
+ (STMT_VINFO_REDUC_DEF (stmt_info)))
+ = STMT_VINFO_DEF_TYPE (stmt_info);
+ }
}
for (gimple_stmt_iterator si = gsi_start_bb (bb);
!gsi_end_p (si); gsi_next (&si))