summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2014-04-09 11:37:14 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2014-04-09 11:37:14 +0000
commita4f867b1a0516f1ac6c186981ac2e4c6efb0c17a (patch)
tree3a32d2ff2094b457ed9895ed0b2854e1cc9223f9
parentc6c93fff61c8d5b63917cacb5a52dfa5f5408d44 (diff)
downloadgcc-a4f867b1a0516f1ac6c186981ac2e4c6efb0c17a.tar.gz
2014-04-09 Cong Hou <congh@google.com>
PR testsuite/60773 * doc/sourcebuild.texi (vect_widen_mult_si_to_di_pattern): Add documentation. * lib/target-supports.exp: (check_effective_target_vect_widen_si_to_di_pattern): New. * gcc.dg/vect/pr60656.c: Require vect_long effective target. Use scan-tree-dump-times for vect_widen_mult_si_to_di_pattern targets only. (foo): Fix up formatting. (main): Call check_vect. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209241 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/doc/sourcebuild.texi4
-rw-r--r--gcc/testsuite/ChangeLog11
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr60656.c10
-rw-r--r--gcc/testsuite/lib/target-supports.exp21
5 files changed, 48 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index afc90799640..5803746de11 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2014-04-09 Cong Hou <congh@google.com>
+
+ PR testsuite/60773
+ * doc/sourcebuild.texi (vect_widen_mult_si_to_di_pattern): Add
+ documentation.
+
2014-04-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* config/rs6000/rs6000.c (rs6000_expand_vector_set): Use vnand
diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index 85ef819c767..914860813ca 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -1428,6 +1428,10 @@ Target supports a vector widening multiplication of @code{short} operands
into @code{int} results, or can promote (unpack) from @code{short} to
@code{int} and perform non-widening multiplication of @code{int}.
+@item vect_widen_mult_si_to_di_pattern
+Target supports a vector widening multiplication of @code{int} operands
+into @code{long} results.
+
@item vect_sdot_qi
Target supports a vector dot-product of @code{signed char}.
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 86a3f29acc3..4255e5175a6 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,14 @@
+2014-04-09 Cong Hou <congh@google.com>
+
+ PR testsuite/60773
+ * lib/target-supports.exp:
+ (check_effective_target_vect_widen_si_to_di_pattern): New.
+ * gcc.dg/vect/pr60656.c: Require vect_long effective target.
+ Use scan-tree-dump-times for vect_widen_mult_si_to_di_pattern
+ targets only.
+ (foo): Fix up formatting.
+ (main): Call check_vect.
+
2014-04-08 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/59115
diff --git a/gcc/testsuite/gcc.dg/vect/pr60656.c b/gcc/testsuite/gcc.dg/vect/pr60656.c
index ebaab62b97c..4950275fb87 100644
--- a/gcc/testsuite/gcc.dg/vect/pr60656.c
+++ b/gcc/testsuite/gcc.dg/vect/pr60656.c
@@ -1,4 +1,5 @@
/* { dg-require-effective-target vect_int } */
+/* { dg-require-effective-target vect_long } */
#include "tree-vect.h"
@@ -12,7 +13,7 @@ foo ()
for(i = 0; i < 4; ++i)
{
long P = v[i];
- s += P*P*P;
+ s += P * P * P;
}
return s;
}
@@ -27,7 +28,7 @@ bar ()
for(i = 0; i < 4; ++i)
{
long P = v[i];
- s += P*P*P;
+ s += P * P * P;
__asm__ volatile ("");
}
return s;
@@ -35,11 +36,12 @@ bar ()
int main()
{
+ check_vect ();
+
if (foo () != bar ())
abort ();
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_widen_mult_si_to_di_pattern } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
-
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 1a5c2fa1b97..f81663a8e61 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -3739,6 +3739,27 @@ proc check_effective_target_vect_widen_mult_hi_to_si_pattern { } {
}
# Return 1 if the target plus current options supports a vector
+# widening multiplication of *int* args into *long* result, 0 otherwise.
+#
+# This won't change for different subtargets so cache the result.
+
+proc check_effective_target_vect_widen_mult_si_to_di_pattern { } {
+ global et_vect_widen_mult_si_to_di_pattern
+
+ if [info exists et_vect_widen_mult_si_to_di_pattern_saved] {
+ verbose "check_effective_target_vect_widen_mult_si_to_di_pattern: using cached result" 2
+ } else {
+ if {[istarget ia64-*-*]
+ || [istarget i?86-*-*]
+ || [istarget x86_64-*-*] } {
+ set et_vect_widen_mult_si_to_di_pattern_saved 1
+ }
+ }
+ verbose "check_effective_target_vect_widen_mult_si_to_di_pattern: returning $et_vect_widen_mult_si_to_di_pattern_saved" 2
+ return $et_vect_widen_mult_si_to_di_pattern_saved
+}
+
+# Return 1 if the target plus current options supports a vector
# widening shift, 0 otherwise.
#
# This won't change for different subtargets so cache the result.