From patchwork Mon Feb 3 11:39:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kyrylo Tkachov X-Patchwork-Id: 316131 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 AA6CE2C0091 for ; Mon, 3 Feb 2014 22:39:36 +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 :message-id:date:from:mime-version:to:cc:subject:content-type; q=dns; s=default; b=eM4P9bGnRp6yKIBQ17miHJyJAs9e93lnjVerZK09U2D hDpALA2LxMcvCInKSrqpgjfqZDuYFbVrlAeEQ7auPkkk008I5b7EUWZs60+HjvkM 885WjILUbiJqAwV9G/HYEXgDYYk7cdVmbh+BYHeA6LXt92JMM+gJvWHigyQUmNXM = 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:cc:subject:content-type; s=default; bh=ef4goD2yVszGV7WJxD6LwjWRXWg=; b=gginP9G83Zj6WmJlR it402TYf18zUHKCrhODqXCAC5d5Q4ZkG98H6WBuTipwEartmC3ATfnZrw6OqCgUU UJ2CQkiR7lcnU+V+X/7miXRBNJPCA1K1PcG7s85iPMupTGJnx5ppOa8lp52JgqQW xKHH0Hj1nStCjE3cScqN6o03yg= Received: (qmail 16082 invoked by alias); 3 Feb 2014 11:39:30 -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 16070 invoked by uid 89); 3 Feb 2014 11:39:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: service87.mimecast.com Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 03 Feb 2014 11:39:28 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Mon, 03 Feb 2014 11:39:26 +0000 Received: from [10.1.208.24] ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 3 Feb 2014 11:39:25 +0000 Message-ID: <52EF7FEC.4080109@arm.com> Date: Mon, 03 Feb 2014 11:39:24 +0000 From: Kyrill Tkachov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130804 Thunderbird/17.0.8 MIME-Version: 1.0 To: GCC Patches CC: Ramana Radhakrishnan , Richard Earnshaw Subject: [PATCH][ARM] Adjust thumb2_movhi_insn patter X-MC-Unique: 114020311392609801 X-IsSubscribed: yes Hi all, This patch updates the thumb2_movhi_insn pattern for the -mrestrict-it rules. I had somehow missed it when doing the -mrestrict-it work last year, and it is possible to generate a deprecated IT block form in ARMv8 Thumb2 codegen without this patch. Tested arm-none-eabi and bootstrapped on arm-none-linux-gnueabihf. Ok for trunk? Thanks, Kyrill 2014-02-03 Kyrylo Tkachov * config/arm/thumb2.md (*thumb2_movhi_insn): Add alternatives for arm_restrict_it. diff --git a/gcc/config/arm/thumb2.md b/gcc/config/arm/thumb2.md index 4f247f8..d84938f 100644 --- a/gcc/config/arm/thumb2.md +++ b/gcc/config/arm/thumb2.md @@ -317,20 +317,24 @@ ;; Thumb-2 always has load/store halfword instructions, so we can avoid a lot ;; of the messiness associated with the ARM patterns. (define_insn "*thumb2_movhi_insn" - [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,m,r") - (match_operand:HI 1 "general_operand" "rI,n,r,m"))] + [(set (match_operand:HI 0 "nonimmediate_operand" "=r,r,l,r,m,r") + (match_operand:HI 1 "general_operand" "r,I,Py,n,r,m"))] "TARGET_THUMB2 && (register_operand (operands[0], HImode) || register_operand (operands[1], HImode))" "@ mov%?\\t%0, %1\\t%@ movhi + mov%?\\t%0, %1\\t%@ movhi + mov%?\\t%0, %1\\t%@ movhi movw%?\\t%0, %L1\\t%@ movhi str%(h%)\\t%1, %0\\t%@ movhi ldr%(h%)\\t%0, %1\\t%@ movhi" - [(set_attr "type" "mov_imm,mov_reg,store1,load1") + [(set_attr "type" "mov_reg,mov_imm,mov_imm,mov_reg,store1,load1") (set_attr "predicable" "yes") - (set_attr "pool_range" "*,*,*,4094") - (set_attr "neg_pool_range" "*,*,*,250")] + (set_attr "predicable_short_it" "yes,no,yes,no,no,no") + (set_attr "length" "2,4,2,4,4,4") + (set_attr "pool_range" "*,*,*,*,*,4094") + (set_attr "neg_pool_range" "*,*,*,*,*,250")] ) (define_insn "*thumb2_storewb_pairsi"