diff options
author | Sanjay Patel <spatel@rotateright.com> | 2019-04-08 13:28:29 +0000 |
---|---|---|
committer | Sanjay Patel <spatel@rotateright.com> | 2019-04-08 13:28:29 +0000 |
commit | b33938df7a4cff114ea0249f12bb507d41e8b654 (patch) | |
tree | 7e8fd18063f75a6cc552bde2ea17facdbb888a3e /llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp | |
parent | b4f1bfa65982804d0e34beffea2753783c9878c2 (diff) | |
download | bcm5719-llvm-b33938df7a4cff114ea0249f12bb507d41e8b654.tar.gz bcm5719-llvm-b33938df7a4cff114ea0249f12bb507d41e8b654.zip |
[InstCombine] remove overzealous assert for shuffles (PR41419)
As the TODO indicates, instsimplify could be improved.
Should fix:
https://bugs.llvm.org/show_bug.cgi?id=41419
llvm-svn: 357910
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp')
-rw-r--r-- | llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp b/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp index 665064c4c8d..28d5f187c3d 100644 --- a/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp +++ b/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp @@ -1353,8 +1353,8 @@ static Instruction *foldSelectShuffle(ShuffleVectorInst &Shuf, // Canonicalize to choose from operand 0 first. unsigned NumElts = Shuf.getType()->getVectorNumElements(); if (Shuf.getMaskValue(0) >= (int)NumElts) { - assert(!isa<UndefValue>(Shuf.getOperand(1)) && - "Not expecting undef shuffle operand with select mask"); + // TODO: Can we assert that both operands of a shuffle-select are not undef + // (otherwise, it would have been folded by instsimplify? Shuf.commute(); return &Shuf; } |