From patchwork Tue Sep 20 06:34:26 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ira Rosen X-Patchwork-Id: 4192 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id DE15323F57 for ; Tue, 20 Sep 2011 06:34:30 +0000 (UTC) Received: from mail-fx0-f52.google.com (mail-fx0-f52.google.com [209.85.161.52]) by fiordland.canonical.com (Postfix) with ESMTP id CA352A1879D for ; Tue, 20 Sep 2011 06:34:30 +0000 (UTC) Received: by fxe23 with SMTP id 23so311073fxe.11 for ; Mon, 19 Sep 2011 23:34:30 -0700 (PDT) Received: by 10.223.74.89 with SMTP id t25mr756533faj.65.1316500470608; Mon, 19 Sep 2011 23:34:30 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.18.198 with SMTP id y6cs68362lad; Mon, 19 Sep 2011 23:34:30 -0700 (PDT) Received: by 10.100.214.1 with SMTP id m1mr301801ang.134.1316500468330; Mon, 19 Sep 2011 23:34:28 -0700 (PDT) Received: from mail-gw0-f44.google.com (mail-gw0-f44.google.com [74.125.83.44]) by mx.google.com with ESMTPS id c5si1570073anj.31.2011.09.19.23.34.26 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 19 Sep 2011 23:34:28 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.83.44 is neither permitted nor denied by best guess record for domain of ira.rosen@linaro.org) client-ip=74.125.83.44; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.83.44 is neither permitted nor denied by best guess record for domain of ira.rosen@linaro.org) smtp.mail=ira.rosen@linaro.org Received: by gwj15 with SMTP id 15so283476gwj.17 for ; Mon, 19 Sep 2011 23:34:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.150.182.7 with SMTP id e7mr174943ybf.48.1316500466656; Mon, 19 Sep 2011 23:34:26 -0700 (PDT) Received: by 10.151.100.9 with HTTP; Mon, 19 Sep 2011 23:34:26 -0700 (PDT) Date: Tue, 20 Sep 2011 09:34:26 +0300 Message-ID: Subject: [patch] Fix g++.dg/vect/slp-pr50413.cc From: Ira Rosen To: gcc-patches@gcc.gnu.org Cc: Patch Tracking 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 -unsigned char get_bit(CAST value, unsigned char pos) -{ - return ( value & (static_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" } } */