Commit c079cbac by Richard Biener Committed by Richard Biener

re PR tree-optimization/66636 (ICE in vect_get_vec_def_for_stmt_copy, at tree-vect-stmts.c:1590)

2015-06-23  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/66636
	* tree-vect-stmts.c (vectorizable_store): Properly compute the
	def type for further defs for strided stores.

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

From-SVN: r224841
parent 224b491b
2015-06-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/66636
* tree-vect-stmts.c (vectorizable_store): Properly compute the
def type for further defs for strided stores.
2015-06-23 Nathan Sidwell <nathan@codesourcery.com>
* config/nvptx/nvptx.md (sel_true<mode>, sel_false<mode>): New
......
2015-06-23 Richard Biener <rguenther@suse.de>
PR tree-optimization/66636
* gcc.dg/vect/pr66636.c: New testcase.
2015-06-23 Marek Polacek <polacek@redhat.com>
* gcc.dg/fold-minus-4.c: New test.
......
/* { dg-additional-options "-mavx2" { target avx_runtime } } */
#include "tree-vect.h"
extern void abort (void);
struct X { double x; double y; };
void foo (struct X *x, double px, int s)
{
int i;
for (i = 0; i < 256; ++i)
{
x[i*s].x = px;
x[i*s].y = i + px;
}
}
int main()
{
struct X x[512];
int i;
check_vect ();
foo (x, 1., 2);
if (x[0].x != 1. || x[0].y != 1.
|| x[510].x != 1. || x[510].y != 256.)
abort ();
return 0;
}
......@@ -5365,8 +5365,12 @@ vectorizable_store (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
if (slp)
vec_oprnd = vec_oprnds[j];
else
{
vect_is_simple_use (vec_oprnd, NULL, loop_vinfo,
bb_vinfo, &def_stmt, &def, &dt);
vec_oprnd = vect_get_vec_def_for_stmt_copy (dt, vec_oprnd);
}
}
for (i = 0; i < nstores; i++)
{
......
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