+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
@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.
+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.
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 } } } } */
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 { } {