From: Richard Biener Date: Mon, 27 Feb 2017 08:50:09 +0000 (+0000) Subject: re PR tree-optimization/79690 (IVOPTs drops gs: prefix) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=69a2e8a10b5e80bb696269f7d6365a3efd16c18d;p=gcc.git re PR tree-optimization/79690 (IVOPTs drops gs: prefix) 2017-02-27 Richard Biener PR tree-optimization/79690 * tree-vect-stmts.c (vectorizable_store): Use vector type built from the DR with address-space. * gcc.target/i386/pr79690.c: New testcase. From-SVN: r245751 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1dc82c185e7..faf3d66f029 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-02-27 Richard Biener + + PR tree-optimization/79690 + * tree-vect-stmts.c (vectorizable_store): Use vector type + built from the DR with address-space. + 2017-02-26 Gerald Pfeifer * doc/invoke.texi (Optimize Options): Refine the description diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 30198a6bfe3..3cd68eace95 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-02-27 Richard Biener + + PR tree-optimization/79690 + * gcc.target/i386/pr79690.c: New testcase. + 2017-02-26 Thomas Koenig PR fortran/51119 diff --git a/gcc/testsuite/gcc.target/i386/pr79690.c b/gcc/testsuite/gcc.target/i386/pr79690.c new file mode 100644 index 00000000000..7bd93178fc9 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr79690.c @@ -0,0 +1,10 @@ +/* { dg-do compile } */ +/* { dg-options "-O3 -msse2 -mno-avx" } */ + +void fill(unsigned char __seg_gs *arr, unsigned char c, long n) +{ + for (long i = 0; i < n; ++i) + arr[i] = c; +} + +/* { dg-final { scan-assembler "mov\[au\]p.\[ \t\]\[^,\]+, %gs:" } } */ diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c index 59768824c0f..f4b777eeae6 100644 --- a/gcc/tree-vect-stmts.c +++ b/gcc/tree-vect-stmts.c @@ -6324,7 +6324,7 @@ vectorizable_store (gimple *stmt, gimple_stmt_iterator *gsi, gimple **vec_stmt, vect_permute_store_chain(). */ vec_oprnd = result_chain[i]; - data_ref = fold_build2 (MEM_REF, TREE_TYPE (vec_oprnd), + data_ref = fold_build2 (MEM_REF, vectype, dataref_ptr, dataref_offset ? dataref_offset