diff options
author | Dan Gohman <gohman@apple.com> | 2010-05-03 22:44:19 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-05-03 22:44:19 +0000 |
commit | 1eaac532615a54a1133367dc2c4ceaa79a150a9d (patch) | |
tree | b577867241291af40389de7cbf82719be1eaed46 /lib/VMCore/Constants.cpp | |
parent | b98c549d135c8f38b2fc1b086cc46f0b243ce862 (diff) |
Remove the API compatibility layer which converted add, sub, and mul
to fadd, fsub, and fmul, when used with a floating-point type. LLVM
has supported the new instructions since 2.6, so it's time to get
on board.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@102971 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Constants.cpp')
-rw-r--r-- | lib/VMCore/Constants.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp index d969dbb60d..00b009401d 100644 --- a/lib/VMCore/Constants.cpp +++ b/lib/VMCore/Constants.cpp @@ -1450,12 +1450,6 @@ Constant *ConstantExpr::getCompareTy(unsigned short predicate, Constant *ConstantExpr::get(unsigned Opcode, Constant *C1, Constant *C2, unsigned Flags) { - // API compatibility: Adjust integer opcodes to floating-point opcodes. - if (C1->getType()->isFPOrFPVectorTy()) { - if (Opcode == Instruction::Add) Opcode = Instruction::FAdd; - else if (Opcode == Instruction::Sub) Opcode = Instruction::FSub; - else if (Opcode == Instruction::Mul) Opcode = Instruction::FMul; - } #ifndef NDEBUG switch (Opcode) { case Instruction::Add: @@ -1840,9 +1834,6 @@ Constant *ConstantExpr::getExtractValue(Constant *Agg, } Constant* ConstantExpr::getNeg(Constant* C) { - // API compatibility: Adjust integer opcodes to floating-point opcodes. - if (C->getType()->isFPOrFPVectorTy()) - return getFNeg(C); assert(C->getType()->isIntOrIntVectorTy() && "Cannot NEG a nonintegral value!"); return get(Instruction::Sub, |