diff options
| author | Chris Lattner <sabre@nondot.org> | 2008-12-29 00:16:12 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2008-12-29 00:16:12 +0000 |
| commit | 4163213750112adbff1e369a843025d8816dcabf (patch) | |
| tree | abeeded4cffa1c4242a64fd9f38e1aac14a23364 /llvm | |
| parent | 8810795b149beed2f665b896cabe933f0d0647f1 (diff) | |
| download | bcm5719-llvm-4163213750112adbff1e369a843025d8816dcabf.tar.gz bcm5719-llvm-4163213750112adbff1e369a843025d8816dcabf.zip | |
select constant exprs should have the same constraints as select instructions,
notably, they should support vectors and aggregates.
llvm-svn: 61462
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/VMCore/Constants.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/VMCore/Constants.cpp b/llvm/lib/VMCore/Constants.cpp index 5fc08dc900e..4e3b840c913 100644 --- a/llvm/lib/VMCore/Constants.cpp +++ b/llvm/lib/VMCore/Constants.cpp @@ -2111,9 +2111,7 @@ Constant *ConstantExpr::getCompare(unsigned short pred, Constant *ConstantExpr::getSelectTy(const Type *ReqTy, Constant *C, Constant *V1, Constant *V2) { - assert(C->getType() == Type::Int1Ty && "Select condition must be i1!"); - assert(V1->getType() == V2->getType() && "Select value types must match!"); - assert(V1->getType()->isFirstClassType() && "Cannot select aggregate type!"); + assert(!SelectInst::areInvalidOperands(C, V1, V2)&&"Invalid select operands"); if (ReqTy == V1->getType()) if (Constant *SC = ConstantFoldSelectInstruction(C, V1, V2)) |

