Message ID | 1469008295-28884-3-git-send-email-james.greenhalgh@arm.com |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp553670qga; Wed, 20 Jul 2016 02:52:33 -0700 (PDT) X-Received: by 10.66.26.70 with SMTP id j6mr53431430pag.24.1469008353568; Wed, 20 Jul 2016 02:52:33 -0700 (PDT) Return-Path: <gcc-patches-return-432036-patch=linaro.org@gcc.gnu.org> Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id v123si2561256pfv.188.2016.07.20.02.52.33 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Jul 2016 02:52:33 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-432036-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-432036-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-432036-patch=linaro.org@gcc.gnu.org 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:in-reply-to:references :mime-version:content-type; q=dns; s=default; b=U7UvjJjdEzWPNWqX BXMLjB9OrhIWBDpmm0MY+0RPrKG0MsKW6B2P/H04dadQMXtFWpC9m5eYByJ6kd56 Qgd3z1/abpiOw63VePiNwCTXxQCEhbFTWjqVToZssjDgJ6i2Tk/rNP8VPFfWnys1 3bSqxrX4iodfu2hSl9TJ3OUGNZY= 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:in-reply-to:references :mime-version:content-type; s=default; bh=zSV2drTNFsO0Vo11/Aq7ff V2N1k=; b=FE1uLCapSeQIM5DRjpRZIDYwZnVk6/NRo8PrYLVfnlGvmyX9aAf00p LT2XJXOcjKjr+inyBFMmv9898tnrbXkTitPO3MzCwUUidMHWjHsyrjZATwILKihA bgtrFbppLmgrTQmp8lfaaCS1cXnJK4Br9C/mblSIdoH1XWS5bMxGs= Received: (qmail 64143 invoked by alias); 20 Jul 2016 09:52:13 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: <gcc-patches.gcc.gnu.org> List-Unsubscribe: <mailto:gcc-patches-unsubscribe-patch=linaro.org@gcc.gnu.org> List-Archive: <http://gcc.gnu.org/ml/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-help@gcc.gnu.org> Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 64062 invoked by uid 89); 20 Jul 2016 09:52:12 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 spammy=gen_reg_rtx, 42146, 2016-07-20, circuit X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (207.82.80.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 20 Jul 2016 09:51:59 +0000 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01lp0214.outbound.protection.outlook.com [213.199.154.214]) (Using TLS) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-66-3Yw4utlLOZ6ccphr7mnW5w-1; Wed, 20 Jul 2016 10:51:54 +0100 Received: from DB3PR08CA0008.eurprd08.prod.outlook.com (10.161.51.146) by HE1PR08MB0666.eurprd08.prod.outlook.com (10.163.179.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.544.10; Wed, 20 Jul 2016 09:51:51 +0000 Received: from DB3FFO11FD023.protection.gbl (2a01:111:f400:7e04::146) by DB3PR08CA0008.outlook.office365.com (2a01:111:e400:503c::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.544.10 via Frontend Transport; Wed, 20 Jul 2016 09:51:51 +0000 Received: from nebula.arm.com (217.140.96.140) by DB3FFO11FD023.mail.protection.outlook.com (10.47.217.54) with Microsoft SMTP Server (TLS) id 15.1.523.9 via Frontend Transport; Wed, 20 Jul 2016 09:51:51 +0000 Received: from e107456-lin.cambridge.arm.com (10.1.2.79) by mail.arm.com (10.1.105.66) with Microsoft SMTP Server id 14.3.294.0; Wed, 20 Jul 2016 10:51:48 +0100 From: James Greenhalgh <james.greenhalgh@arm.com> To: <gcc-patches@gcc.gnu.org> CC: <nd@arm.com>, <richard.guenther@gmail.com>, <Ramana.Radhakrishnan@arm.com>, <bernds_cb1@t-online.de>, <ebotcazou@libertysurf.fr>, <steven@gcc.gnu.org>, <rep.dot.nop@gmail.com>, <law@redhat.com> Subject: [Patch RFC: 3/2 v3] Don't expand a conditional move between identical sources Date: Wed, 20 Jul 2016 10:51:34 +0100 Message-ID: <1469008295-28884-3-git-send-email-james.greenhalgh@arm.com> In-Reply-To: <1469008295-28884-1-git-send-email-james.greenhalgh@arm.com> References: <0f3c74c6-0c1b-f2df-77ce-a2ffc112583d@redhat.com> <1469008295-28884-1-git-send-email-james.greenhalgh@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:217.140.96.140; IPV:CAL; SCL:-1; CTRY:GB; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(438002)(199003)(377424004)(189002)(19580405001)(19580395003)(11100500001)(6806005)(5000100001)(4610100001)(92566002)(5890100001)(87936001)(8676002)(568964002)(586003)(2476003)(76176999)(50986999)(4326007)(36756003)(305945005)(2906002)(246002)(356003)(5003600100003)(7846002)(50226002)(7696003)(8936002)(512874002)(86362001)(229853001)(2351001)(106466001)(33646002)(77096005)(110136002)(189998001)(2950100001)(104016004)(84326002)(26826002); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR08MB0666; H:nebula.arm.com; FPR:; SPF:Pass; PTR:fw-tnat.cambridge.arm.com; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DB3FFO11FD023; 1:CMVh+Q841X5Nnlp7YiGMsmA39aAetzLqF6Iw/7lms2k6cDJorY2OT/VQNyjbLPxW7LUuiH4iePByO32CpVxhnhCtjCsyTYqpC4Z/Itf5Hd/aY99EPIb0NiKs4yZ77J+0M3TahksHnPJ63ZD9mYunlKv1oDbTGR6C2AmY6iNwS4PSUo+IJ0v/7h+A3Hug0rBJ6todCcHH1D1/cLx6Uj6w0lyfgtKDqf1CKzk5OzJ9dlb/qnoOejSnYR0EHlDam1+rOoGouKB25/Dgo/X22z27ieQzEGHhKf6hIdbiwm3sUTPhL40pEKMO0Bh35Xm1u+kCcvOEfneDPBrx8FjL5mr+67ouC4VOrcjwcd7ckBS5oc9eig1rC4+zRWFaTMvyf2g0L80JtWGqwYg4B7U/D1AmqByqEPwtbJBvbDqC1KhmMpejhaGBqrpJLywx9e1QolfHaYh+plU9EQPV8L++q7O31szlSh1uerlPdjFeCH5+hLzm22RuXthfxRUjT9+GWR7nfVLRc2mbQtoPYg5ddW3BoHt1QrwWK2zU34r+MeCTku3DRfrnLLs83UYxbrFuJM+pIswaEK0oiIAxJf+6+69gOQ== X-MS-Office365-Filtering-Correlation-Id: 43bf5c32-af9e-4965-6787-08d3b0837966 X-Microsoft-Exchange-Diagnostics: 1; HE1PR08MB0666; 2:DXAHvr/V8TSCrWe8ClsppvcohgbdZ4iXgIZfHAEitd6a+J/ZerHJ0K69dPFRMSl8opz4gO7+7pnaKWkI9Rgb1lZfc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UzGwAoXr2IhcNa9/p4zA00U4PtWLayr1Fq2DfTiGTj6CahSk3rkpqxH7ceF/Qa7Py9uc8ng+EvmCqEooWxmijl+dFeo+TIr8RRECfx0KvIkgAJ4wiKEfRNAHb+Y3yQ/D6AxgSSp9X2yXLjDoU6aY8pyfzSfW1Dhy1zLZRU/McTQ08UTNeNlQnRYsP5k91G2mXvNxkb8TdXDTZMCCXw/T3V0HacMRnEl6zstAKHNHVOWNybHEUpZzISodS3nMFGan/I56Awckm79UB/ZWHTC30Lp1d8cSR9kyE7ldAMMBVpmJNaAhEkPzxfO+W8HybAdNUxlQEBqt3qnISR27ctFJZenuaxjMZ0yx92rQ0sDx4cf0CeSI X-Microsoft-Exchange-Diagnostics: 1; HE1PR08MB0666; 31:6olpFZ9qUZr3ugpVu4nTze1sDogpg4f1efBHTxT/Fs95YN9NiOKFqOtaHUXx//rELhUasrHr2w+I7rVOd2oJYde9gdAuQ3J9Me0bYXMXtHw85DRhgt4C7AueAvemLuAn6LQVhH0JaG80k2oYt4i1JdKSvXSno112rZHuVSxTP3HOYDwQJZcCFa9rS4g1Khl6wmmpC9za1+e7tRfhzqI1PA==; 20:RXLF/nJnlOV/MQpsdAiLgiCuWqQmo/nrdeubjdcafvvLht4l/tOX1ihcq39tF1iCcjS7CuyPgiTAYm/Jg+hoLMeEIAM+zh1nG3fSzJp4arCpAP92qYTlTda4MU/4cqlBilNEHabWJJB64Wv4NnERrmHkw5D/RRlo2Mu0O4p4dT3ox17xV8SlLb+R8zYGLl9RyDGBVmv8DlNDbkxQnDlhKgZCtoe8FJOJF4w/MGtHYn3rLeBuiglN+Usw5rohJEg2 NoDisclaimer: True X-Microsoft-Antispam-PRVS: <HE1PR08MB066693BDFA8923BF48F7078584080@HE1PR08MB0666.eurprd08.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(180628864354917); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(102415321)(601004)(2401047)(13023025)(13024025)(13020025)(13013025)(5005006)(8121501046)(10201501046)(3002001)(6055026); SRVR:HE1PR08MB0666; BCL:0; PCL:0; RULEID:; SRVR:HE1PR08MB0666; X-Microsoft-Exchange-Diagnostics: 1; HE1PR08MB0666; 4:2QqK2mJTVNLgjxtyuT+E/rAxq2DQvpmxiuEwAlab+5Shp7nmLL1ssc7pjgz3Ml1+0E4xAAytSwVyJa1cMeyS4Ta2NGjvLg8RhWiM2ihwISQT547MVxFxyoh58QVeuDWYqWB3OjIgFjSVZcEIz2bvQ2dqRX0ZzKKnD+UwZCZNIqcMmAt+Iy+dSPjdaUVeFLEgziyo4j3udxWv2Rry97QNI4GvkUV6YBpViOvTH4gLdGeQ5ei3jUuReWY37Dza/mTBRznmaoJCTNBMv/TSl5+63d+kgt/3p3EwtEgV2wUYxWsoxxeLXbUaJ5w75Qx53ucewMnCvB6fHmdpK21DQY2x1o9D+qp89KrMdRWbfjl5pLle//iwEWOOPQGxszy2/oijMC5FCj8M7LVBm36zNTIcRABii+8dDF2V+k3PteQlerB+aXN3dTYNL3swCv8neqYrm0EdTJkNUvYD5+37qX0zrYckXQHRqEj8yVQW7GR86/0Rnm+4Kv4zKazbvzjMlWSb0XwS0HF9RUh6S7c/lL271Q== X-Forefront-PRVS: 000947967F X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR08MB0666; 23:T9LRke8xyEXBoKw58eQ8LSItMt3xS7j9NatvkgHQ7?= =?us-ascii?Q?ZOxmopMksV0xVi54XgWt96JPGPzW/QFhFPsVEX/HuirE/lpyVpMTwCnIdCav?= =?us-ascii?Q?3F+ua3uVMSOgklVRiw3aLTwqFwuBOgzTC6mFB5ND5/6vNaZaKO1xwFXSKEuX?= =?us-ascii?Q?R4MzzmJtAwZqhGPm1TTEAHXLubVE5I7YmdTj3iasAGI3oQXf0PuQoFTlZzxn?= =?us-ascii?Q?DGWQfGscKXuEj5KhNjrXq4OEqlMq3SkgL5uahGr5T2HQTNUWH/SdKMcoU008?= =?us-ascii?Q?exC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Gl8w=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; HE1PR08MB0666; 6:YmJdAyB7dwBCT1zW5vGFOColBA4pN8rX8K2JWrmDYxinpzQ0I5G5Oe7Iac8bvAIgnyqJe9vgoxN6Vs94hV+Lqz4BIha/wroW13cWy5fnWhKCqd/SZ+LHltgap/et4hwEqCI9GrtjFYzHVY3k07vlwF/12Xvu3oh3sznyXkvHlmLhx5EWxth0kAJkvMo11pawSYsnrCXYFcMWMc+7m4pjJYNfG6XGaHeCwtZJW2ZHljkr1EFYd9RRbL1QrCOEV33XLVLjLAkG8ouFqH1XesVFVfk9mJ5y8Hoy/LY45SmoY+fQvyb/mUjTnh50dxshZZ/Can7OxcZOPyomNeMje83RxA==; 5:koWvaU/KM0tpRfowmVvhyMs8At1NlcMIlaZTMLiRm8sIu8TaFJJu+zfMi6n0JPFUnH0mffHiF8nce1E18a2//jCJt8N6ahGZYqxCoph6hvH+WrQkmiuz3S+YtLPyVzt3odalBejSy34dju8rjAConQ==; 24:QR9SoR76kQ2haRCTFMGWvPfMgcVopNg34rB23bXJI5PKebwuCt6GUeG85H8axSTD3A82x3OabR4wyCtY3FHTgZD1m85sXMQXws0AcKYvBVQ=; 7:UaF3rrP+RcWQeOD+CSQoiR0fNGhbDqoPoSL7+YBZA/iQek5uievFCpEsoeVxtxhEWDvjiMziQtu0MT1cdkGGovJ5fe2wmbcyYN7c5gvOTU7a2frS2X/SUwbK7I7xOjJTwVgtuahBgKU4Mq6Q8rZZNKzwVHlEeG41M3tTDqXol4kfXJHlgCsJC7uK/Nj6PC8/fpE2bjKzmuW+83z01/GsVR5D8UEFi3oyXTWWTthxXPoSqWcheTD2saCeQFXTBhLb SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR08MB0666; 20:AYqbu19VcV17ht1uPA2MxONtyW4MSdWjAmwuuvOWgCGEHy75FfPofqCVNDHCjBloAjDFjiyLboINSUp3+m+H6hnBdDY5rFhq6+D/R70YfL34Um3W1q/TJahM7Q4kM6slM+QULCGHI3KpJef7axoHuu6ogw5Yvuiv9ikKFW7b4JY= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Jul 2016 09:51:51.0834 (UTC) X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[217.140.96.140]; Helo=[nebula.arm.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR08MB0666 X-MC-Unique: 3Yw4utlLOZ6ccphr7mnW5w-1 Content-Type: multipart/mixed; boundary="------------2.6.4.2.gae996d8" X-IsSubscribed: yes |
diff --git a/gcc/optabs.c b/gcc/optabs.c index 51e10e2..87b4f97 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -4214,6 +4214,17 @@ emit_conditional_move (rtx target, enum rtx_code code, rtx op0, rtx op1, enum insn_code icode; enum rtx_code reversed; + /* If the two source operands are identical, that's just a move. */ + + if (rtx_equal_p (op2, op3)) + { + if (!target) + target = gen_reg_rtx (mode); + + emit_move_insn (target, op3); + return target; + } + /* If one operand is constant, make it the second one. Only do this if the other operand is not constant as well. */