aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/doc/sourcebuild.texi3
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr60656.c3
-rw-r--r--gcc/testsuite/lib/target-supports.exp24
5 files changed, 39 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 76c1f1b..2015b7f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2017-10-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
+
+ * doc/sourcebuild.texi: Document vect_long_mult.
+
2017-10-04 Richard Sandiford <richard.sandiford@linaro.org>
PR tree-optimization/82413
diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index 56e1b4e..4f25268 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -1422,6 +1422,9 @@ Target supports @code{vector short} multiplication.
@item vect_int_mult
Target supports @code{vector int} multiplication.
+@item vect_long_mult
+Target supports 64 bit @code{vector long} multiplication.
+
@item vect_extract_even_odd
Target supports vector even/odd element extraction.
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 1dea25d..68e0f05 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,11 @@
2017-10-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
+ * gcc.dg/vect/pr60656.c: Check vect_long_mult.
+ * lib/target-supports.exp (check_effective_target_vect_long_mult):
+ New proc.
+
+2017-10-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
+
* gfortran.dg/vect/fast-math-mgrid-resid.f: Use -mzarch on S/390.
* gfortran.dg/vect/pr77848.f: Likewise.
diff --git a/gcc/testsuite/gcc.dg/vect/pr60656.c b/gcc/testsuite/gcc.dg/vect/pr60656.c
index d9e30bb..70ec0f6 100644
--- a/gcc/testsuite/gcc.dg/vect/pr60656.c
+++ b/gcc/testsuite/gcc.dg/vect/pr60656.c
@@ -43,4 +43,5 @@ int main()
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_widen_mult_si_to_di_pattern } } } */
+/* P * P * P requires a widening multiplication first as well as a longxlong->long after that. */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_widen_mult_si_to_di_pattern && vect_long_mult } } } } */
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index 5949da4..539aaaf 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -6299,6 +6299,30 @@ proc check_effective_target_vect_int_mult { } {
return $et_vect_int_mult_saved($et_index)
}
+# Return 1 if the target supports 64 bit hardware vector
+# multiplication of long operands with a long result, 0 otherwise.
+#
+# This can change for different subtargets so do not cache the result.
+
+proc check_effective_target_vect_long_mult { } {
+ if { [istarget i?86-*-*] || [istarget x86_64-*-*]
+ || (([istarget powerpc*-*-*]
+ && ![istarget powerpc-*-linux*paired*])
+ && [check_effective_target_ilp32])
+ || [is-effective-target arm_neon]
+ || ([istarget sparc*-*-*] && [check_effective_target_ilp32])
+ || [istarget aarch64*-*-*]
+ || ([istarget mips*-*-*]
+ && [et-is-effective-target mips_msa]) } {
+ set answer 1
+ } else {
+ set answer 0
+ }
+
+ verbose "check_effective_target_vect_long_mult: returning $answer" 2
+ return $answer
+}
+
# Return 1 if the target supports vector even/odd elements extraction, 0 otherwise.
proc check_effective_target_vect_extract_even_odd { } {