summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2013-01-15 16:43:00 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2013-01-15 16:43:00 +0000
commitc9bd35b143ca7a14c344e2e3b7e5a9c8be9545ef (patch)
treecc429493e569477d4425587a23aafb16bf8f924a /llvm
parenta31e58b2dfe6b572c7e89c014d949d086c407066 (diff)
downloadbcm5719-llvm-c9bd35b143ca7a14c344e2e3b7e5a9c8be9545ef.tar.gz
bcm5719-llvm-c9bd35b143ca7a14c344e2e3b7e5a9c8be9545ef.zip
Allow vectors in CreatePointerCast.
Both underlying IR operations support vectors of pointers already. llvm-svn: 172538
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/IR/Instructions.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/IR/Instructions.cpp b/llvm/lib/IR/Instructions.cpp
index 26398ce8515..aba0fc92f24 100644
--- a/llvm/lib/IR/Instructions.cpp
+++ b/llvm/lib/IR/Instructions.cpp
@@ -2386,11 +2386,11 @@ CastInst *CastInst::CreatePointerCast(Value *S, Type *Ty,
CastInst *CastInst::CreatePointerCast(Value *S, Type *Ty,
const Twine &Name,
Instruction *InsertBefore) {
- assert(S->getType()->isPointerTy() && "Invalid cast");
- assert((Ty->isIntegerTy() || Ty->isPointerTy()) &&
+ assert(S->getType()->isPtrOrPtrVectorTy() && "Invalid cast");
+ assert((Ty->isIntOrIntVectorTy() || Ty->isPtrOrPtrVectorTy()) &&
"Invalid cast");
- if (Ty->isIntegerTy())
+ if (Ty->isIntOrIntVectorTy())
return Create(Instruction::PtrToInt, S, Ty, Name, InsertBefore);
return Create(Instruction::BitCast, S, Ty, Name, InsertBefore);
}
OpenPOWER on IntegriCloud