+2018-04-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/85195
+ * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
+ CONSTRUCTOR_ELT (ctor, ...)->value.
+
2018-04-05 Uros Bizjak <ubizjak@gmail.com>
PR target/85193
{ build_constructor (type, NULL); }
(if (count == 1)
(if (elt < CONSTRUCTOR_NELTS (ctor))
- { CONSTRUCTOR_ELT (ctor, elt)->value; }
+ (view_convert { CONSTRUCTOR_ELT (ctor, elt)->value; })
{ build_zero_cst (type); })
{
vec<constructor_elt, va_gc> *vals;
(if (CONSTRUCTOR_NELTS (ctor) <= idx / const_k)
{ build_zero_cst (type); })
(if (n == const_k)
- { CONSTRUCTOR_ELT (ctor, idx / const_k)->value; })
+ (view_convert { CONSTRUCTOR_ELT (ctor, idx / const_k)->value; }))
(BIT_FIELD_REF { CONSTRUCTOR_ELT (ctor, idx / const_k)->value; }
@1 { bitsize_int ((idx % const_k) * width); })))))))))
--- /dev/null
+/* PR middle-end/85195 */
+/* { dg-do compile { target int128 } } */
+/* { dg-options "-Wno-psabi -O -fno-tree-ccp --param=sccvn-max-scc-size=10" } */
+
+typedef __int128 V __attribute__ ((vector_size (16)));
+
+extern int bar (V);
+
+V v;
+int i;
+
+V
+foo (void)
+{
+ do
+ v *= bar (v & i);
+ while ((V){}[0]);
+ return v;
+}