aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-01-12 18:08:18 +0000
committerChris Lattner <sabre@nondot.org>2004-01-12 18:08:18 +0000
commitd4d4ab58ef214c5eef781417719107032c361b45 (patch)
treea31f77404ad49eff134318381554c367ccaa541f /lib
parente9028638bf01c74a34eddb4acc40c9678d0dcec2 (diff)
Eliminate use of ConstantHandling itf
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10782 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/SparcV9/SparcV9InstrSelection.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/Target/SparcV9/SparcV9InstrSelection.cpp b/lib/Target/SparcV9/SparcV9InstrSelection.cpp
index 853da7e8e4..5b729ecaea 100644
--- a/lib/Target/SparcV9/SparcV9InstrSelection.cpp
+++ b/lib/Target/SparcV9/SparcV9InstrSelection.cpp
@@ -12,7 +12,6 @@
//===----------------------------------------------------------------------===//
#include "llvm/Constants.h"
-#include "llvm/ConstantHandling.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Instructions.h"
#include "llvm/Intrinsics.h"
@@ -56,7 +55,7 @@ static inline void Add3OperandInstr(unsigned Opcode, InstructionNode* Node,
// Check for a constant 0.
-inline bool
+static inline bool
IsZero(Value* idx)
{
return (idx == ConstantSInt::getNullValue(idx->getType()));
@@ -896,9 +895,9 @@ CreateCheapestMulConstInstruction(const TargetMachine &target,
Value* constOp;
if (isa<Constant>(lval) && isa<Constant>(rval)) {
// both operands are constant: evaluate and "set" in dest
- Constant* P = ConstantFoldBinaryInstruction(Instruction::Mul,
- cast<Constant>(lval),
- cast<Constant>(rval));
+ Constant* P = ConstantExpr::get(Instruction::Mul,
+ cast<Constant>(lval),
+ cast<Constant>(rval));
target.getInstrInfo().CreateCodeToLoadConst(target,F,P,destVal,mvec,mcfi);
}
else if (isa<Constant>(rval)) // rval is constant, but not lval