File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
llvm/lib/Transforms/InstCombine Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -544,12 +544,10 @@ Instruction *InstCombinerImpl::visitExtractElementInst(ExtractElementInst &EI) {
544544 } else if (auto *SVI = dyn_cast<ShuffleVectorInst>(I)) {
545545 // extractelt (shufflevector %v1, %v2, splat-mask) idx ->
546546 // extractelt %v1, splat-mask[0]
547- if (isa<VectorType>(SVI->getType ())) {
548- auto mask = SVI->getShuffleMask ();
549- if (mask[0 ] != -1 && all_equal (mask))
550- return ExtractElementInst::Create (SVI->getOperand (0 ),
551- Builder.getInt64 (mask[0 ]));
552- }
547+ auto mask = SVI->getShuffleMask ();
548+ if (mask[0 ] != -1 && all_equal (mask))
549+ return ExtractElementInst::Create (SVI->getOperand (0 ),
550+ Builder.getInt64 (mask[0 ]));
553551
554552 // If this is extracting an element from a shufflevector, figure out where
555553 // it came from and extract from the appropriate input element instead.
You can’t perform that action at this time.
0 commit comments