From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32585 invoked by alias); 5 May 2004 14:24:23 -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 32572 invoked by uid 48); 5 May 2004 14:24:22 -0000 Date: Wed, 05 May 2004 14:24:00 -0000 Message-ID: <20040505142422.32571.qmail@sources.redhat.com> From: "amodra at bigpond dot net dot au" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20040505053304.15289.amodra@bigpond.net.au> References: <20040505053304.15289.amodra@bigpond.net.au> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug target/15289] reload error with big-endian subregs X-Bugzilla-Reason: CC X-SW-Source: 2004-05/txt/msg00431.txt.bz2 List-Id: ------- Additional Comments From amodra at bigpond dot net dot au 2004-05-05 14:24 ------- This: (insn 16 15 17 0 (set (reg:SI 9 9 [129]) (zero_extend:SI (subreg:QI (reg:SI 0 0 [128]) 2))) 18 {*rs6000.md:508} (insn_list 13 (nil)) (nil)) gets turned into (insn 64 15 16 0 (set (reg:QI 10 10) (reg:QI 0 0)) -1 (nil) (nil)) (insn 16 64 17 0 (set (reg:SI 9 9 [129]) (zero_extend:SI (reg:QI 10 10))) 18 {*rs6000.md:508} (insn_list 13 (nil)) (nil)) Jan, http://gcc.gnu.org/ml/gcc-patches/2003-04/msg00882.html added the code to reload that made a reload necessary for (subreg:QI (reg:SI 0 0 [128]) 2) with the hunk *************** find_reloads (insn, replace, ind_levels, *** 2869,2874 **** --- 2876,2887 ---- if (GET_CODE (SUBREG_REG (operand)) == REG && REGNO (SUBREG_REG (operand)) < FIRST_PSEUDO_REGISTER) { + if (!subreg_offset_representable_p + (REGNO (SUBREG_REG (operand)), + GET_MODE (SUBREG_REG (operand)), + SUBREG_BYTE (operand), + GET_MODE (operand))) + force_reload = 1; offset += subreg_regno_offset (REGNO (SUBREG_REG (operand)), GET_MODE (SUBREG_REG (operand)), SUBREG_BYTE (operand), -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15289