From 07507a4ccb0833a0620003ebf2f32ac6d48d7cb0 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 3 Sep 2002 20:09:49 +0000 Subject: Implement setcc for booleans. Fixes bug: test/Regression/Transforms/ConstProp/2002-09-03-SetCC-Bools.ll llvm-svn: 3576 --- llvm/lib/VMCore/ConstantHandling.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'llvm/lib/VMCore/ConstantHandling.cpp') diff --git a/llvm/lib/VMCore/ConstantHandling.cpp b/llvm/lib/VMCore/ConstantHandling.cpp index 5115ede9a1f..185468e8786 100644 --- a/llvm/lib/VMCore/ConstantHandling.cpp +++ b/llvm/lib/VMCore/ConstantHandling.cpp @@ -254,6 +254,10 @@ struct EmptyRules : public TemplateRules { // struct BoolRules : public TemplateRules { + 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()); } -- cgit v1.2.3