mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-20 10:24:12 +00:00
Add support to IR builder for new vicmp, vfcmp routines
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51127 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -446,21 +446,36 @@ public:
|
|||||||
return CreateFCmp(FCmpInst::FCMP_UNE, LHS, RHS, Name);
|
return CreateFCmp(FCmpInst::FCMP_UNE, LHS, RHS, Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
Value *CreateICmp(ICmpInst::Predicate P, Value *LHS, Value *RHS,
|
Value *CreateICmp(CmpInst::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 Insert(new ICmpInst(P, LHS, RHS, Name));
|
return Insert(new ICmpInst(P, LHS, RHS, Name));
|
||||||
}
|
}
|
||||||
Value *CreateFCmp(FCmpInst::Predicate P, Value *LHS, Value *RHS,
|
Value *CreateFCmp(CmpInst::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 Insert(new FCmpInst(P, LHS, RHS, Name));
|
return Insert(new FCmpInst(P, LHS, RHS, Name));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Value *CreateVICmp(CmpInst::Predicate P, Value *LHS, Value *RHS,
|
||||||
|
const char *Name = "") {
|
||||||
|
if (Constant *LC = dyn_cast<Constant>(LHS))
|
||||||
|
if (Constant *RC = dyn_cast<Constant>(RHS))
|
||||||
|
return ConstantExpr::getCompare(P, LC, RC);
|
||||||
|
return Insert(new VICmpInst(P, LHS, RHS, Name));
|
||||||
|
}
|
||||||
|
Value *CreateVFCmp(CmpInst::Predicate P, Value *LHS, Value *RHS,
|
||||||
|
const char *Name = "") {
|
||||||
|
if (Constant *LC = dyn_cast<Constant>(LHS))
|
||||||
|
if (Constant *RC = dyn_cast<Constant>(RHS))
|
||||||
|
return ConstantExpr::getCompare(P, LC, RC);
|
||||||
|
return Insert(new VFCmpInst(P, LHS, RHS, Name));
|
||||||
|
}
|
||||||
|
|
||||||
//===--------------------------------------------------------------------===//
|
//===--------------------------------------------------------------------===//
|
||||||
// Instruction creation methods: Other Instructions
|
// Instruction creation methods: Other Instructions
|
||||||
//===--------------------------------------------------------------------===//
|
//===--------------------------------------------------------------------===//
|
||||||
|
Reference in New Issue
Block a user