[PATCH] D30810: Preserve vec3 type.
JinGu Kang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 15 19:09:49 PDT 2017
jaykang10 added a comment.
> The motivation doesn't seem solid to me, who else is going to benefit from this flag? You also didn't explain why doing this transformation yourself (looking through the shuffle) on your downstream pass isn't enough for you. We generally try to avoid adding flags if not for a good reason.
If you turn on optimization with -O option, the shufflevector is gone on 'InstructionCombining' pass. I showed you the IR example and source code on previous comment. You could mention bitcast instead of shufflevector. The bitcast could be constant expression with global variables and it makes code dirty. I think Anastasia has already explained the motivation well on her comments. If you need something more, please let me know.
More information about the cfe-commits