forked from OSchip/llvm-project
parent
12bfa1ccbc
commit
1999d22b7f
|
@ -517,21 +517,21 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
Value *CreateShl(Value *LHS, Value *RHS, const char *Name = "") {
|
Value *CreateShl(Value *LHS, Value *RHS, const char *Name = "") {
|
||||||
if (Constant *LC = dyn_cast<Constant>(LHS))
|
if (Constant *LC = dyn_cast<Constant>(LHS))
|
||||||
if (Constant *RC = dyn_cast<Constant>(RHS))
|
if (Constant *RC = dyn_cast<Constant>(RHS))
|
||||||
return ConstantExpr::getShl(LC, RC);
|
return ConstantExpr::getShl(LC, RC);
|
||||||
return LLVMBuilder::CreateShl(LHS, RHS, Name);
|
return LLVMBuilder::CreateShl(LHS, RHS, Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
Value *CreateLShr(Value *LHS, Value *RHS, const char *Name = "") {
|
Value *CreateLShr(Value *LHS, Value *RHS, const char *Name = "") {
|
||||||
if (Constant *LC = dyn_cast<Constant>(LHS))
|
if (Constant *LC = dyn_cast<Constant>(LHS))
|
||||||
if (Constant *RC = dyn_cast<Constant>(RHS))
|
if (Constant *RC = dyn_cast<Constant>(RHS))
|
||||||
return ConstantExpr::getLShr(LC, RC);
|
return ConstantExpr::getLShr(LC, RC);
|
||||||
return LLVMBuilder::CreateLShr(LHS, RHS, Name);
|
return LLVMBuilder::CreateLShr(LHS, RHS, Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
Value *CreateAShr(Value *LHS, Value *RHS, const char *Name = "") {
|
Value *CreateAShr(Value *LHS, Value *RHS, const char *Name = "") {
|
||||||
if (Constant *LC = dyn_cast<Constant>(LHS))
|
if (Constant *LC = dyn_cast<Constant>(LHS))
|
||||||
if (Constant *RC = dyn_cast<Constant>(RHS))
|
if (Constant *RC = dyn_cast<Constant>(RHS))
|
||||||
return ConstantExpr::getAShr(LC, RC);
|
return ConstantExpr::getAShr(LC, RC);
|
||||||
return LLVMBuilder::CreateAShr(LHS, RHS, Name);
|
return LLVMBuilder::CreateAShr(LHS, RHS, Name);
|
||||||
|
@ -617,7 +617,7 @@ public:
|
||||||
|
|
||||||
Value *CreateICmp(ICmpInst::Predicate P, Value *LHS, Value *RHS,
|
Value *CreateICmp(ICmpInst::Predicate P, Value *LHS, Value *RHS,
|
||||||
const char *Name = "") {
|
const char *Name = "") {
|
||||||
if (Constant *LC = dyn_cast<Constant>(LHS))
|
if (Constant *LC = dyn_cast<Constant>(LHS))
|
||||||
if (Constant *RC = dyn_cast<Constant>(RHS))
|
if (Constant *RC = dyn_cast<Constant>(RHS))
|
||||||
return ConstantExpr::getCompare(P, LC, RC);
|
return ConstantExpr::getCompare(P, LC, RC);
|
||||||
return LLVMBuilder::CreateICmp(P, LHS, RHS, Name);
|
return LLVMBuilder::CreateICmp(P, LHS, RHS, Name);
|
||||||
|
@ -625,7 +625,7 @@ public:
|
||||||
|
|
||||||
Value *CreateFCmp(FCmpInst::Predicate P, Value *LHS, Value *RHS,
|
Value *CreateFCmp(FCmpInst::Predicate P, Value *LHS, Value *RHS,
|
||||||
const char *Name = "") {
|
const char *Name = "") {
|
||||||
if (Constant *LC = dyn_cast<Constant>(LHS))
|
if (Constant *LC = dyn_cast<Constant>(LHS))
|
||||||
if (Constant *RC = dyn_cast<Constant>(RHS))
|
if (Constant *RC = dyn_cast<Constant>(RHS))
|
||||||
return ConstantExpr::getCompare(P, LC, RC);
|
return ConstantExpr::getCompare(P, LC, RC);
|
||||||
return LLVMBuilder::CreateFCmp(P, LHS, RHS, Name);
|
return LLVMBuilder::CreateFCmp(P, LHS, RHS, Name);
|
||||||
|
|
Loading…
Reference in New Issue