From patchwork Thu Apr 28 13:36:51 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyrill Tkachov X-Patchwork-Id: 616268 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 3qwdDH15LCz9t79 for ; Thu, 28 Apr 2016 23:37:17 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=rETyoMMx; 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 :message-id:date:from:mime-version:to:subject:content-type; q= dns; s=default; b=PGEA3AN4UNd7M9OQTUlxSh6RI+4WQon/x1+RwwVRxgPMmh 1QN1V4USIqZiCyjS8QqQabANO+xJF6sU7Q/c4guWBFm/iLFubJo/FvVSn0tlAXWy QXPkDBkywwwFCd0HXNSsjBgIhK2eNvlsySIiw2vDpGdVi5eYnIAgZDyGYHSR8= 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 :message-id:date:from:mime-version:to:subject:content-type; s= default; bh=muT5e9PRDcL1t1Cf4Pd6OvC/xaU=; b=rETyoMMx67dDe0eLCcVU BFPDh55ooHZ7RDZuUO680De4G1GCOxakX3ClOnkaN1IFUjY2mHFBIEx1JyjsnLX+ FbhRWikartYdgtGT6AEK+H9moow64zwno/UxuMXvPhe9oMIiSUEb5R0S/l1ulTwu 5VNIYrL5svo+l+/cpjxSiR8= Received: (qmail 33416 invoked by alias); 28 Apr 2016 13:37:06 -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 32231 invoked by uid 89); 28 Apr 2016 13:37:05 -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, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 28 Apr 2016 13:36:55 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 4F7653A for ; Thu, 28 Apr 2016 06:36:55 -0700 (PDT) Received: from [10.2.206.43] (e100706-lin.cambridge.arm.com [10.2.206.43]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 875E33F25F for ; Thu, 28 Apr 2016 06:36:53 -0700 (PDT) Message-ID: <572211F3.20707@foss.arm.com> Date: Thu, 28 Apr 2016 14:36:51 +0100 From: Kyrill Tkachov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: GCC Patches Subject: [PATCH][internal-fn.c][committed] Convert conditional compilation on WORD_REGISTER_OPERATIONS Hi all, This is another instance of conditional compilation on WORD_REGISTER_OPERATIONS that's trivial to remove. Bootstrapped and tested on arm, aarch64, x86_64. Committing to trunk as obvious. Thanks, Kyrill 2016-04-28 Kyrylo Tkachov * internal-fn.c (expand_arith_overflow): Convert preprocessor check for WORD_REGISTER_OPERATIONS to runtime check. diff --git a/gcc/internal-fn.c b/gcc/internal-fn.c index 3ceaffe67eaa694afe35de8f7a13a182c46f05ff..2cbe198924c7b3aed34d52c0cc35612e09f5646c 100644 --- a/gcc/internal-fn.c +++ b/gcc/internal-fn.c @@ -1807,11 +1807,7 @@ expand_arith_overflow (enum tree_code code, gimple *stmt) /* For sub-word operations, retry with a wider type first. */ if (orig_precres == precres && precop <= BITS_PER_WORD) { -#if WORD_REGISTER_OPERATIONS - int p = BITS_PER_WORD; -#else - int p = precop; -#endif + int p = WORD_REGISTER_OPERATIONS ? BITS_PER_WORD : precop; enum machine_mode m = smallest_mode_for_size (p, MODE_INT); tree optype = build_nonstandard_integer_type (GET_MODE_PRECISION (m), uns0_p && uns1_p