Bug 1806221 - Adjust clang patches to upstream changes on trunk. r=firefox-build-system-reviewers,andi

Differential Revision: https://phabricator.services.mozilla.com/D164973
This commit is contained in:
Mike Hommey
2022-12-18 21:24:05 +00:00
parent 815c0a58f8
commit f395e84438

View File

@@ -68,10 +68,10 @@ index 046dd24d7332..b9a8a3a4eb52 100644
.. _never access memory or only read memory:
diff --git a/llvm/include/llvm/Analysis/AliasAnalysis.h b/llvm/include/llvm/Analysis/AliasAnalysis.h
index a6c7da910121..a2d65e53810a 100644
index 953e15e358f1..1b15d130967a 100644
--- a/llvm/include/llvm/Analysis/AliasAnalysis.h
+++ b/llvm/include/llvm/Analysis/AliasAnalysis.h
@@ -359,9 +359,7 @@ public:
@@ -375,9 +375,7 @@ public:
/// Checks whether the given location points to constant memory, or if
/// \p OrLocal is true whether it points to a local alloca.
@@ -82,7 +82,7 @@ index a6c7da910121..a2d65e53810a 100644
/// A convenience wrapper around the primary \c pointsToConstantMemory
/// interface.
@@ -374,22 +372,6 @@ public:
@@ -390,22 +388,6 @@ public:
/// \name Simple mod/ref information
/// @{
@@ -105,8 +105,8 @@ index a6c7da910121..a2d65e53810a 100644
/// Get the ModRef info associated with a pointer argument of a call. The
/// result's bits are set to indicate the allowed aliasing ModRef kinds. Note
/// that these bits do not necessarily account for the overall behavior of
@@ -536,8 +518,6 @@ public:
AAQueryInfo &AAQI);
@@ -555,8 +537,6 @@ public:
bool pointsToConstantMemory(const MemoryLocation &Loc, AAQueryInfo &AAQI,
bool OrLocal = false);
- ModRefInfo getModRefInfoMask(const MemoryLocation &Loc, AAQueryInfo &AAQI,
@@ -114,7 +114,7 @@ index a6c7da910121..a2d65e53810a 100644
ModRefInfo getModRefInfo(const Instruction *I, const CallBase *Call2,
AAQueryInfo &AAQIP);
ModRefInfo getModRefInfo(const CallBase *Call, const MemoryLocation &Loc,
@@ -605,10 +585,6 @@ public:
@@ -624,10 +604,6 @@ public:
bool pointsToConstantMemory(const MemoryLocation &Loc, bool OrLocal = false) {
return AA.pointsToConstantMemory(Loc, AAQI, OrLocal);
}
@@ -125,9 +125,9 @@ index a6c7da910121..a2d65e53810a 100644
ModRefInfo getModRefInfo(const Instruction *I,
const std::optional<MemoryLocation> &OptLoc) {
return AA.getModRefInfo(I, OptLoc, AAQI);
@@ -665,19 +641,16 @@ public:
virtual AliasResult alias(const MemoryLocation &LocA,
const MemoryLocation &LocB, AAQueryInfo &AAQI) = 0;
@@ -690,19 +666,16 @@ public:
const MemoryLocation &LocB, AAQueryInfo &AAQI,
const Instruction *CtxI) = 0;
+ /// Checks whether the given location points to constant memory, or if
+ /// \p OrLocal is true whether it points to a local alloca.
@@ -150,8 +150,8 @@ index a6c7da910121..a2d65e53810a 100644
/// Get the ModRef info associated with a pointer argument of a callsite. The
/// result's bits are set to indicate the allowed aliasing ModRef kinds. Note
/// that these bits do not necessarily account for the overall behavior of
@@ -726,9 +699,9 @@ public:
return Result.alias(LocA, LocB, AAQI);
@@ -751,9 +724,9 @@ public:
return Result.alias(LocA, LocB, AAQI, CtxI);
}
- ModRefInfo getModRefInfoMask(const MemoryLocation &Loc, AAQueryInfo &AAQI,
@@ -163,7 +163,7 @@ index a6c7da910121..a2d65e53810a 100644
}
ModRefInfo getArgModRefInfo(const CallBase *Call, unsigned ArgIdx) override {
@@ -781,9 +754,9 @@ public:
@@ -806,9 +779,9 @@ public:
return AliasResult::MayAlias;
}
@@ -177,10 +177,10 @@ index a6c7da910121..a2d65e53810a 100644
ModRefInfo getArgModRefInfo(const CallBase *Call, unsigned ArgIdx) {
diff --git a/llvm/include/llvm/Analysis/BasicAliasAnalysis.h b/llvm/include/llvm/Analysis/BasicAliasAnalysis.h
index a2909f46e3ba..8f4a8d4a8d8b 100644
index a2735f039a01..397692694322 100644
--- a/llvm/include/llvm/Analysis/BasicAliasAnalysis.h
+++ b/llvm/include/llvm/Analysis/BasicAliasAnalysis.h
@@ -75,15 +75,9 @@ public:
@@ -73,15 +73,9 @@ public:
ModRefInfo getModRefInfo(const CallBase *Call1, const CallBase *Call2,
AAQueryInfo &AAQI);
@@ -200,13 +200,13 @@ index a2909f46e3ba..8f4a8d4a8d8b 100644
/// Get the location associated with a pointer argument of a callsite.
ModRefInfo getArgModRefInfo(const CallBase *Call, unsigned ArgIdx);
diff --git a/llvm/include/llvm/Analysis/ObjCARCAliasAnalysis.h b/llvm/include/llvm/Analysis/ObjCARCAliasAnalysis.h
index 790fbaf07e7f..ba8b28a5adda 100644
index 1a154c648fe6..ef162ece8a32 100644
--- a/llvm/include/llvm/Analysis/ObjCARCAliasAnalysis.h
+++ b/llvm/include/llvm/Analysis/ObjCARCAliasAnalysis.h
@@ -52,8 +52,8 @@ public:
AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB,
AAQueryInfo &AAQI);
AAQueryInfo &AAQI, const Instruction *CtxI);
- ModRefInfo getModRefInfoMask(const MemoryLocation &Loc, AAQueryInfo &AAQI,
- bool IgnoreLocals);
+ bool pointsToConstantMemory(const MemoryLocation &Loc, AAQueryInfo &AAQI,
@@ -215,25 +215,25 @@ index 790fbaf07e7f..ba8b28a5adda 100644
using AAResultBase::getMemoryEffects;
MemoryEffects getMemoryEffects(const Function *F);
diff --git a/llvm/include/llvm/Analysis/TypeBasedAliasAnalysis.h b/llvm/include/llvm/Analysis/TypeBasedAliasAnalysis.h
index 791ec65990e2..2e7af99ed495 100644
index 36dd39c033aa..84a2a6a2fdac 100644
--- a/llvm/include/llvm/Analysis/TypeBasedAliasAnalysis.h
+++ b/llvm/include/llvm/Analysis/TypeBasedAliasAnalysis.h
@@ -40,8 +40,8 @@ public:
AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB,
AAQueryInfo &AAQI);
AAQueryInfo &AAQI, const Instruction *CtxI);
- ModRefInfo getModRefInfoMask(const MemoryLocation &Loc, AAQueryInfo &AAQI,
- bool IgnoreLocals);
+ bool pointsToConstantMemory(const MemoryLocation &Loc, AAQueryInfo &AAQI,
+ bool OrLocal);
MemoryEffects getMemoryEffects(const CallBase *Call, AAQueryInfo &AAQI);
MemoryEffects getMemoryEffects(const Function *F);
ModRefInfo getModRefInfo(const CallBase *Call, const MemoryLocation &Loc,
diff --git a/llvm/lib/Analysis/AliasAnalysis.cpp b/llvm/lib/Analysis/AliasAnalysis.cpp
index 4f27acade05a..6b8ad367b54e 100644
index 9e24f6b87bdb..5e27808cfdb3 100644
--- a/llvm/lib/Analysis/AliasAnalysis.cpp
+++ b/llvm/lib/Analysis/AliasAnalysis.cpp
@@ -147,25 +147,19 @@ AliasResult AAResults::alias(const MemoryLocation &LocA,
@@ -146,25 +146,19 @@ AliasResult AAResults::alias(const MemoryLocation &LocA,
return Result;
}
@@ -268,7 +268,7 @@ index 4f27acade05a..6b8ad367b54e 100644
}
ModRefInfo AAResults::getArgModRefInfo(const CallBase *Call, unsigned ArgIdx) {
@@ -254,11 +248,10 @@ ModRefInfo AAResults::getModRefInfo(const CallBase *Call,
@@ -253,11 +247,10 @@ ModRefInfo AAResults::getModRefInfo(const CallBase *Call,
Result &= ArgMR | OtherMR;
@@ -283,7 +283,7 @@ index 4f27acade05a..6b8ad367b54e 100644
return Result;
}
@@ -496,11 +489,9 @@ ModRefInfo AAResults::getModRefInfo(const StoreInst *S,
@@ -495,11 +488,9 @@ ModRefInfo AAResults::getModRefInfo(const StoreInst *S,
if (AR == AliasResult::NoAlias)
return ModRefInfo::NoModRef;
@@ -298,7 +298,7 @@ index 4f27acade05a..6b8ad367b54e 100644
return ModRefInfo::NoModRef;
}
@@ -511,11 +502,10 @@ ModRefInfo AAResults::getModRefInfo(const StoreInst *S,
@@ -510,11 +501,10 @@ ModRefInfo AAResults::getModRefInfo(const StoreInst *S,
ModRefInfo AAResults::getModRefInfo(const FenceInst *S,
const MemoryLocation &Loc,
AAQueryInfo &AAQI) {
@@ -314,7 +314,7 @@ index 4f27acade05a..6b8ad367b54e 100644
return ModRefInfo::ModRef;
}
@@ -529,9 +519,10 @@ ModRefInfo AAResults::getModRefInfo(const VAArgInst *V,
@@ -528,9 +518,10 @@ ModRefInfo AAResults::getModRefInfo(const VAArgInst *V,
if (AR == AliasResult::NoAlias)
return ModRefInfo::NoModRef;
@@ -327,7 +327,7 @@ index 4f27acade05a..6b8ad367b54e 100644
}
// Otherwise, a va_arg reads and writes.
@@ -542,9 +533,10 @@ ModRefInfo AAResults::getModRefInfo(const CatchPadInst *CatchPad,
@@ -541,9 +532,10 @@ ModRefInfo AAResults::getModRefInfo(const CatchPadInst *CatchPad,
const MemoryLocation &Loc,
AAQueryInfo &AAQI) {
if (Loc.Ptr) {
@@ -340,7 +340,7 @@ index 4f27acade05a..6b8ad367b54e 100644
}
// Otherwise, a catchpad reads and writes.
@@ -555,9 +547,10 @@ ModRefInfo AAResults::getModRefInfo(const CatchReturnInst *CatchRet,
@@ -554,9 +546,10 @@ ModRefInfo AAResults::getModRefInfo(const CatchReturnInst *CatchRet,
const MemoryLocation &Loc,
AAQueryInfo &AAQI) {
if (Loc.Ptr) {
@@ -354,10 +354,10 @@ index 4f27acade05a..6b8ad367b54e 100644
// Otherwise, a catchret reads and writes.
diff --git a/llvm/lib/Analysis/BasicAliasAnalysis.cpp b/llvm/lib/Analysis/BasicAliasAnalysis.cpp
index 2bbc2486fec0..fa03a82f78b2 100644
index 1ea1d4196f80..edf46664139e 100644
--- a/llvm/lib/Analysis/BasicAliasAnalysis.cpp
+++ b/llvm/lib/Analysis/BasicAliasAnalysis.cpp
@@ -676,46 +676,33 @@ BasicAAResult::DecomposeGEPExpression(const Value *V, const DataLayout &DL,
@@ -678,46 +678,33 @@ BasicAAResult::DecomposeGEPExpression(const Value *V, const DataLayout &DL,
return Decomposed;
}
@@ -414,7 +414,7 @@ index 2bbc2486fec0..fa03a82f78b2 100644
continue;
}
@@ -731,20 +718,16 @@ ModRefInfo BasicAAResult::getModRefInfoMask(const MemoryLocation &Loc,
@@ -733,20 +720,16 @@ ModRefInfo BasicAAResult::getModRefInfoMask(const MemoryLocation &Loc,
if (const PHINode *PN = dyn_cast<PHINode>(V)) {
// Don't bother inspecting phi nodes with many operands.
if (PN->getNumIncomingValues() > MaxLookup)
@@ -439,10 +439,10 @@ index 2bbc2486fec0..fa03a82f78b2 100644
static bool isIntrinsicCall(const CallBase *Call, Intrinsic::ID IID) {
diff --git a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
index f0446b21e288..d9bae54b05be 100644
index 2340015d6517..6a0b123f0b8f 100644
--- a/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
+++ b/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
@@ -525,7 +525,7 @@ MemDepResult MemoryDependenceResults::getSimplePointerDependencyFrom(
@@ -524,7 +524,7 @@ MemDepResult MemoryDependenceResults::getSimplePointerDependencyFrom(
}
// Stores don't alias loads from read-only memory.
@@ -452,10 +452,10 @@ index f0446b21e288..d9bae54b05be 100644
// Stores depend on may/must aliased loads.
diff --git a/llvm/lib/Analysis/MemorySSA.cpp b/llvm/lib/Analysis/MemorySSA.cpp
index 1660321990bf..461886650261 100644
index 0e6a12261e23..c2e2c8d9ec0f 100644
--- a/llvm/lib/Analysis/MemorySSA.cpp
+++ b/llvm/lib/Analysis/MemorySSA.cpp
@@ -378,10 +378,9 @@ static bool isUseTriviallyOptimizableToLiveOnEntry(AliasAnalysisType &AA,
@@ -375,10 +375,9 @@ static bool isUseTriviallyOptimizableToLiveOnEntry(BatchAAResults &AA,
const Instruction *I) {
// If the memory can't be changed, then loads of the memory can't be
// clobbered.
@@ -469,10 +469,10 @@ index 1660321990bf..461886650261 100644
}
diff --git a/llvm/lib/Analysis/ObjCARCAliasAnalysis.cpp b/llvm/lib/Analysis/ObjCARCAliasAnalysis.cpp
index 93d56931d01c..76f6a74384b4 100644
index 1ccf792d2f8c..dd9eae428b0a 100644
--- a/llvm/lib/Analysis/ObjCARCAliasAnalysis.cpp
+++ b/llvm/lib/Analysis/ObjCARCAliasAnalysis.cpp
@@ -68,29 +68,28 @@ AliasResult ObjCARCAAResult::alias(const MemoryLocation &LocA,
@@ -69,29 +69,28 @@ AliasResult ObjCARCAAResult::alias(const MemoryLocation &LocA,
return AliasResult::MayAlias;
}
@@ -512,7 +512,7 @@ index 93d56931d01c..76f6a74384b4 100644
MemoryEffects ObjCARCAAResult::getMemoryEffects(const Function *F) {
diff --git a/llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp b/llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp
index b7121ea8326b..8360246915e4 100644
index 529f3a76d23e..077fbdbe821c 100644
--- a/llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp
+++ b/llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp
@@ -385,23 +385,23 @@ AliasResult TypeBasedAAResult::alias(const MemoryLocation &LocA,
@@ -547,11 +547,11 @@ index b7121ea8326b..8360246915e4 100644
MemoryEffects TypeBasedAAResult::getMemoryEffects(const CallBase *Call,
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp b/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp
index e97c993f4b25..dd3eb3849eac 100644
index 8155c895e366..1dd91f2b0be8 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.cpp
@@ -124,19 +124,54 @@ AliasResult AMDGPUAAResult::alias(const MemoryLocation &LocA,
return AAResultBase::alias(LocA, LocB, AAQI);
return AAResultBase::alias(LocA, LocB, AAQI, nullptr);
}
-ModRefInfo AMDGPUAAResult::getModRefInfoMask(const MemoryLocation &Loc,
@@ -612,13 +612,13 @@ index e97c993f4b25..dd3eb3849eac 100644
+ return AAResultBase::pointsToConstantMemory(Loc, AAQI, OrLocal);
}
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.h b/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.h
index acd437e8987c..db2372d911b1 100644
index 8ce7000222fa..140ed12a8f6d 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.h
+++ b/llvm/lib/Target/AMDGPU/AMDGPUAliasAnalysis.h
@@ -38,8 +38,8 @@ public:
AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB,
AAQueryInfo &AAQI);
AAQueryInfo &AAQI, const Instruction *CtxI);
- ModRefInfo getModRefInfoMask(const MemoryLocation &Loc, AAQueryInfo &AAQI,
- bool IgnoreLocals);
+ bool pointsToConstantMemory(const MemoryLocation &Loc, AAQueryInfo &AAQI,
@@ -627,10 +627,10 @@ index acd437e8987c..db2372d911b1 100644
/// Analysis pass providing a never-invalidated alias analysis result.
diff --git a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
index a187cb1e4790..932feea044b3 100644
index 3f61dbe3354e..cfbceebf66d4 100644
--- a/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
+++ b/llvm/lib/Transforms/IPO/FunctionAttrs.cpp
@@ -140,14 +140,13 @@ static MemoryEffects checkFunctionMemoryAccess(Function &F, bool ThisBody,
@@ -138,14 +138,13 @@ static MemoryEffects checkFunctionMemoryAccess(Function &F, bool ThisBody,
ME |= MemoryEffects::argMemOnly(ModRefInfo::ModRef);
auto AddLocAccess = [&](const MemoryLocation &Loc, ModRefInfo MR) {
@@ -649,7 +649,7 @@ index a187cb1e4790..932feea044b3 100644
ME |= MemoryEffects::argMemOnly(MR);
return;
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
index 3df5af6ac517..5adb898f2607 100644
index bd3db4534a85..8fad7e8195c8 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
@@ -135,7 +135,7 @@ Instruction *InstCombinerImpl::SimplifyAnyMemTransfer(AnyMemTransferInst *MI) {
@@ -661,7 +661,7 @@ index 3df5af6ac517..5adb898f2607 100644
// Set the size of the copy to 0, it will be deleted on the next iteration.
MI->setLength(Constant::getNullValue(MI->getLength()->getType()));
return MI;
@@ -252,7 +252,7 @@ Instruction *InstCombinerImpl::SimplifyAnyMemSet(AnyMemSetInst *MI) {
@@ -253,7 +253,7 @@ Instruction *InstCombinerImpl::SimplifyAnyMemSet(AnyMemSetInst *MI) {
// If we have a store to a location which is known constant, we can conclude
// that the store must be storing the constant value (else the memory
// wouldn't be constant), and this must be a noop.
@@ -671,7 +671,7 @@ index 3df5af6ac517..5adb898f2607 100644
MI->setLength(Constant::getNullValue(MI->getLength()->getType()));
return MI;
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp b/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
index c4efd0301711..9acfa612bc27 100644
index 65074c87bdf3..5fe95c9e3088 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp
@@ -31,20 +31,20 @@ using namespace PatternMatch;
@@ -700,7 +700,7 @@ index c4efd0301711..9acfa612bc27 100644
SmallVector<PointerIntPair<Value *, 1, bool>, 35> ValuesToInspect;
ValuesToInspect.emplace_back(V, false);
@@ -131,8 +131,8 @@ isOnlyCopiedFromConstantMemory(AAResults *AA, AllocaInst *V,
@@ -130,8 +130,8 @@ isOnlyCopiedFromConstantMemory(AAResults *AA, AllocaInst *V,
// If the memintrinsic isn't using the alloca as the dest, reject it.
if (U.getOperandNo() != 0) return false;
@@ -711,7 +711,7 @@ index c4efd0301711..9acfa612bc27 100644
return false;
// Otherwise, the transform is safe. Remember the copy instruction.
@@ -142,10 +142,9 @@ isOnlyCopiedFromConstantMemory(AAResults *AA, AllocaInst *V,
@@ -141,10 +141,9 @@ isOnlyCopiedFromConstantMemory(AAResults *AA, AllocaInst *V,
return true;
}
@@ -725,7 +725,7 @@ index c4efd0301711..9acfa612bc27 100644
static MemTransferInst *
isOnlyCopiedFromConstantMemory(AAResults *AA,
AllocaInst *AI,
@@ -399,11 +398,11 @@ Instruction *InstCombinerImpl::visitAllocaInst(AllocaInst &AI) {
@@ -400,11 +399,11 @@ Instruction *InstCombinerImpl::visitAllocaInst(AllocaInst &AI) {
}
// Check to see if this allocation is only modified by a memcpy/memmove from
@@ -742,7 +742,7 @@ index c4efd0301711..9acfa612bc27 100644
SmallVector<Instruction *, 4> ToDelete;
if (MemTransferInst *Copy = isOnlyCopiedFromConstantMemory(AA, &AI, ToDelete)) {
Value *TheSrc = Copy->getSource();
@@ -1379,7 +1378,7 @@ Instruction *InstCombinerImpl::visitStoreInst(StoreInst &SI) {
@@ -1381,7 +1380,7 @@ Instruction *InstCombinerImpl::visitStoreInst(StoreInst &SI) {
// If we have a store to a location which is known constant, we can conclude
// that the store must be storing the constant value (else the memory
// wouldn't be constant), and this must be a noop.
@@ -752,10 +752,10 @@ index c4efd0301711..9acfa612bc27 100644
// Do really simple DSE, to catch cases where there are several consecutive
diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp
index 001937cc1670..cddee7d3eb07 100644
index d3739f31bc57..11b96af0a30e 100644
--- a/llvm/lib/Transforms/Scalar/LICM.cpp
+++ b/llvm/lib/Transforms/Scalar/LICM.cpp
@@ -1161,7 +1161,7 @@ bool llvm::canSinkOrHoistInst(Instruction &I, AAResults *AA, DominatorTree *DT,
@@ -1160,7 +1160,7 @@ bool llvm::canSinkOrHoistInst(Instruction &I, AAResults *AA, DominatorTree *DT,
// Loads from constant memory are always safe to move, even if they end up
// in the same alias set as something that ends up being modified.
@@ -765,10 +765,10 @@ index 001937cc1670..cddee7d3eb07 100644
if (LI->hasMetadata(LLVMContext::MD_invariant_load))
return true;
diff --git a/llvm/lib/Transforms/Scalar/LoopPredication.cpp b/llvm/lib/Transforms/Scalar/LoopPredication.cpp
index 1e4060abeb88..36b0020b9ce9 100644
index 0492ed5cdb1c..8dd9f0144941 100644
--- a/llvm/lib/Transforms/Scalar/LoopPredication.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopPredication.cpp
@@ -569,7 +569,7 @@ bool LoopPredication::isLoopInvariantValue(const SCEV* S) {
@@ -570,7 +570,7 @@ bool LoopPredication::isLoopInvariantValue(const SCEV* S) {
if (const SCEVUnknown *U = dyn_cast<SCEVUnknown>(S))
if (const auto *LI = dyn_cast<LoadInst>(U->getValue()))
if (LI->isUnordered() && L->hasLoopInvariantOperands(LI))