summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-09-03 20:09:49 +0000
committerChris Lattner <sabre@nondot.org>2002-09-03 20:09:49 +0000
commit07507a4ccb0833a0620003ebf2f32ac6d48d7cb0 (patch)
treed0ac09cb4bbb6b9f1c76b0e73c84532f439ce075
parent80c0964fc960d4b5f9e69c3432c0222abd5a94d8 (diff)
downloadbcm5719-llvm-07507a4ccb0833a0620003ebf2f32ac6d48d7cb0.tar.gz
bcm5719-llvm-07507a4ccb0833a0620003ebf2f32ac6d48d7cb0.zip
Implement setcc for booleans. Fixes bug:
test/Regression/Transforms/ConstProp/2002-09-03-SetCC-Bools.ll llvm-svn: 3576
-rw-r--r--llvm/lib/VMCore/ConstantHandling.cpp4
1 files changed, 4 insertions, 0 deletions
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<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());
}
OpenPOWER on IntegriCloud