+2017-10-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/82703
+ * config/i386/i386-protos.h (maybe_get_pool_constant): Removed.
+ * config/i386/i386.c (maybe_get_pool_constant): Removed.
+ (ix86_split_to_parts): Use avoid_constant_pool_reference instead of
+ maybe_get_pool_constant.
+ * config/i386/predicates.md (zero_extended_scalar_load_operand):
+ Likewise.
+
2017-10-27 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* doc/install.texi (Specific, i?86-*-solaris2.10): Simplify gas
extern int i386_pe_reloc_rw_mask (void);
-extern rtx maybe_get_pool_constant (rtx);
-
extern char internal_label_prefix[16];
extern int internal_label_prefix_len;
emit_insn (tmp);
}
-/* X is an unchanging MEM. If it is a constant pool reference, return
- the constant pool rtx, else NULL. */
-
-rtx
-maybe_get_pool_constant (rtx x)
-{
- x = ix86_delegitimize_address (XEXP (x, 0));
-
- if (GET_CODE (x) == SYMBOL_REF && CONSTANT_POOL_ADDRESS_P (x))
- return get_pool_constant (x);
-
- return NULL_RTX;
-}
-
void
ix86_expand_move (machine_mode mode, rtx operands[])
{
/* Optimize constant pool reference to immediates. This is used by fp
moves, that force all constants to memory to allow combining. */
if (MEM_P (operand) && MEM_READONLY_P (operand))
- {
- rtx tmp = maybe_get_pool_constant (operand);
- if (tmp)
- operand = tmp;
- }
+ operand = avoid_constant_pool_reference (operand);
if (MEM_P (operand) && !offsettable_memref_p (operand))
{
(match_code "mem")
{
unsigned n_elts;
- op = maybe_get_pool_constant (op);
+ op = avoid_constant_pool_reference (op);
- if (!(op && GET_CODE (op) == CONST_VECTOR))
+ if (GET_CODE (op) != CONST_VECTOR)
return false;
n_elts = CONST_VECTOR_NUNITS (op);
+2017-10-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/82703
+ * gcc.dg/pr82703.c: New test.
+
2017-10-27 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
* gcc.dg/ipa/propmalloc-1.c: New test-case.
--- /dev/null
+/* PR target/82703 */
+/* { dg-do run } */
+/* { dg-options "-O2 -fno-tree-sra -ftree-vectorize" } */
+
+__attribute__((noinline, noclone)) void
+compare (const double *p, const double *q)
+{
+ for (int i = 0; i < 3; ++i)
+ if (p[i] != q[i])
+ __builtin_abort ();
+}
+
+double vr[3] = { 4, 4, 4 };
+
+int
+main ()
+{
+ double v1[3] = { 1, 2, 3 };
+ double v2[3] = { 3, 2, 1 };
+ double v3[3];
+ __builtin_memcpy (v3, v1, sizeof (v1));
+ for (int i = 0; i < 3; ++i)
+ v3[i] += v2[i];
+ for (int i = 0; i < 3; ++i)
+ v1[i] += v2[i];
+ compare (v3, vr);
+ return 0;
+}