@@ -656,6 +656,11 @@ internal_get_tmp_var (tree val, gimple_seq *pre_p, gimple_seq *post_p,
gimplify_and_add (mod, pre_p);
ggc_free (mod);
+ /* If we failed to gimplify VAL then we can end up with the temporary
+ SSA name not having a definition. In this case return a decl. */
+ if (TREE_CODE (t) == SSA_NAME && ! SSA_NAME_DEF_STMT (t))
+ return lookup_tmp_var (val, is_formal, not_gimple_reg);
+
return t;
}
new file mode 100644
@@ -0,0 +1,14 @@
+/* { dg-do compile { target lp64 } } */
+/* { dg-options "-mgeneral-regs-only" } */
+
+typedef __attribute__((__vector_size__(8))) __bf16 V;
+typedef __attribute__((__vector_size__(16))) __bf16 W;
+
+V v;
+_Atomic V a;
+
+W
+foo(void) /* { dg-error "SSE" } */
+{
+ return __builtin_shufflevector(v, a, 1, 2, 5, 0, 1, 6, 6, 4); /* { dg-error "invalid" } */
+}