From patchwork Fri May 22 20:17:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Law X-Patchwork-Id: 475780 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 8D8FA1402AD for ; Sat, 23 May 2015 06:17:41 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=CN9vZkrP; 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=aAamuGklp4a8BgPqGqieKBah2q8vDMg66b+C6UArvfahxn W9IINzFCByhtKIgQctxvKHf4je0wFwm/REI7AXlNUMmLvr57rk/p67uqhhRYzMkM fLJGG04Obi3iiCsiCLwDt1no6Ez9Ix+IGlFymKjiTJftuCj5FpwAeP8BUYbuk= 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=LAJwcYyfauTl0KZ/3r5fwPNlAzs=; b=CN9vZkrPORyIWWnw36eL BGyh5/c7pcYLvLBaQkICzwQFz9RsPKnEgvIlt3cCcomdvm/476iAe3RCUF1B/l1a oSUfe3LKXXmitsTRhk66JX83ESHpVC6Oftd69zK+O7o83+rOH/paPGrQecZCKvCq kwrdNK/k2h+NpE9N24ss01U= Received: (qmail 24686 invoked by alias); 22 May 2015 20:17:34 -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 24677 invoked by uid 89); 22 May 2015 20:17:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.3 required=5.0 tests=AWL, BAYES_20, KAM_LAZY_DOMAIN_SECURITY, MEDICAL_SUBJECT, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 22 May 2015 20:17:33 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t4MKHVQ4032608 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 22 May 2015 16:17:31 -0400 Received: from localhost.localdomain ([10.3.113.14]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t4MKHVFW025976 for ; Fri, 22 May 2015 16:17:31 -0400 Message-ID: <555F8EDB.80206@redhat.com> Date: Fri, 22 May 2015 14:17:31 -0600 From: Jeff Law User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: gcc-patches Subject: Fix pa.md splitters for recent combine changes X-IsSubscribed: yes These should have gone in with the first patch in the series. Thankfully the splitters aren't terribly important anymore and thus having them goof'd up for a couple days hasn't been a problem. In fact, much like the hppa_legitimize_address code to handle shift-add/scaled addressing modes, these splitters don't make a bit of difference in my 300+ testfiles -- again, these were probably in place for f2c translated code to avoid losing because the PA has integer indexed loads, but not integer indexed stores. Verified hppa.exp still passes and that the 300+ testfiles get the same code before/after this change. Installed on the trunk. Jeff * config/pa/pa.md (integer_indexed_store splitters): Use mem_shadd_operand. Use ASHIFT rather than MULT in the resulting insns -- adjusting the constant 2nd operand accordingly. diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index aaec27d..6cc7a3c 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -2819,42 +2819,54 @@ ;; a 2 insn store with some creative RTL rewriting. (define_split [(set (mem:SI (plus:SI (mult:SI (match_operand:SI 0 "register_operand" "") - (match_operand:SI 1 "shadd_operand" "")) + (match_operand:SI 1 "mem_shadd_operand" "")) (plus:SI (match_operand:SI 2 "register_operand" "") (match_operand:SI 3 "const_int_operand" "")))) (match_operand:SI 4 "register_operand" "")) (clobber (match_operand:SI 5 "register_operand" ""))] "" - [(set (match_dup 5) (plus:SI (mult:SI (match_dup 0) (match_dup 1)) + [(set (match_dup 5) (plus:SI (ashift:SI (match_dup 0) (match_dup 1)) (match_dup 2))) (set (mem:SI (plus:SI (match_dup 5) (match_dup 3))) (match_dup 4))] - "") + " +{ + operands[1] = GEN_INT (exact_log2 (INTVAL (operands[1]))); + +}") (define_split [(set (mem:HI (plus:SI (mult:SI (match_operand:SI 0 "register_operand" "") - (match_operand:SI 1 "shadd_operand" "")) + (match_operand:SI 1 "mem_shadd_operand" "")) (plus:SI (match_operand:SI 2 "register_operand" "") (match_operand:SI 3 "const_int_operand" "")))) (match_operand:HI 4 "register_operand" "")) (clobber (match_operand:SI 5 "register_operand" ""))] "" - [(set (match_dup 5) (plus:SI (mult:SI (match_dup 0) (match_dup 1)) + [(set (match_dup 5) (plus:SI (ashift:SI (match_dup 0) (match_dup 1)) (match_dup 2))) (set (mem:HI (plus:SI (match_dup 5) (match_dup 3))) (match_dup 4))] - "") + " +{ + operands[1] = GEN_INT (exact_log2 (INTVAL (operands[1]))); + +}") (define_split [(set (mem:QI (plus:SI (mult:SI (match_operand:SI 0 "register_operand" "") - (match_operand:SI 1 "shadd_operand" "")) + (match_operand:SI 1 "mem_shadd_operand" "")) (plus:SI (match_operand:SI 2 "register_operand" "") (match_operand:SI 3 "const_int_operand" "")))) (match_operand:QI 4 "register_operand" "")) (clobber (match_operand:SI 5 "register_operand" ""))] "" - [(set (match_dup 5) (plus:SI (mult:SI (match_dup 0) (match_dup 1)) + [(set (match_dup 5) (plus:SI (ashift:SI (match_dup 0) (match_dup 1)) (match_dup 2))) (set (mem:QI (plus:SI (match_dup 5) (match_dup 3))) (match_dup 4))] - "") + " +{ + operands[1] = GEN_INT (exact_log2 (INTVAL (operands[1]))); + +}") (define_expand "movhi" [(set (match_operand:HI 0 "general_operand" "")