target-supports.exp (check_effective_target_vect_shift): Implement with result caching.
authorUros Bizjak <uros@kss-loka.si>
Mon, 3 Oct 2005 05:24:08 +0000 (07:24 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Mon, 3 Oct 2005 05:24:08 +0000 (07:24 +0200)
* lib/target-supports.exp (check_effective_target_vect_shift):
Implement with result caching. Add i?86, x86_64 and ia64 targets.
(check_effective_target_vect_condition): Fix copy-n-pasto.

* gcc.dg/vect/pr22480.c : Enable for effective-target vect_shift.
* gcc.dg/vect/vect-shift-1.c: Remove XFAIL for i?86 and x86_64
targets.

From-SVN: r104888

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/vect/pr22480.c
gcc/testsuite/gcc.dg/vect/vect-shift-1.c
gcc/testsuite/lib/target-supports.exp

index d34c5322960c1566f3dac60a15c33d3be1fb16e9..a297cb321bce1ede1b03a835e338056a9f835a4c 100644 (file)
@@ -1,3 +1,13 @@
+2005-10-03  Uros Bizjak  <uros@kss-loka.si>
+
+       * lib/target-supports.exp (check_effective_target_vect_shift):
+       Implement with result caching. Add i?86, x86_64 and ia64 targets.
+       (check_effective_target_vect_condition): Fix copy-n-pasto.
+
+       * gcc.dg/vect/pr22480.c : Enable for effective-target vect_shift.
+       * gcc.dg/vect/vect-shift-1.c: Remove XFAIL for i?86 and x86_64
+       targets.
+
 2005-10-02  Mark Mitchell  <mark@codesourcery.com>
 
        PR c++/22621
index 83f311aa26659c7e5b521fcf394d907c8e1a139b..a7e238f22717476afbb78fb13739609763b8957e 100755 (executable)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-require-effective-target vect_int } */
+/* { dg-require-effective-target vect_shift } */
 
 void
 test_1 (void)
index e8b8bc6befc5455c9bdee39c429a243962bf939c..75070166aae7d2bf2b027c7e65ea618e87b44615 100644 (file)
@@ -3,9 +3,6 @@
 #include <stdarg.h>
 #include <signal.h>
 
-#define N 16
-#define MAX 42
-
 extern void abort(void); 
 
 int main ()
@@ -23,7 +20,5 @@ int main ()
   return 0;
 }
 
-
-
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail i?86-*-* x86_64-*-* } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */
index 14426ec82c3462f4f07ecca1627f9b7942cbe689..6cbbf146ef3f59238f9638ce5446b5687c9eb3f7 100644 (file)
@@ -888,14 +888,22 @@ proc check_effective_target_arm32 { } {
 # Return 1 if the target supports hardware vector shift operation.
 
 proc check_effective_target_vect_shift { } {
-    if { [istarget powerpc*-*-*] } {
-       set answer 1
+    global et_vect_shift_saved
+
+    if [info exists et_vect_shift_saved] {
+       verbose "check_effective_target_vect_shift: using cached result" 2
     } else {
-       set answer 0
+       set et_vect_shift_saved 0
+       if { [istarget powerpc*-*-*]
+            || [istarget ia64-*-*]
+            || [istarget i?86-*-*]
+            || [istarget x86_64-*-*] } {
+          set et_vect_shift_saved 1
+       }
     }
 
-    verbose "check_effective_target_vect_shift: returning $answer" 2
-    return $answer
+    verbose "check_effective_target_vect_shift: returning $et_vect_shift_saved" 2
+    return $et_vect_shift_saved
 }
 
 # Return 1 if the target supports hardware vectors of long, 0 otherwise.
@@ -1047,7 +1055,7 @@ proc check_effective_target_vect_no_align { } {
 proc check_effective_target_vect_condition { } {
     global et_vect_cond_saved
 
-    if [info exists et_vect_int_cond] {
+    if [info exists et_vect_cond_saved] {
        verbose "check_effective_target_vect_cond: using cached result" 2
     } else {
        set et_vect_cond_saved 0