[PATCH] D18593: [PowerPC] Front end improvements for vec_splat
amehsan via llvm-commits
llvm-commits at lists.llvm.org
Sat Apr 2 20:13:25 PDT 2016
amehsan added a comment.
On Friday I looked at this a little bit in rush. I looked into this more carefully again (including checking what IR we generate after the change for the testcase added). I think the implementation could be improved by using a built-in that accepts variable parameters (either an existing builtin or a new one). We do need to generate shufflevector instruction which requires constant parameters, but that can be done in CGBuiltin.cpp by calling Builder.CreateShuffleVector API. (There are multiple uses of this in CGBuiltin.cpp)
It is true that current implementation is a significant improvement over existing code, but that should not prevent us from generating better code when that is possible. (Unless the change is too complex or requires significant amount of extra work. But that is not the case here).
Also I grepped for existing uses of __builtin_shufflevector in the header files. I didn't check every single use, but in the fairly large number that I checked I did not find any use within a conditional statement such as switch case.
Repository:
rL LLVM
http://reviews.llvm.org/D18593
More information about the llvm-commits
mailing list