diff options
author | Manuel Jacob <me@manueljacob.de> | 2016-01-09 03:08:49 +0000 |
---|---|---|
committer | Manuel Jacob <me@manueljacob.de> | 2016-01-09 03:08:49 +0000 |
commit | 0593cfd336dcc153b8bf834d84fc903dceffa228 (patch) | |
tree | dc0f93722d172b90b2964eb3e6ce55ca5f7391f2 /llvm/lib/Transforms | |
parent | c573316eee598fb33f5d64b7658155431736e705 (diff) | |
download | bcm5719-llvm-0593cfd336dcc153b8bf834d84fc903dceffa228.tar.gz bcm5719-llvm-0593cfd336dcc153b8bf834d84fc903dceffa228.zip |
[RS4GC] Unify two asserts. NFC.
llvm-svn: 257247
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp index 19d50dbc472..277ac8bea5c 100644 --- a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp +++ b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp @@ -364,10 +364,6 @@ static BaseDefiningValueResult findBaseDefiningValue(Value *I); /// particular element in 'I'. static BaseDefiningValueResult findBaseDefiningValueOfVector(Value *I) { - assert(I->getType()->isVectorTy() && - cast<VectorType>(I->getType())->getElementType()->isPointerTy() && - "Illegal to ask for the base pointer of a non-pointer type"); - // Each case parallels findBaseDefiningValue below, see that code for // detailed motivation. @@ -424,11 +420,11 @@ findBaseDefiningValueOfVector(Value *I) { /// (i.e. a PHI or Select of two derived pointers), or c) involves a change /// from pointer to vector type or back. static BaseDefiningValueResult findBaseDefiningValue(Value *I) { + assert(I->getType()->isPtrOrPtrVectorTy() && + "Illegal to ask for the base pointer of a non-pointer type"); + if (I->getType()->isVectorTy()) return findBaseDefiningValueOfVector(I); - - assert(I->getType()->isPointerTy() && - "Illegal to ask for the base pointer of a non-pointer type"); if (isa<Argument>(I)) // An incoming argument to the function is a base pointer |