[Bug target/91043] GCC produces unaligned vmovdqa vector data access

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Jul 2 07:48:00 GMT 2019


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

--- Comment #21 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Hanoch Haim from comment #19)
> After some investigation, I think it is not a gcc issue,  please verify. 
> One of the internal object does not include a 64B alignment.
> 
> #define __rte_cache_aligned __attribute__((__aligned__(64)));
> 
> class CTimeHistogram {
> 
> } __rte_cache_aligned;
> 
> 
> class CCPortLatency {
> public:
>      CTimeHistogram  m_hist;  
> } __rte_cache_aligned;  <<= without this, it is not aligned while the code
> generation assumed it is aligned !
> 
> class Root {
> 
> 	CCPortLatency port;
> 
> } __rte_cache_aligned;
> 
> 
> Is it valid? why the code generation assumed the CCPortLatency is aligned
> because one of its internal is aligned?

Of course it does, because without aligning the container you cannot have
aligned members.  Maximum alignment always propagates outwards.


More information about the Gcc-bugs mailing list