From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15354 invoked by alias); 4 Nov 2004 17:20:53 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 15332 invoked by uid 48); 4 Nov 2004 17:20:51 -0000 Date: Thu, 04 Nov 2004 17:20:00 -0000 Message-ID: <20041104172051.15331.qmail@sourceware.org> From: "pinskia at gcc dot gnu dot org" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20041103222411.18293.steven@gcc.gnu.org> References: <20041103222411.18293.steven@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug middle-end/18293] Redundant copy operation introduced by expand X-Bugzilla-Reason: CC X-SW-Source: 2004-11/txt/msg00467.txt.bz2 List-Id: ------- Additional Comments From pinskia at gcc dot gnu dot org 2004-11-04 17:20 ------- I am testing this patch (which is a modified version of the one which you gave me), it should help -O0 compile time as we no longer have an extra INSN which gets removed right after the register allocator: Index: expmed.c =============================================================== ==== RCS file: /cvs/gcc/gcc/gcc/expmed.c,v retrieving revision 1.200 diff -u -p -r1.200 expmed.c --- expmed.c 21 Oct 2004 10:51:00 -0000 1.200 +++ expmed.c 4 Nov 2004 16:55:46 -0000 @@ -2638,7 +2638,10 @@ expand_mult_const (enum machine_mode mod } else if (alg->op[0] == alg_m) { - accum = copy_to_mode_reg (mode, op0); + if (REG_P (op0) && GET_MODE (op0) == mode && alg->ops == 2) + accum = op0; + else + accum = copy_to_mode_reg (mode, op0); val_so_far = 1; } else -- What |Removed |Added ---------------------------------------------------------------------------- CC| |pinskia at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18293