Skip to content

Commit d2ee975

Browse files
committed
Use mulit-element isa
1 parent d44901e commit d2ee975

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/Transforms/Vectorize/VectorCombine.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1772,9 +1772,8 @@ bool VectorCombine::foldShuffleToIdentity(Instruction &I) {
17721772
!cast<BinaryOperator>(Item[0].first)->isIntDivRem()) {
17731773
Worklist.push_back(GenerateInstLaneVectorFromOperand(Item, 0));
17741774
Worklist.push_back(GenerateInstLaneVectorFromOperand(Item, 1));
1775-
} else if (isa<UnaryOperator>(Item[0].first) ||
1776-
isa<TruncInst>(Item[0].first) || isa<ZExtInst>(Item[0].first) ||
1777-
isa<SExtInst>(Item[0].first)) {
1775+
} else if (isa<UnaryOperator, TruncInst, SExtInst, ZExtInst>(
1776+
Item[0].first)) {
17781777
Worklist.push_back(GenerateInstLaneVectorFromOperand(Item, 0));
17791778
} else if (auto *II = dyn_cast<IntrinsicInst>(Item[0].first);
17801779
II && isTriviallyVectorizable(II->getIntrinsicID())) {

0 commit comments

Comments
 (0)