From d01f50f42ce60207ed6d27fb1778e456d83be06c Mon Sep 17 00:00:00 2001 From: Nick Lewycky Date: Sun, 6 Mar 2011 03:36:19 +0000 Subject: ConstantInt has some getters which return ConstantInt's or ConstantVector's of the value splatted into every element. Extend this to getTrue and getFalse which by providing new overloads that take Types that are either i1 or . Use it in InstCombine to add vector support to some code, fixing PR8469! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127116 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Constants.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/llvm/Constants.h') diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h index 7da8e23..c12b33f 100644 --- a/include/llvm/Constants.h +++ b/include/llvm/Constants.h @@ -57,6 +57,8 @@ protected: public: static ConstantInt *getTrue(LLVMContext &Context); static ConstantInt *getFalse(LLVMContext &Context); + static Constant *getTrue(const Type *Ty); + static Constant *getFalse(const Type *Ty); /// If Ty is a vector type, return a Constant with a splat of the given /// value. Otherwise return a ConstantInt for the given value. -- cgit v1.1