stevewan added a comment.

In D109387#2987843 <https://reviews.llvm.org/D109387#2987843>, @rjmccall wrote:

> Oh, no, I don't think this is NFC.  It seems very likely that there's some 
> case where the behavior is distinguishable.  Maybe a typedef of a record with 
> an alignment attribute?
>
>   __attribute__((aligned(2), packed)) struct float4 { float x, y, z, w; };
>   typedef struct float4 float4typedef;
>   
>   struct {
>     float4typedef field; // presumably still eligible for alignment upgrade
>   };

Right, the behaviour difference is exactly what I'm trying to fix, silly me :). 
Though the diff isn't very obvious in the given example because ABIAlign equals 
to PreferredAlign in that particular case, the following test may provide a 
better exposure,

  struct __attribute__((aligned(2))) S { double x; };
  typedef struct S SS;




Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109387/new/

https://reviews.llvm.org/D109387

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to