+2017-02-28 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/79723
+ * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Preserve
+ address-space properly.
+
2017-02-28 Thomas Schwinge <thomas@codesourcery.com>
* doc/optinfo.texi (Optimization groups): Fix option used for
+2017-02-28 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/79723
+ * gcc.target/i386/pr79723.c: New testcase.
+
2017-02-27 Pat Haugen <pthaugen@us.ibm.com>
PR target/79544
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O3 -msse2 -mno-avx" } */
+
+void memset_pattern_seg_gs(unsigned char * __seg_gs *s, long n)
+{
+ for (long i = 0; i < n; ++i)
+ s[i] = 0;
+}
+
+/* { dg-final { scan-assembler "mov\[au\]p.\[ \t\]\[^,\]+, %gs:" } } */
static tree
get_vectype_for_scalar_type_and_size (tree scalar_type, unsigned size)
{
+ tree orig_scalar_type = scalar_type;
machine_mode inner_mode = TYPE_MODE (scalar_type);
machine_mode simd_mode;
unsigned int nbytes = GET_MODE_SIZE (inner_mode);
&& !INTEGRAL_MODE_P (TYPE_MODE (vectype)))
return NULL_TREE;
+ /* Re-attach the address-space qualifier if we canonicalized the scalar
+ type. */
+ if (TYPE_ADDR_SPACE (orig_scalar_type) != TYPE_ADDR_SPACE (vectype))
+ return build_qualified_type
+ (vectype, KEEP_QUAL_ADDR_SPACE (TYPE_QUALS (orig_scalar_type)));
+
return vectype;
}