@@ -1245,23 +1245,19 @@ bool AccessAnalysis::createCheckForAccess(
12451245 assert (!RTCheckPtrs.empty () &&
12461246 " Must have some runtime-check pointer candidates" );
12471247
1248+ // RTCheckPtrs must have size 2 if there are forked pointers. Otherwise, there
1249+ // are no forked pointers; replaceSymbolicStridesSCEV in this case.
12481250 auto IsLoopInvariantOrAR =
12491251 [&SE, &TheLoop](const PointerIntPair<const SCEV *, 1 , bool > &P) {
12501252 return SE->isLoopInvariant (get<0 >(P), TheLoop) ||
12511253 isa<SCEVAddRecExpr>(get<0 >(P));
12521254 };
1253-
1254- // RTCheckPtrs must have size 2 if there are forked pointers. Otherwise, there
1255- // are no forked pointers; replaceSymbolicStridesSCEV in this case.
12561255 if (RTCheckPtrs.size () == 2 && all_of (RTCheckPtrs, IsLoopInvariantOrAR)) {
12571256 LLVM_DEBUG (dbgs () << " LAA: Found forked pointer: " << *Ptr << " \n " );
12581257 for (auto [Idx, Q] : enumerate(RTCheckPtrs))
12591258 LLVM_DEBUG (dbgs () << " \t (" << Idx << " ) " << *Q.getPointer () << " \n " );
12601259 } else {
1261- RTCheckPtrs.truncate (1 );
1262- RTCheckPtrs.front ().setPointer (
1263- replaceSymbolicStrideSCEV (PSE, StridesMap, Ptr));
1264- RTCheckPtrs.front ().setInt (false );
1260+ RTCheckPtrs = {{replaceSymbolicStrideSCEV (PSE, StridesMap, Ptr), false }};
12651261 }
12661262
12671263 // / Check whether all pointers can participate in a runtime bounds check. They
0 commit comments