$OpenBSD: patch-lib_Target_AArch64_AArch64ISelLowering_cpp,v 1.2 2017/03/14 17:29:45 ajacoutot Exp $

Disable the Load Stack Guard for OpenBSD on AArch64.  We don't use it
on any other platform and it causes a segfault in combination with our
IR Stack Guard.

--- lib/Target/AArch64/AArch64ISelLowering.cpp.orig	Thu Mar  2 20:24:31 2017
+++ lib/Target/AArch64/AArch64ISelLowering.cpp	Thu Mar  2 21:34:58 2017
@@ -10483,7 +10483,7 @@ void AArch64TargetLowering::ReplaceNodeResults(
 }
 
 bool AArch64TargetLowering::useLoadStackGuardNode() const {
-  if (!Subtarget->isTargetAndroid())
+  if (!Subtarget->isTargetAndroid() && !Subtarget->isTargetOpenBSD())
     return true;
   return TargetLowering::useLoadStackGuardNode();
 }
