From patchwork Wed Apr 29 08:57:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yvan Roux X-Patchwork-Id: 47704 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5B40420553 for ; Wed, 29 Apr 2015 08:57:58 +0000 (UTC) Received: by laat2 with SMTP id t2sf4926211laa.2 for ; Wed, 29 Apr 2015 01:57:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:mailing-list:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:sender :delivered-to:mime-version:date:message-id:subject:from:to :content-type:x-original-sender:x-original-authentication-results; bh=jltWy+JSHituutX4LAgWVT5qJ3jLBCQRTIqHkvCoYUM=; b=ADKLjsBwWKuVkLcq+sDpGXiGGnPkxk925e1lx0e+ISO6NeOD76cqmR0oo4DLshALKD 9EuLhshcnGfnQTPzieBjZFXhaLSlEoDuYYM18em7QSTD2MahRMu+aspODRFqwHcsWd2s mn5zO57DzZFU8OmGlhxgYDU6iZ0n+gfpxVBWULaOJF8MYrCy1J2pqhv6E3NTczEcpxg7 lrwJ6C601VQoM98Iv4Pqt5ZXGvGsUS6wSt8Wy8WGBrJZekYhsMn3Ime9kxhanZMhn7VD 235d1G/gZSw7iIycsi/+MjIgFXvuAW/uvMcELV7+ItMLqutPVKDjH1NZuWmkezLBEgTT 9UWQ== X-Gm-Message-State: ALoCoQny3X1JLL2qsDSuAylbuBvuoywMPXMs3KuipMTfQeXhnN8bJMP3vTQxaY7EsufCACx/Xx94 X-Received: by 10.112.29.39 with SMTP id g7mr12633662lbh.1.1430297877260; Wed, 29 Apr 2015 01:57:57 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.23.129 with SMTP id m1ls172501laf.76.gmail; Wed, 29 Apr 2015 01:57:57 -0700 (PDT) X-Received: by 10.112.167.73 with SMTP id zm9mr4976370lbb.89.1430297877117; Wed, 29 Apr 2015 01:57:57 -0700 (PDT) Received: from mail-la0-x230.google.com (mail-la0-x230.google.com. [2a00:1450:4010:c03::230]) by mx.google.com with ESMTPS id p11si13823276lal.92.2015.04.29.01.57.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Apr 2015 01:57:57 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::230 as permitted sender) client-ip=2a00:1450:4010:c03::230; Received: by layy10 with SMTP id y10so15034103lay.0 for ; Wed, 29 Apr 2015 01:57:57 -0700 (PDT) X-Received: by 10.152.2.227 with SMTP id 3mr11658535lax.73.1430297876938; Wed, 29 Apr 2015 01:57:56 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.67.65 with SMTP id l1csp2370043lbt; Wed, 29 Apr 2015 01:57:55 -0700 (PDT) X-Received: by 10.66.139.195 with SMTP id ra3mr39408824pab.21.1430297874891; Wed, 29 Apr 2015 01:57:54 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id ml1si38549918pab.24.2015.04.29.01.57.53 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Apr 2015 01:57:54 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-396299-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 39878 invoked by alias); 29 Apr 2015 08:57:38 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list 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 39866 invoked by uid 89); 29 Apr 2015 08:57:38 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-wi0-f182.google.com Received: from mail-wi0-f182.google.com (HELO mail-wi0-f182.google.com) (209.85.212.182) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Wed, 29 Apr 2015 08:57:37 +0000 Received: by widdi4 with SMTP id di4so171070108wid.0 for ; Wed, 29 Apr 2015 01:57:34 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.194.236.66 with SMTP id us2mr40910894wjc.54.1430297854044; Wed, 29 Apr 2015 01:57:34 -0700 (PDT) Received: by 10.28.4.204 with HTTP; Wed, 29 Apr 2015 01:57:33 -0700 (PDT) Date: Wed, 29 Apr 2015 10:57:33 +0200 Message-ID: Subject: [PATCH, ARM] Fix for pr65924 From: Yvan Roux To: "gcc-patches@gcc.gnu.org" , Kyrylo Tkachov X-IsSubscribed: yes X-Original-Sender: yvan.roux@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 2a00:1450:4010:c03::230 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@gcc.gnu.org X-Google-Group-Id: 836684582541 Hi, here is the patch for PR65924, only tested on the original testcase so far. Thanks Yvan gcc/ 2015-04-29 Yvan Roux PR target/65924 * config/arm/thumb2.md (*thumb2_addsi3_compare0_scratch): Fix operand number in type attribute expression. gcc/testsuite/ 2015-04-29 Yvan Roux PR target/65924 gcc.target/arm/pr65924.c: New test. diff --git a/gcc/config/arm/thumb2.md b/gcc/config/arm/thumb2.md index 4f9faac..2c91542 100644 --- a/gcc/config/arm/thumb2.md +++ b/gcc/config/arm/thumb2.md @@ -1305,7 +1305,7 @@ " [(set_attr "conds" "set") (set_attr "length" "2,4") - (set (attr "type") (if_then_else (match_operand 2 "const_int_operand" "") + (set (attr "type") (if_then_else (match_operand 1 "const_int_operand" "") (const_string "alus_imm") (const_string "alus_sreg")))] ) diff --git a/gcc/testsuite/gcc.target/arm/pr65924.c b/gcc/testsuite/gcc.target/arm/pr65924.c new file mode 100644 index 0000000..746749f --- /dev/null +++ b/gcc/testsuite/gcc.target/arm/pr65924.c @@ -0,0 +1,8 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -mthumb" } */ + +int a, b, c; +int fn1() { + if (b + a < 0) + c = 0; +}