From patchwork Thu Jan 14 21:41:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 567718 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id DEA94140157 for ; Fri, 15 Jan 2016 08:41:41 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=oZQKvVh0; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=EIgBnw1NtREaBH3QdKjRZodEcL8MJQGQV4KUBUyTBR5cnw+o6X e86E1qGyzJcYDcuLWjmqQ3nZqMWJCVuwDKPWRjc/rweHCZI0DRWPlFcTaeXHqo6Q H/ROSbEOi8HDrbbQinq9SDRbTyn6P5k7ZBDX8FYaLBVQNEJKT1FC0Q67Q= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=Ta5Yq6/JysKfHXRD8xlPRptOrJo=; b=oZQKvVh0A0Bz6YL52Jh+ m9dE86x5vHKfglIHSV/tMKHVhE6XdnK7Cp7dkpDObF/mMNu0FFavBzUjvlViHgdj k3dzassCLunqFj7MdTm3Ut4wem0Tq7CRv2eHphabSbQV4wpehtYqpyQvlKpD9ApB pf9n/FV7GjzeGbIdrMkQnQk= Received: (qmail 125053 invoked by alias); 14 Jan 2016 21:41:32 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 118108 invoked by uid 89); 14 Jan 2016 21:41:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1637 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 14 Jan 2016 21:41:29 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 28EA48EFE6 for ; Thu, 14 Jan 2016 21:41:28 +0000 (UTC) Received: from bigtime.twiddle.net (ovpn-113-192.phx2.redhat.com [10.3.113.192]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u0ELfRW4023108 for ; Thu, 14 Jan 2016 16:41:27 -0500 To: gcc-patches@gcc.gnu.org From: Richard Henderson Subject: [committed] Followup for pr68962; and pr69272 Message-ID: <56981606.3030008@redhat.com> Date: Thu, 14 Jan 2016 13:41:26 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 X-IsSubscribed: yes Predictably, I must have tweaked the patch after testing on x86. Re-tested and committed. r~ PR c/69272 PR tree-opt/68964 * trans-mem.c (tm_log_emit_stmt): Fix unit size to bit size. * tree.c (build_tm_vector_builtins): Use builtin_decl_explicit_p instead of builtin_decl_declared_p to test for declaration. diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c index c462307..b204760 100644 --- a/gcc/trans-mem.c +++ b/gcc/trans-mem.c @@ -1229,16 +1229,16 @@ tm_log_emit_stmt (tree addr, gimple *stmt) unhandled_vec: switch (type_size) { - case 1: + case 8: code = BUILT_IN_TM_LOG_1; break; - case 2: + case 16: code = BUILT_IN_TM_LOG_2; break; - case 4: + case 32: code = BUILT_IN_TM_LOG_4; break; - case 8: + case 64: code = BUILT_IN_TM_LOG_8; break; } diff --git a/gcc/tree.c b/gcc/tree.c index e6880f0..8ac2d90 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -10393,7 +10393,7 @@ build_tm_vector_builtins (void) /* By default, 64 bit vectors go through the long long helpers. */ /* If a 128-bit vector is supported, declare those builtins. */ - if (!builtin_decl_declared_p (BUILT_IN_TM_STORE_M128) + if (!builtin_decl_explicit_p (BUILT_IN_TM_STORE_M128) && ((vtype = find_tm_vector_type (128, SImode)) || (vtype = find_tm_vector_type (128, SFmode)))) { @@ -10430,7 +10430,7 @@ build_tm_vector_builtins (void) } /* If a 256-bit vector is supported, declare those builtins. */ - if (!builtin_decl_declared_p (BUILT_IN_TM_STORE_M256) + if (!builtin_decl_explicit_p (BUILT_IN_TM_STORE_M256) && ((vtype = find_tm_vector_type (256, SImode)) || (vtype = find_tm_vector_type (256, SFmode)))) {