diff --git a/llvm/lib/Target/ARM/ARMISelLowering.cpp b/llvm/lib/Target/ARM/ARMISelLowering.cpp --- a/llvm/lib/Target/ARM/ARMISelLowering.cpp +++ b/llvm/lib/Target/ARM/ARMISelLowering.cpp @@ -21106,7 +21106,10 @@ return InsertFencesForAtomic; } -bool ARMTargetLowering::useLoadStackGuardNode() const { return true; } +bool ARMTargetLowering::useLoadStackGuardNode() const { + // ROPI/RWPI are not supported currently. + return !Subtarget->isROPI() && !Subtarget->isRWPI(); +} void ARMTargetLowering::insertSSPDeclarations(Module &M) const { if (!Subtarget->getTargetTriple().isWindowsMSVCEnvironment())