diff options
author | Philip Reames <listmail@philipreames.com> | 2016-01-29 02:23:10 +0000 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2016-01-29 02:23:10 +0000 |
commit | 10e678d25a4f9c851a54318c3b855747c50939a4 (patch) | |
tree | 3165134d10778bb113e435ca6b34fd3f319dfe1a | |
parent | c112c1be6937b4d9cfa13403056ad32bbeb7f1b3 (diff) | |
download | bcm5719-llvm-10e678d25a4f9c851a54318c3b855747c50939a4.tar.gz bcm5719-llvm-10e678d25a4f9c851a54318c3b855747c50939a4.zip |
[GVN] Add clarifying assert [NFCI]
Just adding an assert which makes invariants between AnalyzeLoadsFromClobberingLoads and GetLoadValueForLoad slightly more clear.
llvm-svn: 259145
-rw-r--r-- | llvm/lib/Transforms/Scalar/GVN.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/GVN.cpp b/llvm/lib/Transforms/Scalar/GVN.cpp index 23a30433ce7..67be6c6e53f 100644 --- a/llvm/lib/Transforms/Scalar/GVN.cpp +++ b/llvm/lib/Transforms/Scalar/GVN.cpp @@ -1109,6 +1109,11 @@ static int AnalyzeLoadFromClobberingLoad(Type *LoadTy, Value *LoadPtr, LoadBase, LoadOffs, LoadSize, DepLI); if (Size == 0) return -1; + // Check non-obvious conditions enforced by MDA which we rely on for being + // able to materialize this potentially available value + assert(DepLI->isSimple() && "Cannot widen volatile/atomic load!"); + assert(DepLI->getType()->isIntegerTy() && "Can't widen non-integer load"); + return AnalyzeLoadFromClobberingWrite(LoadTy, LoadPtr, DepPtr, Size*8, DL); } |