On Wed, Feb 4, 2015 at 2:21 PM, Uros Bizjak <ubiz...@gmail.com> wrote: > On Mon, Feb 2, 2015 at 10:39 PM, H.J. Lu <hongjiu...@intel.com> 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: emit-rtl.c: REGNO_POINTER_ALIGN (HARD_FRAME_POINTER_REGNUM) = STACK_BOUNDARY; 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. Uros.