diff options
author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2016-12-15 12:12:45 +0000 |
---|---|---|
committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2016-12-15 12:12:45 +0000 |
commit | 9876ed07f633af7702d4f06de8666a0a48c20fb6 (patch) | |
tree | d06576fc7ba7d99f65c7ca6996dc00e15d5eb269 /llvm/lib/Analysis/CostModel.cpp | |
parent | ec02b8d4c03e4c5cb9274fe35a1de1b80067ff2e (diff) | |
download | bcm5719-llvm-9876ed07f633af7702d4f06de8666a0a48c20fb6.tar.gz bcm5719-llvm-9876ed07f633af7702d4f06de8666a0a48c20fb6.zip |
[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
Diffstat (limited to 'llvm/lib/Analysis/CostModel.cpp')
-rw-r--r-- | llvm/lib/Analysis/CostModel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/CostModel.cpp b/llvm/lib/Analysis/CostModel.cpp index 5dd54cd4d19..70b3560808c 100644 --- a/llvm/lib/Analysis/CostModel.cpp +++ b/llvm/lib/Analysis/CostModel.cpp @@ -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; } |