[InstCombine, ARM, AArch64] Convert table lookup to shuffle vector

Turning a table lookup intrinsic into a shuffle vector instruction
can be beneficial. If the mask used for the lookup is the constant
vector {7,6,5,4,3,2,1,0}, then the back-end generates byte reverse
instructions instead.

Differential Revision: https://reviews.llvm.org/D46133

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333550 91177308-0d34-0410-b5e6-96231b3b80d8
3 files changed