This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: PR target/64905: unsigned short is loaded with 4-byte load (movl)

On Wed, Feb 4, 2015 at 2:21 PM, Uros Bizjak <> wrote:
> On Mon, Feb 2, 2015 at 10:39 PM, H.J. Lu <> wrote:
>> This patch fixes a long standing bug where aligned_operand ignores
>> alignment of memory operand less than 32 bits.  It drops address
>> decomposition and returns false if alignment of memory operand less
>> is than 32 bits. Tested on Linux/x86-64.   OK for trunk, 4.9 and 4.8
>> branches?
> Can you please find some references in gcc mainlig lists why and for
> what reason is the predicate written in the current way? Are there
> some (older?) processors that require this approach, so a tuning flag
> should be used here?

After some more thinking, it looks the failure is due to:


The testcase forces the pointer to %rbp (== HARD_FRAME_POINTER_REGNUM
in the above line), so the predicate thinks that the value is aligned,
since %rbp has its REGNO_POINTER_ALIGN set to STACK_BOUNDARY.

Looks like generic RTL infrastructure problem to me, the
REGNO_POINTER_ALIGNMENT of hard_frame_pointer should be cleared when
H_F_P is omitted and reused.

Please let's move discussion back to the PR.

Adding CC.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]