summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.target/i386
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.target/i386')
-rw-r--r--gcc/testsuite/g++.target/i386/mv31.C11
-rw-r--r--gcc/testsuite/g++.target/i386/vec-tmpl1.C17
2 files changed, 28 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.target/i386/mv31.C b/gcc/testsuite/g++.target/i386/mv31.C
new file mode 100644
index 00000000000..70a40f1e28a
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/mv31.C
@@ -0,0 +1,11 @@
+// PR c++/104669
+// { dg-require-ifunc "" }
+
+void bar()
+{
+ int foo(void);
+ int foo(void) __attribute__((target("sse")));
+ int foo(void) __attribute__((target("default")));
+ int (*p)(void) = &foo;
+ return;
+}
diff --git a/gcc/testsuite/g++.target/i386/vec-tmpl1.C b/gcc/testsuite/g++.target/i386/vec-tmpl1.C
new file mode 100644
index 00000000000..e0865e3515b
--- /dev/null
+++ b/gcc/testsuite/g++.target/i386/vec-tmpl1.C
@@ -0,0 +1,17 @@
+// PR c++/65211
+// { dg-additional-options "-Wno-psabi" }
+// { dg-final { scan-assembler-not "movdqa" } }
+
+typedef unsigned v4ui __attribute__ ((vector_size(16), aligned (16)));
+
+template<int I>
+static v4ui t1(unsigned *dest_data)
+{
+ typedef unsigned v4ui_1 __attribute__ ((vector_size (16), aligned (4)));
+ return ((const v4ui_1*)dest_data)[0];
+}
+
+v4ui f(unsigned int *array)
+{
+ return t1<1>(array+7);
+}