new file mode 100644
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#define vector __attribute__((vector_size(16)))
+
+vector float combine (float a, float b, float c, float d)
+{
+ return (vector float) { a, b, c, d };
+}
A large part of the aarch64.c hunk of your patch deals with finding the most commonly-occuring
element in the vector of variables, yet in your testcase all variables appear exactly once.
Perhaps worth adding a testcase where one of the vector elements appears more than the others?
I'd guess the codegen then would be better with this patch?