From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10300 invoked by alias); 24 Mar 2006 14:23:21 -0000 Received: (qmail 10241 invoked by uid 48); 24 Mar 2006 14:23:16 -0000 Date: Fri, 24 Mar 2006 14:23:00 -0000 Message-ID: <20060324142316.10240.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/26459] [4.1/4.2 Regression] gcc fails to build on powerpc e500-double targets In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "amodra at bigpond dot net dot au" 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 X-SW-Source: 2006-03/txt/msg02455.txt.bz2 List-Id: ------- Comment #15 from amodra at bigpond dot net dot au 2006-03-24 14:23 ------- Appears to be the peephole in rs6000.md immediately after this comment: ;; after inserting conditional returns we can sometimes have ;; unnecessary register moves. (subreg:DF (reg:DI 3 3 [128]) 0) is a valid gpc_reg_operand. Try this (totally untested) patch. Index: gcc/config/rs6000/rs6000.md =================================================================== --- gcc/config/rs6000/rs6000.md (revision 112347) +++ gcc/config/rs6000/rs6000.md (working copy) @@ -9771,18 +9771,20 @@ "operands[0] = widen_memory_access (operands[0], V2DFmode, 0); operands[1] = gen_rtx_REG (V2DFmode, REGNO (operands[1]));") -;; after inserting conditional returns we can sometimes have +;; After inserting conditional returns we can sometimes have ;; unnecessary register moves. Unfortunately we cannot have a ;; modeless peephole here, because some single SImode sets have early ;; clobber outputs. Although those sets expand to multi-ppc-insn ;; sequences, using get_attr_length here will smash the operands ;; array. Neither is there an early_cobbler_p predicate. +;; Disallow subregs for E500 so we don't munge frob_di_df_2. (define_peephole2 [(set (match_operand:DF 0 "gpc_reg_operand" "") (match_operand:DF 1 "any_operand" "")) (set (match_operand:DF 2 "gpc_reg_operand" "") (match_dup 0))] - "peep2_reg_dead_p (2, operands[0])" + "!(TARGET_E500_DOUBLE && GET_CODE (operands[2]) == SUBREG) + && peep2_reg_dead_p (2, operands[0])" [(set (match_dup 2) (match_dup 1))]) (define_peephole2 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26459