[X86, AVX] instcombine vperm2 intrinsics with zero inputs into shuffles
authorSanjay Patel <spatel@rotateright.com>
Tue, 24 Mar 2015 20:36:42 +0000 (20:36 +0000)
committerSanjay Patel <spatel@rotateright.com>
Tue, 24 Mar 2015 20:36:42 +0000 (20:36 +0000)
commit5e0ce9d13ad5b39c12b68e7af6cf946414bff170
tree46b7d0374c9c08854fdae7257d21a3411d481caf
parent71be19dff2711856104fbe70a4d6711e745f74e2
[X86, AVX] instcombine vperm2 intrinsics with zero inputs into shuffles

This is the IR optimizer follow-on patch for D8563: the x86 backend patch
that converts this kind of shuffle back into a vperm2.

This is also a continuation of the transform that started in D8486.
In that patch, Andrea suggested that we could convert vperm2 intrinsics that
use zero masks into a single shuffle.

This is an implementation of that suggestion.

Differential Revision: http://reviews.llvm.org/D8567

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@233110 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineCalls.cpp
test/Transforms/InstCombine/x86-vperm2.ll