@@ -2030,7 +2030,7 @@ bool llvm::promoteLoopAccessesToScalars(
20302030
20312031 bool DereferenceableInPH = false ;
20322032 bool StoreIsGuanteedToExecute = false ;
2033- bool LoadIsGuanteedToExecute = false ;
2033+ bool LoadIsGuaranteedToExecute = false ;
20342034 bool FoundLoadToPromote = false ;
20352035
20362036 // Goes from Unknown to either Safe or Unsafe, but can't switch between them.
@@ -2090,15 +2090,12 @@ bool llvm::promoteLoopAccessesToScalars(
20902090 FoundLoadToPromote = true ;
20912091
20922092 Align InstAlignment = Load->getAlign ();
2093- bool GuaranteedToExecute =
2094- SafetyInfo->isGuaranteedToExecute (*UI, DT, CurLoop);
2095- LoadIsGuanteedToExecute |= GuaranteedToExecute;
2093+ LoadIsGuaranteedToExecut |= SafetyInfo->isGuaranteedToExecute (*UI, DT, CurLoop);
20962094
20972095 // Note that proving a load safe to speculate requires proving
20982096 // sufficient alignment at the target location. Proving it guaranteed
20992097 // to execute does as well. Thus we can increase our guaranteed
21002098 // alignment as well.
2101-
21022099 if (!DereferenceableInPH || (InstAlignment > Alignment))
21032100 if (isSafeToExecuteUnconditionally (
21042101 *Load, DT, TLI, CurLoop, SafetyInfo, ORE,
@@ -2253,7 +2250,7 @@ bool llvm::promoteLoopAccessesToScalars(
22532250 PreheaderLoad->setOrdering (AtomicOrdering::Unordered);
22542251 PreheaderLoad->setAlignment (Alignment);
22552252 PreheaderLoad->setDebugLoc (DebugLoc ());
2256- if (AATags && LoadIsGuanteedToExecute )
2253+ if (AATags && LoadIsGuaranteedToExecute )
22572254 PreheaderLoad->setAAMetadata (AATags);
22582255
22592256 MemoryAccess *PreheaderLoadMemoryAccess = MSSAU.createMemoryAccessInBB (
0 commit comments