[llvm] r257247 - [RS4GC] Unify two asserts. NFC.
Manuel Jacob via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 8 19:08:50 PST 2016
Author: mjacob
Date: Fri Jan 8 21:08:49 2016
New Revision: 257247
URL: http://llvm.org/viewvc/llvm-project?rev=257247&view=rev
Log:
[RS4GC] Unify two asserts. NFC.
Modified:
llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp?rev=257247&r1=257246&r2=257247&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp Fri Jan 8 21:08:49 2016
@@ -364,10 +364,6 @@ static BaseDefiningValueResult findBaseD
/// 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
More information about the llvm-commits
mailing list