+2016-09-05 Uros Bizjak <ubizjak@gmail.com>
+
+ PR rtl-optimization/77452
+ * explow.c (plus_constant) <case MEM>: Extract scalar constant from
+ inner-mode reference to a CONST_VECTOR constant in the constant pool.
+
2016-09-05 Marek Polacek <polacek@redhat.com>
PR c/77423
if (GET_CODE (XEXP (x, 0)) == SYMBOL_REF
&& CONSTANT_POOL_ADDRESS_P (XEXP (x, 0)))
{
- tem = plus_constant (mode, get_pool_constant (XEXP (x, 0)), c);
+ rtx cst = get_pool_constant (XEXP (x, 0));
+
+ if (GET_CODE (cst) == CONST_VECTOR
+ && GET_MODE_INNER (GET_MODE (cst)) == mode)
+ {
+ cst = gen_lowpart (mode, cst);
+ gcc_assert (cst);
+ }
+ tem = plus_constant (mode, cst, c);
tem = force_const_mem (GET_MODE (x), tem);
/* Targets may disallow some constants in the constant pool, thus
force_const_mem may return NULL_RTX. */
+2016-09-05 Uros Bizjak <ubizjak@gmail.com>
+
+ PR rtl-optimization/77452
+ * gcc.target/i386/pr77452.c: New test.
+
2016-09-05 Marek Polacek <polacek@redhat.com>
PR c/77423
--- /dev/null
+/* { dg-do compile { target int128 } } */
+/* { dg-options "-O -mavx512f -fno-split-wide-types --param max-combine-insns=2" } */
+
+typedef unsigned int U __attribute__((vector_size(64)));
+typedef unsigned __int128 V __attribute__((vector_size(64)));
+
+V
+foo(V v)
+{
+ v[0] = 1u << (( ((V)(U){1, 1, v[0]})[0]) & 0xf)
+ >> ((-~((V)(U){1, 1, v[0]})[0]) & 0xf);
+ return v;
+}