From patchwork Wed Nov 20 14:00:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Sandiford X-Patchwork-Id: 292766 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)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id F41E52C0094 for ; Thu, 21 Nov 2013 01:02:33 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version:content-type; q=dns; s=default; b=l0UgzPPtY3kcMHdRA1LrDEGP1jNBT48oJbbdVDcUYLvnTZO2Zi WZ5rlRA7CXd9zSk9dKbxhxxaFc6px2Vc7TFZieugklzZnGWAry09R0eXNImlwrcP BhHpC3dV5eCwD6KH4WP/J4QBwyTeqPBAZzCEVoYf8fFfy13o30f2ch+8s= 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:from :to:cc:subject:date:message-id:mime-version:content-type; s= default; bh=s6k9qEqtPgUDUZtc9PwNaWN1Svg=; b=R8AuOBeqJ7i4hVZ+548s AmCu5w2lkcNKQUFIzr80xa1DtxMdzi/3lwpSzJvipuCDHptCqCdTdNa2RT/OV5Vp 5jHY1+PFS1h7x7RPJ8zpm+FXAlk1YUL3RSQpEoi7oAp1mEy55TAGEfv/2c/IfFsj RFMJZiKF50P2wyP8piRZnT8= Received: (qmail 19567 invoked by alias); 20 Nov 2013 14:02:19 -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 19553 invoked by uid 89); 20 Nov 2013 14:02:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.4 required=5.0 tests=AWL, BAYES_40, RDNS_NONE autolearn=no version=3.3.2 X-HELO: e06smtp12.uk.ibm.com Received: from Unknown (HELO e06smtp12.uk.ibm.com) (195.75.94.108) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 20 Nov 2013 14:02:16 +0000 Received: from /spool/local by e06smtp12.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 20 Nov 2013 14:02:07 -0000 Received: from d06dlp02.portsmouth.uk.ibm.com (9.149.20.14) by e06smtp12.uk.ibm.com (192.168.101.142) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 20 Nov 2013 14:02:05 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 7018B219005C for ; Wed, 20 Nov 2013 14:02:04 +0000 (GMT) Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by b06cxnps3075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id rAKE0aKU59113632 for ; Wed, 20 Nov 2013 14:00:36 GMT Received: from d06av02.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id rAKE0mWX016355 for ; Wed, 20 Nov 2013 07:00:48 -0700 Received: from sandifor-thinkpad.stglab.manchester.uk.ibm.com (sig-9-145-143-11.de.ibm.com [9.145.143.11]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id rAKE0Tsj015212 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Wed, 20 Nov 2013 07:00:41 -0700 From: Richard Sandiford To: gcc-patches@gcc.gnu.org Mail-Followup-To: gcc-patches@gcc.gnu.org, Kenneth Zadeck , Mike Stump , rsandifo@linux.vnet.ibm.com Cc: Kenneth Zadeck , Mike Stump Subject: [wide-int] Tweak an rs6000 test Date: Wed, 20 Nov 2013 14:00:27 +0000 Message-ID: <877gc3golg.fsf@sandifor-thinkpad.stglab.manchester.uk.ibm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 13112014-8372-0000-0000-000007D4A193 This test changes from TREE_INT_CST_LOW to TREE_INT_CST_ELT. I was going to change it back as part of the previous patch, but using wi:: seemed more robust. Only compile-tested so far because of problems with gcc110. OK for wide-int? Richard Index: gcc/config/rs6000/rs6000.c =================================================================== --- gcc/config/rs6000/rs6000.c 2013-11-20 11:26:05.996351099 +0000 +++ gcc/config/rs6000/rs6000.c 2013-11-20 11:43:37.896818266 +0000 @@ -12131,16 +12131,14 @@ rs6000_expand_ternop_builtin (enum insn_ /* Check whether the 2nd and 3rd arguments are integer constants and in range and prepare arguments. */ STRIP_NOPS (arg1); - if (TREE_CODE (arg1) != INTEGER_CST - || !IN_RANGE (TREE_INT_CST_ELT (arg1, 0), 0, 1)) + if (TREE_CODE (arg1) != INTEGER_CST || wi::geu_p (arg1, 2)) { error ("argument 2 must be 0 or 1"); return const0_rtx; } STRIP_NOPS (arg2); - if (TREE_CODE (arg2) != INTEGER_CST - || !IN_RANGE (TREE_INT_CST_ELT (arg2, 0), 0, 15)) + if (TREE_CODE (arg2) != INTEGER_CST || wi::geu_p (arg1, 16)) { error ("argument 3 must be in the range 0..15"); return const0_rtx;