[CostModel] Fix long standing bug with reverse shuffle mask detection
Incorrect 'undef' mask index matching meant that broadcast shuffles could be detected as reverse shuffles llvm-svn: 289811
This commit is contained in:
@@ -92,7 +92,7 @@ CostModelAnalysis::runOnFunction(Function &F) {
|
||||
|
||||
static bool isReverseVectorMask(SmallVectorImpl<int> &Mask) {
|
||||
for (unsigned i = 0, MaskSize = Mask.size(); i < MaskSize; ++i)
|
||||
if (Mask[i] > 0 && Mask[i] != (int)(MaskSize - 1 - i))
|
||||
if (Mask[i] >= 0 && Mask[i] != (int)(MaskSize - 1 - i))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user