[X86] Simplify the code that calculates a scaled blend mask. We don't need a second loop.

llvm-svn: 291996
This commit is contained in:
Craig Topper 2017-01-14 04:29:15 +00:00
parent 1e33f12a7c
commit 9cc685a56e
1 changed files with 1 additions and 2 deletions

View File

@ -8368,8 +8368,7 @@ static SDValue lowerVectorShuffleAsBlend(const SDLoc &DL, MVT VT, SDValue V1,
uint64_t ScaledMask = 0;
for (int i = 0; i != Size; ++i)
if (BlendMask & (1ull << i))
for (int j = 0; j != Scale; ++j)
ScaledMask |= 1ull << (i * Scale + j);
ScaledMask |= ((1ull << Scale) - 1) << (i * Scale);
return ScaledMask;
};