+2017-10-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
+
+ * doc/sourcebuild.texi: Document vect_intdouble_cvt and
+ vect_doubleint_cvt.
+
2017-10-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* doc/sourcebuild.texi: Document vect_long_mult.
@item vect_floatuint_cvt
Target supports conversion from @code{float} to @code{unsigned int}.
+@item vect_intdouble_cvt
+Target supports conversion from @code{signed int} to @code{double}.
+
+@item vect_doubleint_cvt
+Target supports conversion from @code{double} to @code{signed int}.
+
@item vect_max_reduc
Target supports max reduction for vectors.
@end table
+2017-10-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
+
+ * gcc.dg/vect/pr66251.c: Replace vect_floatint_cvt with
+ vect_doubleint_cvt and vect_intfloat_cvt with vect_intdouble_cvt.
+ * gcc.dg/vect/vect-floatint-conversion-2.c: Replace
+ vect_floatint_cvt with vect_doubleint_cvt.
+ * gcc.dg/vect/vect-intfloat-conversion-3.c: Replace
+ vect_intfloat_cvt with vect_intdouble_cvt.
+ * gfortran.dg/vect/pr60510.f: Require vect_intdouble_cvt.
+ * gfortran.dg/vect/vect-8.f90: Make number of vectorized loops
+ depend on vect_intdouble_cvt.
+ * lib/target-supports.exp
+ (check_effective_target_vect_doubleint_cvt)
+ (check_effective_target_vect_intdouble_cvt): New procs.
+
2017-10-04 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* gcc.dg/vect/pr60656.c: Check vect_long_mult.
/* { dg-require-effective-target vect_int } */
/* { dg-require-effective-target vect_double } */
-/* { dg-require-effective-target vect_floatint_cvt } */
-/* { dg-require-effective-target vect_intfloat_cvt } */
+/* { dg-require-effective-target vect_doubleint_cvt } */
+/* { dg-require-effective-target vect_intdouble_cvt } */
/* { dg-require-effective-target vect_pack_trunc } */
/* { dg-require-effective-target vect_unpack } */
/* { dg-require-effective-target vect_hw_misalign } */
return main1 ();
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_floatint_cvt } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_doubleint_cvt } } } */
return main1 ();
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_intfloat_cvt } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_intdouble_cvt } } } */
! { dg-do run }
! { dg-require-effective-target vect_double }
+! { dg-require-effective-target vect_intdouble_cvt }
! { dg-additional-options "-fno-inline -ffast-math" }
subroutine foo(a,x,y,n)
implicit none
RETURN
END SUBROUTINE kernel
-! { dg-final { scan-tree-dump-times "vectorized 21 loops" 1 "vect" } }
+! { dg-final { scan-tree-dump-times "vectorized 21 loops" 1 "vect" { target { vect_intdouble_cvt } } } }
+! { dg-final { scan-tree-dump-times "vectorized 17 loops" 1 "vect" { target { ! vect_intdouble_cvt } } } }
return $et_vect_intfloat_cvt_saved($et_index)
}
+# Return 1 if the target supports signed double->int conversion
+#
+
+proc check_effective_target_vect_doubleint_cvt { } {
+ global et_vect_doubleint_cvt_saved
+ global et_index
+
+ if [info exists et_vect_doubleint_cvt_saved($et_index)] {
+ verbose "check_effective_target_vect_doubleint_cvt: using cached result" 2
+ } else {
+ set et_vect_doubleint_cvt_saved($et_index) 0
+ if { (([istarget i?86-*-*] || [istarget x86_64-*-*])
+ && [check_no_compiler_messages vect_doubleint_cvt assembly {
+ #ifdef __tune_atom__
+ # error No double vectorizer support.
+ #endif
+ }])
+ || [istarget aarch64*-*-*]
+ || [istarget spu-*-*]
+ || ([istarget powerpc*-*-*] && [check_vsx_hw_available])
+ || ([istarget mips*-*-*]
+ && [et-is-effective-target mips_msa]) } {
+ set et_vect_doubleint_cvt_saved($et_index) 1
+ }
+ }
+
+ verbose "check_effective_target_vect_doubleint_cvt:\
+ returning $et_vect_doubleint_cvt_saved($et_index)" 2
+ return $et_vect_doubleint_cvt_saved($et_index)
+}
+
+# Return 1 if the target supports signed int->double conversion
+#
+
+proc check_effective_target_vect_intdouble_cvt { } {
+ global et_vect_intdouble_cvt_saved
+ global et_index
+
+ if [info exists et_vect_intdouble_cvt_saved($et_index)] {
+ verbose "check_effective_target_vect_intdouble_cvt: using cached result" 2
+ } else {
+ set et_vect_intdouble_cvt_saved($et_index) 0
+ if { (([istarget i?86-*-*] || [istarget x86_64-*-*])
+ && [check_no_compiler_messages vect_intdouble_cvt assembly {
+ #ifdef __tune_atom__
+ # error No double vectorizer support.
+ #endif
+ }])
+ || [istarget aarch64*-*-*]
+ || [istarget spu-*-*]
+ || ([istarget powerpc*-*-*] && [check_vsx_hw_available])
+ || ([istarget mips*-*-*]
+ && [et-is-effective-target mips_msa]) } {
+ set et_vect_intdouble_cvt_saved($et_index) 1
+ }
+ }
+
+ verbose "check_effective_target_vect_intdouble_cvt:\
+ returning $et_vect_intdouble_cvt_saved($et_index)" 2
+ return $et_vect_intdouble_cvt_saved($et_index)
+}
+
#Return 1 if we're supporting __int128 for target, 0 otherwise.
proc check_effective_target_int128 { } {