diff mbox

[testsuite] Enable vect_double for PowerPC targets with VSX support

Message ID 1440700507.4911.14.camel@oc8801110288.ibm.com
State New
Headers show

Commit Message

Bill Schmidt Aug. 27, 2015, 6:35 p.m. UTC
Hi,

I observed today that { dg-require-effective-target vect_double } was
unintentionally excluding all powerpc* targets.  This patch corrects the
situation by enabling vect_double when the VSX architectural support is
present, which provides the vector double type.  As a result of this
change, I observed one XPASS.  This is due to vect_no_align being used
where { vect_no_align && { ! vect_hw_misalign } } is actually desired.
(I made a number of similar changes back in April, but didn't catch this
one at the time.)

Tested on powerpc64-unknown-linux-gnu and powerpc64le-unknown-linux-gnu
with no regressions.  Is this ok for trunk?

Thanks,
Bill


2015-08-27  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* lib/target-supports.exp (check-effective_target_vect_double):
	Enable for Power targets with VSX hardware available.
	* gfortran.dg/vect/O3-pr49957.f: Replace vect_no_align with
	vect_no_align && { ! vect_hw_misalign }.

Comments

Jeff Law Aug. 27, 2015, 9:37 p.m. UTC | #1
On 08/27/2015 12:35 PM, Bill Schmidt wrote:
> Hi,
>
> I observed today that { dg-require-effective-target vect_double } was
> unintentionally excluding all powerpc* targets.  This patch corrects the
> situation by enabling vect_double when the VSX architectural support is
> present, which provides the vector double type.  As a result of this
> change, I observed one XPASS.  This is due to vect_no_align being used
> where { vect_no_align && { ! vect_hw_misalign } } is actually desired.
> (I made a number of similar changes back in April, but didn't catch this
> one at the time.)
>
> Tested on powerpc64-unknown-linux-gnu and powerpc64le-unknown-linux-gnu
> with no regressions.  Is this ok for trunk?
>
> Thanks,
> Bill
>
>
> 2015-08-27  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
>
> 	* lib/target-supports.exp (check-effective_target_vect_double):
> 	Enable for Power targets with VSX hardware available.
> 	* gfortran.dg/vect/O3-pr49957.f: Replace vect_no_align with
> 	vect_no_align && { ! vect_hw_misalign }.
OK.
jeff
diff mbox

Patch

Index: gcc/testsuite/gfortran.dg/vect/O3-pr49957.f
===================================================================
--- gcc/testsuite/gfortran.dg/vect/O3-pr49957.f	(revision 227258)
+++ gcc/testsuite/gfortran.dg/vect/O3-pr49957.f	(working copy)
@@ -13,4 +13,4 @@ 
          enddo
       return
       end
-! { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail vect_no_align } } }
+! { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail { vect_no_align && { ! vect_hw_misalign } } } } }
Index: gcc/testsuite/lib/target-supports.exp
===================================================================
--- gcc/testsuite/lib/target-supports.exp	(revision 227258)
+++ gcc/testsuite/lib/target-supports.exp	(working copy)
@@ -3711,6 +3711,8 @@  proc check_effective_target_vect_double { } {
 	    }
 	} elseif { [istarget spu-*-*] } {
 	   set et_vect_double_saved 1
+	} elseif { [istarget powerpc*-*-*] && [check_vsx_hw_available] } {
+	   set et_vect_double_saved 1
 	}
     }