Commit 8f482165 by Alan Hayward Committed by Alan Hayward

re PR tree-optimization/71439 (wrong code at -O3 in 32-bit and 64-bit mode on x86_64-linux-gnu)

2016-06-15  Alan Hayward  <alan.hayward@arm.com>

gcc/
	PR tree-optimization/71439
	* tree-vect-loop.c (vect_analyze_loop_operations): Additional check for
	live PHIs.

testsuite/
	PR tree-optimization/71439
	* gcc.dg/vect/pr71439.c: New

From-SVN: r237476
parent 3256673f
2016-06-15 Alan Hayward <alan.hayward@arm.com>
PR tree-optimization/71439
* tree-vect-loop.c (vect_analyze_loop_operations): Additional check for
live PHIs.
2016-06-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* ifcvt.c (bb_ok_for_noce_multiple_sets): Allow simple lowpart
......
2016-06-15 Alan Hayward <alan.hayward@arm.com>
PR tree-optimization/71439
* gcc.dg/vect/pr71439.c: New
2016-06-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* gcc.target/aarch64/ifcvt_multiple_sets_subreg_1.c: New test.
......
#include "tree-vect.h"
int a, b, c;
short fn1(int p1, int p2) { return p1 + p2; }
int main() {
a = 0;
for (; a < 30; a = fn1(a, 4)) {
c = b;
b = 6;
}
if (c != 6)
abort ();
return 0;
}
......@@ -1669,7 +1669,8 @@ vect_analyze_loop_operations (loop_vec_info loop_vinfo)
gcc_assert (stmt_info);
if (STMT_VINFO_RELEVANT (stmt_info) == vect_used_in_scope
if ((STMT_VINFO_RELEVANT (stmt_info) == vect_used_in_scope
|| STMT_VINFO_LIVE_P (stmt_info))
&& STMT_VINFO_DEF_TYPE (stmt_info) != vect_induction_def)
{
/* A scalar-dependence cycle that we don't support. */
......@@ -1686,6 +1687,9 @@ vect_analyze_loop_operations (loop_vec_info loop_vinfo)
ok = vectorizable_induction (phi, NULL, NULL);
}
if (ok && STMT_VINFO_LIVE_P (stmt_info))
ok = vectorizable_live_operation (phi, NULL, NULL, -1, NULL);
if (!ok)
{
if (dump_enabled_p ())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment