From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4041 invoked by alias); 2 Feb 2015 18:55:48 -0000 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 Received: (qmail 3902 invoked by uid 48); 2 Feb 2015 18:55:45 -0000 From: "hjl.tools at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/64905] unsigned short is loaded with 4-byte load (movl) Date: Mon, 02 Feb 2015 18:55:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: hjl.tools at gmail dot com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 5.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status cf_reconfirmed_on cc component target_milestone everconfirmed Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-02/txt/msg00148.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64905 H.J. Lu changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2015-02-02 CC| |ubizjak at gmail dot com Component|translation |target Target Milestone|--- |5.0 Ever confirmed|0 |1 --- Comment #1 from H.J. Lu --- aligned_operand has if (MEM_ALIGN (op) >= 32) return true; op = XEXP (op, 0); /* Pushes and pops are only valid on the stack pointer. */ if (GET_CODE (op) == PRE_DEC || GET_CODE (op) == POST_INC) return true; /* Decode the address. */ ok = ix86_decompose_address (op, &parts); gcc_assert (ok); if (parts.base && GET_CODE (parts.base) == SUBREG) parts.base = SUBREG_REG (parts.base); if (parts.index && GET_CODE (parts.index) == SUBREG) parts.index = SUBREG_REG (parts.index); /* Look for some component that isn't known to be aligned. */ if (parts.index) { if (REGNO_POINTER_ALIGN (REGNO (parts.index)) * parts.scale < 32) return false; } if (parts.base) { if (REGNO_POINTER_ALIGN (REGNO (parts.base)) < 32) return false; } if (parts.disp) { if (!CONST_INT_P (parts.disp) || (INTVAL (parts.disp) & 3)) return false; } /* Didn't find one -- this must be an aligned address. */ return true; It returns true for (mem:HI (reg/f:DI 6 bp [orig:90 *a_p_2(D) ] [90]) [2 *_3+0 S2 A16]) Why do we need to decompose address when we have MEM_ALIGN (op)?