Skip to content
  • Chandler Carruth's avatar
    Fix a somewhat surprising miscompile where code relying on an ABI · 903790ef
    Chandler Carruth authored
    alignment could lose it due to the alloca type moving down to a much
    smaller alignment guarantee.
    
    Now SROA will actively compute a proper alignment, factoring the target
    data, any explicit alignment, and the offset within the struct. This
    will in some cases lower the alignment requirements, but when we lower
    them below those of the type, we drop the alignment entirely to give
    freedom to the code generator to align it however is convenient.
    
    Thanks to Duncan for the lovely test case that pinned this down. =]
    
    llvm-svn: 164891
    903790ef
Loading