Commit efc3a1a1 by Richard Biener Committed by Richard Biener

re PR tree-optimization/86927 (Gcc miscompiles at -O3 on valid code)

2018-08-27  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/86927
	* tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
	use const cond reduction code.

	* gcc.dg/vect/pr86927.c: New testcase.

From-SVN: r263888
parent de5b5228
2018-08-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/86927
* tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
use const cond reduction code.
2018-08-27 Alexander Monakov <amonakov@ispras.ru>
PR tree-optimization/85758
......
2018-08-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/86927
* gcc.dg/vect/pr86927.c: New testcase.
2018-08-27 David Malcolm <dmalcolm@redhat.com>
PR 87091
......
#include "tree-vect.h"
int a[28];
int main()
{
check_vect ();
a[4] = 1;
int c = 1;
for (int b = 0; b < 8; b++)
if (a[b])
c = 0;
if (c)
abort();
return 0;
}
......@@ -5197,6 +5197,9 @@ vect_create_epilog_for_reduction (vec<tree> vect_defs,
if (STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info)
== INTEGER_INDUC_COND_REDUCTION)
code = induc_code;
else if (STMT_VINFO_VEC_REDUCTION_TYPE (stmt_info)
== CONST_COND_REDUCTION)
code = STMT_VINFO_VEC_CONST_COND_REDUC_CODE (stmt_info);
else
code = MAX_EXPR;
}
......
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