forked from OSchip/llvm-project
Implement setcc for booleans. Fixes bug:
test/Regression/Transforms/ConstProp/2002-09-03-SetCC-Bools.ll llvm-svn: 3576
This commit is contained in:
parent
80c0964fc9
commit
07507a4ccb
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue