mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-23 14:25:07 +00:00
Adding missing methods for creating Add, Mul, Neg and Sub with NUW.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95086 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -318,6 +318,12 @@ public:
|
||||
return Folder.CreateNSWAdd(LC, RC);
|
||||
return Insert(BinaryOperator::CreateNSWAdd(LHS, RHS), Name);
|
||||
}
|
||||
Value *CreateNUWAdd(Value *LHS, Value *RHS, const Twine &Name = "") {
|
||||
if (Constant *LC = dyn_cast<Constant>(LHS))
|
||||
if (Constant *RC = dyn_cast<Constant>(RHS))
|
||||
return Folder.CreateNUWAdd(LC, RC);
|
||||
return Insert(BinaryOperator::CreateNUWAdd(LHS, RHS), Name);
|
||||
}
|
||||
Value *CreateFAdd(Value *LHS, Value *RHS, const Twine &Name = "") {
|
||||
if (Constant *LC = dyn_cast<Constant>(LHS))
|
||||
if (Constant *RC = dyn_cast<Constant>(RHS))
|
||||
@@ -336,6 +342,12 @@ public:
|
||||
return Folder.CreateNSWSub(LC, RC);
|
||||
return Insert(BinaryOperator::CreateNSWSub(LHS, RHS), Name);
|
||||
}
|
||||
Value *CreateNUWSub(Value *LHS, Value *RHS, const Twine &Name = "") {
|
||||
if (Constant *LC = dyn_cast<Constant>(LHS))
|
||||
if (Constant *RC = dyn_cast<Constant>(RHS))
|
||||
return Folder.CreateNUWSub(LC, RC);
|
||||
return Insert(BinaryOperator::CreateNUWSub(LHS, RHS), Name);
|
||||
}
|
||||
Value *CreateFSub(Value *LHS, Value *RHS, const Twine &Name = "") {
|
||||
if (Constant *LC = dyn_cast<Constant>(LHS))
|
||||
if (Constant *RC = dyn_cast<Constant>(RHS))
|
||||
@@ -354,6 +366,12 @@ public:
|
||||
return Folder.CreateNSWMul(LC, RC);
|
||||
return Insert(BinaryOperator::CreateNSWMul(LHS, RHS), Name);
|
||||
}
|
||||
Value *CreateNUWMul(Value *LHS, Value *RHS, const Twine &Name = "") {
|
||||
if (Constant *LC = dyn_cast<Constant>(LHS))
|
||||
if (Constant *RC = dyn_cast<Constant>(RHS))
|
||||
return Folder.CreateNUWMul(LC, RC);
|
||||
return Insert(BinaryOperator::CreateNUWMul(LHS, RHS), Name);
|
||||
}
|
||||
Value *CreateFMul(Value *LHS, Value *RHS, const Twine &Name = "") {
|
||||
if (Constant *LC = dyn_cast<Constant>(LHS))
|
||||
if (Constant *RC = dyn_cast<Constant>(RHS))
|
||||
@@ -484,6 +502,11 @@ public:
|
||||
return Folder.CreateNSWNeg(VC);
|
||||
return Insert(BinaryOperator::CreateNSWNeg(V), Name);
|
||||
}
|
||||
Value *CreateNUWNeg(Value *V, const Twine &Name = "") {
|
||||
if (Constant *VC = dyn_cast<Constant>(V))
|
||||
return Folder.CreateNUWNeg(VC);
|
||||
return Insert(BinaryOperator::CreateNUWNeg(V), Name);
|
||||
}
|
||||
Value *CreateFNeg(Value *V, const Twine &Name = "") {
|
||||
if (Constant *VC = dyn_cast<Constant>(V))
|
||||
return Folder.CreateFNeg(VC);
|
||||
|
Reference in New Issue
Block a user