diff options
author | Chris Lattner <sabre@nondot.org> | 2003-02-28 19:21:40 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-02-28 19:21:40 +0000 |
commit | caadc93f7b3e950c16ff6cd497baffe7cadc1477 (patch) | |
tree | 07a678c612d9d4eab40122a14d2e82e38eaab9de /lib | |
parent | 2daba3bb1cb6090f38f2e0ce0a78d0b8fb682e4e (diff) | |
download | external_llvm-caadc93f7b3e950c16ff6cd497baffe7cadc1477.zip external_llvm-caadc93f7b3e950c16ff6cd497baffe7cadc1477.tar.gz external_llvm-caadc93f7b3e950c16ff6cd497baffe7cadc1477.tar.bz2 |
Fix bug: LICM/2003-02-28-PromoteDifferentType.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@5675 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/Scalar/LICM.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp index 534a073..334ede3 100644 --- a/lib/Transforms/Scalar/LICM.cpp +++ b/lib/Transforms/Scalar/LICM.cpp @@ -487,9 +487,15 @@ void LICM::findPromotableValuesInLoop( bool PointerOk = true; for (std::set<Value*>::const_iterator I =CurLBI->LoadedPointers.begin(), - E = CurLBI->LoadedPointers.end(); I != E; ++I) - if (AA->alias(V, ~0, *I, ~0) == AliasAnalysis::MayAlias) { + E = CurLBI->LoadedPointers.end(); PointerOk && I != E; ++I) + switch (AA->alias(V, ~0, *I, ~0)) { + case AliasAnalysis::MustAlias: + if (V->getType() != (*I)->getType()) + PointerOk = false; + break; + case AliasAnalysis::MayAlias: PointerOk = false; + case AliasAnalysis::NoAlias: break; } |