@@ -2030,7 +2030,7 @@ bool llvm::promoteLoopAccessesToScalars(
2030
2030
2031
2031
bool DereferenceableInPH = false ;
2032
2032
bool StoreIsGuanteedToExecute = false ;
2033
- bool LoadIsGuanteedToExecute = false ;
2033
+ bool LoadIsGuaranteedToExecute = false ;
2034
2034
bool FoundLoadToPromote = false ;
2035
2035
2036
2036
// Goes from Unknown to either Safe or Unsafe, but can't switch between them.
@@ -2090,15 +2090,12 @@ bool llvm::promoteLoopAccessesToScalars(
2090
2090
FoundLoadToPromote = true ;
2091
2091
2092
2092
Align InstAlignment = Load->getAlign ();
2093
- bool GuaranteedToExecute =
2094
- SafetyInfo->isGuaranteedToExecute (*UI, DT, CurLoop);
2095
- LoadIsGuanteedToExecute |= GuaranteedToExecute;
2093
+ LoadIsGuaranteedToExecut |= SafetyInfo->isGuaranteedToExecute (*UI, DT, CurLoop);
2096
2094
2097
2095
// Note that proving a load safe to speculate requires proving
2098
2096
// sufficient alignment at the target location. Proving it guaranteed
2099
2097
// to execute does as well. Thus we can increase our guaranteed
2100
2098
// alignment as well.
2101
-
2102
2099
if (!DereferenceableInPH || (InstAlignment > Alignment))
2103
2100
if (isSafeToExecuteUnconditionally (
2104
2101
*Load, DT, TLI, CurLoop, SafetyInfo, ORE,
@@ -2253,7 +2250,7 @@ bool llvm::promoteLoopAccessesToScalars(
2253
2250
PreheaderLoad->setOrdering (AtomicOrdering::Unordered);
2254
2251
PreheaderLoad->setAlignment (Alignment);
2255
2252
PreheaderLoad->setDebugLoc (DebugLoc ());
2256
- if (AATags && LoadIsGuanteedToExecute )
2253
+ if (AATags && LoadIsGuaranteedToExecute )
2257
2254
PreheaderLoad->setAAMetadata (AATags);
2258
2255
2259
2256
MemoryAccess *PreheaderLoadMemoryAccess = MSSAU.createMemoryAccessInBB (
0 commit comments