This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Fix g++.dg/vect/slp-pr50413.cc


Hi,

g++.dg/vect/slp-pr50413.cc should check that the basic block in shift
() doesn't get vectorized. This patch removes other functions that
contain basic blocks that can be vectorizable on some platforms.

Tested on x86_64-suse-linux.
Committed to trunk.

Ira

testsuite/ChangeLog:

        * g++.dg/vect/slp-pr50413.cc: Don't run the test.  Remove main ()
        and get_bit ().


Index: testsuite/g++.dg/vect/slp-pr50413.cc
===================================================================
--- testsuite/g++.dg/vect/slp-pr50413.cc        (revision 178998)
+++ testsuite/g++.dg/vect/slp-pr50413.cc        (working copy)
@@ -1,3 +1,4 @@
+/* { dg-do compile } */
 /* { dg-require-effective-target vect_int } */

 typedef unsigned long long UInt64;
@@ -150,12 +151,6 @@ UInt128_BITMAP;

 UInt128_BITMAP V;

-template<typename CAST>
-unsigned char get_bit(CAST value, unsigned char pos)
-{
-    return ( value & (static_cast<CAST>(1) << pos) ) != 0;
-}
-
 void shift(unsigned char t)
 {
   V.uint128.uint64_lower = (V.uint128.uint64_lower >> 1);
@@ -165,21 +160,6 @@ void shift(unsigned char t)
   V.bitmap.b96 = t;
 }

-int main()
-{
-   V.uint128.uint64_lower = 0;
-   V.uint128.uint64_upper = 0xd4004001;
-
-   UInt64 Kc = 0xDD1A1B8A8A5C2400;
-
-  for (int i = 0; i < 64; i++ )
-  {
-    shift( get_bit( Kc, i) );
-  }
-
-   return 0;
-}
-
 /* { dg-final { scan-tree-dump-times "basic block vectorized using
SLP" 0 "slp" } } */
 /* { dg-final { cleanup-tree-dump "slp" } } */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]