https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84486

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
             Status|UNCONFIRMED                 |ASSIGNED
           Keywords|                            |missed-optimization
   Last reconfirmed|                            |2018-02-27
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot 
gnu.org
     Ever confirmed|0                           |1
            Summary|code hoisting removes       |[7/8 Regression] code
                   |alignment assumption        |hoisting removes alignment
                   |                            |assumption
   Target Milestone|---                         |7.4

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.  We're just hoisting the __builtin_assume_aligned call here but when
inserting it we do not apply its effect to the LHS.  That's originally done
by the CCP pass only btw. but there's no further CCP instance after PRE.

Note PRE cannot easily transfer possibly conditional information along with
the expressions it moves.

The easiest fix^Whack would be to special-case BUILTIN_ASSUME_ALIGNED when
inserting the hoisted call in create_expression_by_pieces...

Reply via email to