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 d1d1af2 commit 2883558Copy full SHA for 2883558
llvm/lib/Transforms/Vectorize/VectorCombine.cpp
@@ -666,9 +666,9 @@ bool VectorCombine::foldInsExtFNeg(Instruction &I) {
666
return false;
667
668
auto *VecTy = cast<FixedVectorType>(I.getType());
669
- auto *SrcVecTy = cast<FixedVectorType>(SrcVec->getType());
+ auto *SrcVecTy = dyn_cast<FixedVectorType>(SrcVec->getType());
670
auto *ScalarTy = SrcVecTy->getScalarType();
671
- if (ScalarTy != VecTy->getScalarType())
+ if (!SrcVecTy || ScalarTy != SrcVecTy->getScalarType())
672
673
674
// Ignore bogus insert/extract index.
0 commit comments