File tree Expand file tree Collapse file tree 1 file changed +1
-9
lines changed
llvm/lib/Transforms/InstCombine Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -2635,17 +2635,9 @@ Instruction *InstCombinerImpl::visitShuffleVectorInst(ShuffleVectorInst &SVI) {
2635
2635
// If the result mask is equal to one of the original shuffle masks,
2636
2636
// or is a splat, do the replacement.
2637
2637
if (isSplat || newMask == LHSMask || newMask == RHSMask || newMask == Mask) {
2638
- SmallVector<Constant*, 16 > Elts;
2639
- for (unsigned i = 0 , e = newMask.size (); i != e; ++i) {
2640
- if (newMask[i] < 0 ) {
2641
- Elts.push_back (UndefValue::get (Int32Ty));
2642
- } else {
2643
- Elts.push_back (ConstantInt::get (Int32Ty, newMask[i]));
2644
- }
2645
- }
2646
2638
if (!newRHS)
2647
2639
newRHS = UndefValue::get (newLHS->getType ());
2648
- return new ShuffleVectorInst (newLHS, newRHS, ConstantVector::get (Elts) );
2640
+ return new ShuffleVectorInst (newLHS, newRHS, newMask );
2649
2641
}
2650
2642
2651
2643
return MadeChange ? &SVI : nullptr ;
You can’t perform that action at this time.
0 commit comments