File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1001,20 +1001,20 @@ static void findForkedSCEVs(
10011001 break ;
10021002 }
10031003
1004- Type *PtrTy = GEP->getPointerOperandType ();
1004+ Type *IntPtrTy = SE-> getEffectiveSCEVType ( GEP->getPointerOperandType () );
10051005
10061006 // Find the size of the type being pointed to. We only have a single
10071007 // index term (guarded above) so we don't need to index into arrays or
10081008 // structures, just get the size of the scalar value.
1009- const SCEV *Size = SE->getSizeOfExpr (PtrTy , SourceTy);
1009+ const SCEV *Size = SE->getSizeOfExpr (IntPtrTy , SourceTy);
10101010
10111011 for (auto [B, O] : zip (BaseScevs, OffsetScevs)) {
10121012 const SCEV *Base = get<0 >(B);
10131013 const SCEV *Offset = get<0 >(O);
10141014
10151015 // Scale up the offsets by the size of the type, then add to the bases.
10161016 const SCEV *Scaled =
1017- SE->getMulExpr (Size, SE->getTruncateOrSignExtend (Offset, PtrTy ));
1017+ SE->getMulExpr (Size, SE->getTruncateOrSignExtend (Offset, IntPtrTy ));
10181018 ScevList.emplace_back (SE->getAddExpr (Base, Scaled), NeedsFreeze);
10191019 }
10201020 break ;
You can’t perform that action at this time.
0 commit comments