setcond instructions don't have aliasing implications.
authorChris Lattner <sabre@nondot.org>
Fri, 27 Feb 2004 18:09:25 +0000 (18:09 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 27 Feb 2004 18:09:25 +0000 (18:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11919 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/IPO/GlobalOpt.cpp

index 8f6cbbdfda6ad0fda767a28005994f639655e2e4..c30ec5f47c196875a74b5026de3751b1ff2885a4 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "llvm/Transforms/IPO.h"
 #include "llvm/Constants.h"
-#include "llvm/iMemory.h"
+#include "llvm/Instructions.h"
 #include "llvm/Module.h"
 #include "llvm/Pass.h"
 #include "Support/Debug.h"
@@ -57,7 +57,7 @@ static bool isStoredThrough(Value *V) {
     } else if (Instruction *I = dyn_cast<Instruction>(*UI)) {
       if (I->getOpcode() == Instruction::GetElementPtr) {
         if (isStoredThrough(I)) return true;
-      } else if (!isa<LoadInst>(*UI))
+      } else if (!isa<LoadInst>(*UI) && !isa<SetCondInst>(*UI))
         return true;  // Any other non-load instruction might store!
     } else {
       // Otherwise must be a global or some other user.