[PATCH] D30810: Preserve vec3 type.
JinGu Kang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 13 12:47:28 PDT 2017
jaykang10 added a comment.
In https://reviews.llvm.org/D30810#699428, @Anastasia wrote:
> Would you be able to update ScalarExprEmitter::VisitAsTypeExpr implementation accordingly to make things consistent?
Probably, No... the load/store with vec3 generates vec4 temporarily to be aligned but __builtin_astype needs to generate vec4 from vec3 or vice versa because spec allows it on 18.104.22.168. As we discussed on previous e-mails, we would need to add intrinsic function for __builtin_astype on llvm and add default behavior on llvm's codegen. It is beyond clang and I am not sure llvm's IR and codegen people allow it... If you have another idea or I missed something, please let me know.
More information about the cfe-commits