From 1c018c2ad03e224519a7fbb09a42697fb1f1bfdd Mon Sep 17 00:00:00 2001
From: David Majnemer <david.majnemer@gmail.com>
Date: Thu, 10 Sep 2015 18:50:09 +0000
Subject: [PATCH] [IR] Conservatively mark 'catchpad' as accessing memory

The exact semantics of 'catchpad' are really in the hands of the
personality routine so we shouldn't assume that they have no side
effects.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247322 91177308-0d34-0410-b5e6-96231b3b80d8
---
 lib/IR/Instruction.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/IR/Instruction.cpp b/lib/IR/Instruction.cpp
index 908e79039b5..91ac83c10d4 100644
--- a/lib/IR/Instruction.cpp
+++ b/lib/IR/Instruction.cpp
@@ -414,6 +414,7 @@ bool Instruction::mayReadFromMemory() const {
   case Instruction::Fence: // FIXME: refine definition of mayReadFromMemory
   case Instruction::AtomicCmpXchg:
   case Instruction::AtomicRMW:
+  case Instruction::CatchPad:
   case Instruction::CatchRet:
   case Instruction::TerminatePad:
     return true;
@@ -436,6 +437,7 @@ bool Instruction::mayWriteToMemory() const {
   case Instruction::VAArg:
   case Instruction::AtomicCmpXchg:
   case Instruction::AtomicRMW:
+  case Instruction::CatchPad:
   case Instruction::CatchRet:
   case Instruction::TerminatePad:
     return true;
-- 
2.34.1