From patchwork Thu Jul 15 20:35:15 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Tytgat X-Patchwork-Id: 59043 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]) by ozlabs.org (Postfix) with SMTP id B2442B6EF1 for ; Fri, 16 Jul 2010 06:30:31 +1000 (EST) Received: (qmail 19658 invoked by alias); 15 Jul 2010 20:30:30 -0000 Received: (qmail 19649 invoked by uid 22791); 15 Jul 2010 20:30:29 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_LOW, TW_YT X-Spam-Check-By: sourceware.org Received: from hel.is.scarlet.be (HELO hel.is.scarlet.be) (193.74.71.26) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 15 Jul 2010 20:30:24 +0000 Received: from hobbes (ip-83-134-173-144.dsl.scarlet.be [83.134.173.144]) by hel.is.scarlet.be (8.14.2/8.14.2) with ESMTP id o6FKULlD019584 for ; Thu, 15 Jul 2010 22:30:22 +0200 Date: Thu, 15 Jul 2010 21:35:15 +0100 From: John Tytgat To: gcc-patches@gcc.gnu.org Subject: [PATCH, ARM]: Remove superfluous test in arm_function_arg Message-ID: <678f613751.Jo@hobbes.bass-software.com> X-Organization: BASS User-Agent: Messenger-Pro/2.62 (MsgServe/2.05) (RISC-OS/6.21) POPstar/2.05 MIME-Version: 1.0 X-DCC-scarlet.be-Metrics: hel 20001; Body=1 Fuz1=1 Fuz2=1 X-IsSubscribed: yes 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 Attached patch removes in arm_function_arg() a superfluous test on one of its parameters as that test is already done at the beginning of the routine and the parameter doesn't change during the function. John Tytgat * config/arm/arm.c (arm_function_arg): Remove superfluous test. Please commit after positive review. John. Index: config/arm/arm.c =================================================================== --- config/arm/arm.c (revision 162199) +++ config/arm/arm.c (working copy) @@ -4479,10 +4479,6 @@ && arm_needs_doubleword_align (mode, type)) pcum->nregs++; - if (mode == VOIDmode) - /* Pick an arbitrary value for operand 2 of the call insn. */ - return const0_rtx; - /* Only allow splitting an arg between regs and memory if all preceding args were allocated to regs. For args passed by reference we only count the reference pointer. */