Note this patch is based on the infrastructure in patch https://reviews.llvm.org/D33053 . The vec_xxsldwi builtin is also missing from altivec.h. This has been requested by developers working on libvpx for VP9 support for Google ( PR: https://bugs.llvm.org/show_bug.cgi?id=32653). This patch implements the vec_xxsldwi builtin by using the existing shuffleVector instruction just in the FE. The implementation here is similar to vec_xxpermdi in the patch D33053.
And we currently won't emit XXSLDWI in the assembly, subsequent BE optimization work (see patch D33225) needed to identify the correct shuffles so that we can emit XXSLDWI.