From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21582 invoked by alias); 21 Oct 2008 09:56:35 -0000 Received: (qmail 21409 invoked by uid 48); 21 Oct 2008 09:55:11 -0000 Date: Tue, 21 Oct 2008 09:56:00 -0000 Message-ID: <20081021095511.21408.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug target/37878] [4.4 regression] PPC64 ldu command generated with invalid offset In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jakub at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-10/txt/msg01319.txt.bz2 ------- Comment #4 from jakub at gcc dot gnu dot org 2008-10-21 09:55 ------- I think this is rs6000_legitimate_address at fault here, it shouldn't say it is valid memory address. In the: if (GET_CODE (x) == PRE_MODIFY block in that function, rs6000_legitimate_offset_address_p (mode, XEXP (x, 1), reg_ok_strict) is true because: 3649 if (mode == DFmode || mode == DDmode || !TARGET_POWERPC64) 3650 extra = 4; 3651 else if (offset & 3) 3652 return false; only checks the offset being multiple of 4 if not DFmode or DDmode. If that is correct, I think rs6000_legitimate_address should in the PRE_MODIFY case explicitly check that if offset is a constant that it is multiple of 4. -- jakub at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dje at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37878