Skip to content

Commit 3ba1eaa

Browse files
committed
Address review feedback
1 parent 0778c56 commit 3ba1eaa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2900,12 +2900,12 @@ Instruction *InstCombinerImpl::visitShuffleVectorInst(ShuffleVectorInst &SVI) {
29002900
if (Instruction *I = foldIdentityPaddedShuffles(SVI))
29012901
return I;
29022902

2903-
if (Constant *C = dyn_cast<Constant>(RHS)) {
2904-
if (SelectInst *SI = dyn_cast<SelectInst>(LHS)) {
2903+
if (match(RHS, m_Constant())) {
2904+
if (auto *SI = dyn_cast<SelectInst>(LHS)) {
29052905
if (Instruction *I = FoldOpIntoSelect(SVI, SI))
29062906
return I;
29072907
}
2908-
if (PHINode *PN = dyn_cast<PHINode>(LHS)) {
2908+
if (auto *PN = dyn_cast<PHINode>(LHS)) {
29092909
if (Instruction *I = foldOpIntoPhi(SVI, PN))
29102910
return I;
29112911
}

0 commit comments

Comments
 (0)