We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0778c56 commit 3ba1eaaCopy full SHA for 3ba1eaa
llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
@@ -2900,12 +2900,12 @@ Instruction *InstCombinerImpl::visitShuffleVectorInst(ShuffleVectorInst &SVI) {
2900
if (Instruction *I = foldIdentityPaddedShuffles(SVI))
2901
return I;
2902
2903
- if (Constant *C = dyn_cast<Constant>(RHS)) {
2904
- if (SelectInst *SI = dyn_cast<SelectInst>(LHS)) {
+ if (match(RHS, m_Constant())) {
+ if (auto *SI = dyn_cast<SelectInst>(LHS)) {
2905
if (Instruction *I = FoldOpIntoSelect(SVI, SI))
2906
2907
}
2908
- if (PHINode *PN = dyn_cast<PHINode>(LHS)) {
+ if (auto *PN = dyn_cast<PHINode>(LHS)) {
2909
if (Instruction *I = foldOpIntoPhi(SVI, PN))
2910
2911
0 commit comments