File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
llvm/lib/Transforms/Vectorize Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -667,7 +667,8 @@ bool VectorCombine::foldInsExtFNeg(Instruction &I) {
667667
668668 auto *VecTy = cast<FixedVectorType>(I.getType ());
669669 auto *SrcVecTy = cast<FixedVectorType>(SrcVec->getType ());
670- if (SrcVecTy->getScalarType () != VecTy->getScalarType ())
670+ auto *ScalarTy = SrcVecTy->getScalarType ();
671+ if (ScalarTy != VecTy->getScalarType ())
671672 return false ;
672673
673674 // Ignore bogus insert/extract index.
@@ -681,8 +682,6 @@ bool VectorCombine::foldInsExtFNeg(Instruction &I) {
681682 SmallVector<int > Mask (NumElts);
682683 std::iota (Mask.begin (), Mask.end (), 0 );
683684 Mask[Index] = Index + NumElts;
684-
685- Type *ScalarTy = SrcVecTy->getScalarType ();
686685 InstructionCost OldCost =
687686 TTI.getArithmeticInstrCost (Instruction::FNeg, ScalarTy, CostKind) +
688687 TTI.getVectorInstrCost (I, VecTy, CostKind, Index);
You can’t perform that action at this time.
0 commit comments