gimple_assign_set_rhs1 (stmt, rhs1);
gimple_assign_set_rhs_code (stmt, SSA_NAME);
}
+ else if (m_names == NULL
+ || !bitmap_bit_p (m_names, SSA_NAME_VERSION (rhs1)))
+ {
+ gimple *g = SSA_NAME_DEF_STMT (rhs1);
+ gcc_assert (gimple_assign_load_p (g));
+ tree mem = gimple_assign_rhs1 (g);
+ tree ltype = TREE_TYPE (lhs);
+ addr_space_t as = TYPE_ADDR_SPACE (TREE_TYPE (mem));
+ if (as != TYPE_ADDR_SPACE (ltype))
+ ltype
+ = build_qualified_type (ltype,
+ TYPE_QUALS (ltype)
+ | ENCODE_QUAL_ADDR_SPACE (as));
+ rhs1 = build1 (VIEW_CONVERT_EXPR, ltype, mem);
+ gimple_assign_set_rhs1 (stmt, rhs1);
+ }
else
{
int part = var_to_partition (m_map, rhs1);
--- /dev/null
+/* PR middle-end/114156 */
+/* { dg-do compile { target bitint } } */
+/* { dg-options "-O2" } */
+/* { dg-additional-options "-msse2" { target i?86-*-* x86_64-*-* } } */
+
+#if __BITINT_MAXWIDTH__ >= 128
+_BitInt(128) a, b;
+#else
+int a, b;
+#endif
+
+void
+foo (void)
+{
+ int u = b;
+ __builtin_memmove (&a, &b, sizeof (a));
+}