[PATCH] D30810: Preserve vec3 type.
JinGu Kang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 14 16:24:29 PDT 2017
jaykang10 added a comment.
In https://reviews.llvm.org/D30810#701132, @ahatanak wrote:
> Actually, it's not a mis-compile. The record layout shows that there is a padding before field f2 and f2 starts at byte 16. So using "store <4 x float>" doesn't overwrite the field.
It depends on float3's alignment. I guess the float3's alignment is 16 on your target so there is a padding bytes before f2 to be aligned by 16. If you add __attribute__((packed)) on struct type, you could see overwrite.
More information about the cfe-commits