mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-28 07:17:32 +00:00
InstCombine: Hoist 3 copies of AddOne/SubOne into a header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199605 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -845,17 +845,6 @@ Value *FAddCombine::createAddendVal
|
||||
return createFMul(OpndVal, Coeff.getValue(Instr->getType()));
|
||||
}
|
||||
|
||||
/// AddOne - Add one to a ConstantInt.
|
||||
static Constant *AddOne(Constant *C) {
|
||||
return ConstantExpr::getAdd(C, ConstantInt::get(C->getType(), 1));
|
||||
}
|
||||
|
||||
/// SubOne - Subtract one from a ConstantInt.
|
||||
static Constant *SubOne(Constant *C) {
|
||||
return ConstantExpr::getAdd(C, ConstantInt::getAllOnesValue(C->getType()));
|
||||
}
|
||||
|
||||
|
||||
// dyn_castFoldableMul - If this value is a multiply that can be folded into
|
||||
// other computations (because it has a constant operand), return the
|
||||
// non-constant operand of the multiply, and set CST to point to the multiplier.
|
||||
|
Reference in New Issue
Block a user