diff options
author | Chris Lattner <sabre@nondot.org> | 2002-09-03 20:09:49 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-09-03 20:09:49 +0000 |
commit | 252030e86b4cd252eadf702356ff3a7951247276 (patch) | |
tree | b874a9ce9fd4d6e9ac05aa5ac144b0cbf34db1ab /lib/VMCore/ConstantFold.cpp | |
parent | 8617b3579bffb6d04bbeeac45b4eea591047595f (diff) |
Implement setcc for booleans. Fixes bug:
test/Regression/Transforms/ConstProp/2002-09-03-SetCC-Bools.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3576 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/ConstantFold.cpp')
-rw-r--r-- | lib/VMCore/ConstantFold.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/VMCore/ConstantFold.cpp b/lib/VMCore/ConstantFold.cpp index 5115ede9a1..185468e878 100644 --- a/lib/VMCore/ConstantFold.cpp +++ b/lib/VMCore/ConstantFold.cpp @@ -254,6 +254,10 @@ struct EmptyRules : public TemplateRules<Constant, EmptyRules> { // struct BoolRules : public TemplateRules<ConstantBool, BoolRules> { + static ConstantBool *LessThan(const ConstantBool *V1, const ConstantBool *V2){ + return ConstantBool::get(V1->getValue() < V2->getValue()); + } + static Constant *And(const ConstantBool *V1, const ConstantBool *V2) { return ConstantBool::get(V1->getValue() & V2->getValue()); } |