Index: lib/Target/AArch64/AArch64ISelLowering.cpp =================================================================== --- lib/Target/AArch64/AArch64ISelLowering.cpp +++ lib/Target/AArch64/AArch64ISelLowering.cpp @@ -10470,7 +10470,8 @@ } bool AArch64TargetLowering::useLoadStackGuardNode() const { - if (Subtarget->isTargetAndroid() || Subtarget->isTargetFuchsia()) + if (Subtarget->isTargetAndroid() || Subtarget->isTargetFuchsia() || + Subtarget->isTargetOpenBSD()) return TargetLowering::useLoadStackGuardNode(); return true; } Index: lib/Target/AArch64/AArch64Subtarget.h =================================================================== --- lib/Target/AArch64/AArch64Subtarget.h +++ lib/Target/AArch64/AArch64Subtarget.h @@ -237,6 +237,7 @@ bool isTargetWindows() const { return TargetTriple.isOSWindows(); } bool isTargetAndroid() const { return TargetTriple.isAndroid(); } bool isTargetFuchsia() const { return TargetTriple.isOSFuchsia(); } + bool isTargetOpenBSD() const { return TargetTriple.isOSOpenBSD(); } bool isTargetCOFF() const { return TargetTriple.isOSBinFormatCOFF(); } bool isTargetELF() const { return TargetTriple.isOSBinFormatELF(); }