New interface function is added to VectorUtils
authorElena Demikhovsky <elena.demikhovsky@intel.com>
Sun, 30 Aug 2015 07:28:18 +0000 (07:28 +0000)
committerElena Demikhovsky <elena.demikhovsky@intel.com>
Sun, 30 Aug 2015 07:28:18 +0000 (07:28 +0000)
Value *getSplatValue(Value *Val);

It complements the CreateVectorSplat(), which creates 2 instructions - insertelement and shuffle with all-zero mask.

The new function recognizes the pattern - insertelement+shuffle and returns the splat value (or nullptr).
It also returns a splat value form ConstantDataVector, for completeness.

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

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


No differences found