+2004-12-21 Janis Johnson <janis187@us.ibm.com>
+
+ * lib/target-supports.exp
+ (check_effective_target_vect_no_max,
+ check_effective_target_vect_no_bitwise,
+ check_effective_target_vect_no_align): New.
+ * gcc.dg/vect/vect-13.c: Use them.
+ * gcc.dg/vect/vect-17.c: Ditto.
+ * gcc.dg/vect/vect-18.c: Ditto.
+ * gcc.dg/vect/vect-19.c: Ditto.
+ * gcc.dg/vect/vect-20.c: Ditto.
+ * gcc.dg/vect/vect-27.c: Ditto.
+ * gcc.dg/vect/vect-29.c: Ditto.
+ * gcc.dg/vect/vect-44.c: Ditto.
+ * gcc.dg/vect/vect-48.c: Ditto.
+ * gcc.dg/vect/vect-50.c: Ditto.
+ * gcc.dg/vect/vect-52.c: Ditto.
+ * gcc.dg/vect/vect-54.c: Ditto.
+ * gcc.dg/vect/vect-56.c: Ditto.
+ * gcc.dg/vect/vect-58.c: Ditto.
+ * gcc.dg/vect/vect-60.c: Ditto.
+ * gcc.dg/vect/vect-72.c: Ditto.
+ * gcc.dg/vect/vect-80.c: Ditto.
+
2004-12-21 Nathan Sidwell <nathan@codesourcery.com>
PR c++/14075
return main1 ();
}
-/* These fail to vectorize on targets that don't have or model a vector
- max operation. */
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* sparc*-*-* alpha*-*-* } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_max } } } */
return main1 ();
}
-/* These fail to vectorize on targets that don't have or model vector
- bitwise operations. */
-/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" {xfail i?86-*-* x86_64-*-* alpha*-*-* } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_bitwise } } } */
return main1 ();
}
-/* These fail to vectorize on targets that don't have or model vector
- bitwise operations. */
-/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" {xfail i?86-*-* x86_64-*-* alpha*-*-* } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_bitwise } } } */
return main1 ();
}
-/* These fail to vectorize on targets that don't have or model vector
- bitwise operations. */
-/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" {xfail i?86-*-* x86_64-*-* alpha*-*-* } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_bitwise } } } */
return main1 ();
}
-/* These fail to vectorize on targets that don't have or model vector
- bitwise operations. */
-/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" {xfail i?86-*-* x86_64-*-* alpha*-*-* } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 3 loops" 1 "vect" { xfail vect_no_bitwise } } } */
return main1 ();
}
-/* These are not yet vectorized on targets that do not model alignment-handling
- mechanisms. */
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* sparc*-*-* } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
return 0;
}
-/* These are not yet vectorized on targets that do not model alignment-handling
- mechanisms. */
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* sparc*-*-* } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
return 0;
}
-/* These are not yet vectorized on targets that do not model alignment-handling
- mechanisms. */
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* mipsisa64*-*-* } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
return 0;
}
-/* These are not yet vectorized on targets that do not model alignment-handling
- mechanisms. */
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* mipsisa64*-*-* } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
return 0;
}
-/* These are not yet vectorized on targets that do not model alignment-handling
- mechanisms. They also fail to vectorize for 64-bit powerpc but there's no
- way to specify that in an xfail list. */
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* mipsisa64*-*-* } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
return 0;
}
-/* These are not yet vectorized on targets that do not model alignment-handling
- mechanisms. They also fail to vectorize for 64-bit powerpc but there's no
- way to specify that in an xfail list. */
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* mipsisa64*-*-* } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
return 0;
}
-/* These are not yet vectorized on targets that do not model alignment-handling
- mechanisms. */
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* mipsisa64*-*-* } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
return 0;
}
-/* These are not yet vectorized on targets that do not model alignment-handling
- mechanisms. */
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* mipsisa64*-*-* } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
return 0;
}
-/* These are not yet vectorized on targets that do not model alignment-handling
- mechanisms. They also fail to vectorize for 64-bit powerpc but there's no
- way to specify that in an xfail list. */
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* mipsisa64*-*-* } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
return 0;
}
-/* These are not yet vectorized on targets that do not model alignment-handling
- mechanisms. */
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* mipsisa64*-*-* } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
return main1 ();
}
-/* These are not yet vectorized on targets that do not model alignment-handling
- mechanisms. */
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* sparc*-*-* } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
return 0;
}
-/* These are not yet vectorized on targets that do not model alignment-handling
- mechanisms. */
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* mipsisa64*-*-* } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail vect_no_align } } } */
return $et_vect_double_saved
}
+# Return 1 if the target plus current options does not support a vector
+# max instruction, 0 otherwise.
+#
+# This won't change for different subtargets so cache the result.
+
+proc check_effective_target_vect_no_max { } {
+ global et_vect_no_max_saved
+
+ if [info exists et_vect_no_max_saved] {
+ verbose "check_effective_target_vect_no_max: using cached result" 2
+ } else {
+ set et_vect_no_max_saved 0
+ if { [istarget i?86-*-*]
+ || [istarget x86_64-*-*]
+ || [istarget sparc*-*-*]
+ || [istarget alpha*-*-*] } {
+ set et_vect_no_max_saved 1
+ }
+ }
+ verbose "check_effective_target_vect_no_max: returning $et_vect_no_max_saved" 2
+ return $et_vect_no_max_saved
+}
+
+# Return 1 if the target plus current options does not support vector
+# bitwise instructions, 0 otherwise.
+#
+# This won't change for different subtargets so cache the result.
+
+proc check_effective_target_vect_no_bitwise { } {
+ global et_vect_no_bitwise_saved
+
+ if [info exists et_vect_no_bitwise_saved] {
+ verbose "check_effective_target_vect_no_bitwise: using cached result" 2
+ } else {
+ set et_vect_no_bitwise_saved 0
+ if { [istarget i?86-*-*]
+ || [istarget x86_64-*-*]
+ || [istarget alpha-*-*] } {
+ set et_vect_no_bitwise_saved 1
+ }
+ }
+ verbose "check_effective_target_vect_no_bitwise: returning $et_vect_no_bitwise_saved" 2
+ return $et_vect_no_bitwise_saved
+}
+
+# Return 1 if the target plus current options does not support a vector
+# alignment mechanism, 0 otherwise.
+#
+# This won't change for different subtargets so cache the result.
+
+proc check_effective_target_vect_no_align { } {
+ global et_vect_no_align_saved
+
+ if [info exists et_vect_no_align_saved] {
+ verbose "check_effective_target_vect_no_align: using cached result" 2
+ } else {
+ set et_vect_no_align_saved 0
+ if { [istarget i?86-*-*]
+ || [istarget x86_64-*-*]
+ || [istarget mipsisa64*-*-*]
+ || [istarget sparc*-*-*] } {
+ set et_vect_no_align_saved 1
+ }
+ }
+ verbose "check_effective_target_vect_no_align: returning $et_vect_no_align_saved" 2
+ return $et_vect_no_align_saved
+}
+
# Return 1 if the target matches the effective target 'arg', 0 otherwise.
# This can be used with any check_* proc that takes no argument and
# returns only 1 or 0. It could be used with check_* procs that take