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

--- Comment #9 from Martin Jambor <jamborm at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #5)
> An interesting observation is that we clone sum32 for IPA-CP of n == 1024 but
> for some unknown reason figure Alignment of 'a' as unusable:

The function sum32 is not static, so it can be called from outside of
the current compilation unit with any alignment.  IPA-CP does not
clone for alignment, which was my deliberate decision because I found
it very difficult to reason about its profitability (I am opened to
suggestions in this area, of course).

Make it static or compile with -flto and you will get:

IPA lattices after all propagation:

Lattices:
  Node: main/35:
  Node: sum32/34:
    param [0]: VARIABLE
         ctxs: VARIABLE
         Alignment 64, misalignment 0
        AGGS VARIABLE
    param [1]: 1024 [from: 35(99000)] [loc_time: 0, loc_size: 0, prop_time: 0,
prop_size: 
0]
         ctxs: VARIABLE
         Alignment unusable (BOTTOM)
        AGGS VARIABLE

Reply via email to