[llvm] r173985 - Removed CreateFPExtOrFPTrunc for now until I have the time to get in my vector convert patch.

Michael Gottesman mgottesman at apple.com
Wed Jan 30 14:53:21 PST 2013


Author: mgottesman
Date: Wed Jan 30 16:53:21 2013
New Revision: 173985

URL: http://llvm.org/viewvc/llvm-project?rev=173985&view=rev
Log:
Removed CreateFPExtOrFPTrunc for now until I have the time to get in my vector convert patch.

What I thought was going to be a quick thing has extended out a little bit in
time *sigh*. So after some thought in order to not cruft up the tree I am
removing this for now since it is the right thing to do.

Modified:
    llvm/trunk/include/llvm/IR/IRBuilder.h

Modified: llvm/trunk/include/llvm/IR/IRBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/IRBuilder.h?rev=173985&r1=173984&r2=173985&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/IRBuilder.h (original)
+++ llvm/trunk/include/llvm/IR/IRBuilder.h Wed Jan 30 16:53:21 2013
@@ -1056,20 +1056,6 @@ public:
       return CreateTrunc(V, DestTy, Name);
     return V;
   }
-  /// \brief Create a FPExt or FPTrunc from the float value V to DestTy. Return
-  /// the value untouched if the type of V is already DestTy.
-  Value *CreateFPExtOrFPTrunc(Value *V, Type *DestTy,
-                           const Twine &Name = "") {
-    assert(V->getType()->isFPOrFPVectorTy() &&
-           DestTy->isFPOrFPVectorTy() &&
-           "Can only FPExt/FPTrunc floating point types!");
-    Type *VTy = V->getType();
-    if (VTy->getScalarSizeInBits() < DestTy->getScalarSizeInBits())
-      return CreateFPExt(V, DestTy, Name);
-    if (VTy->getScalarSizeInBits() > DestTy->getScalarSizeInBits())
-      return CreateFPTrunc(V, DestTy, Name);
-    return V;
-  }
   Value *CreateFPToUI(Value *V, Type *DestTy, const Twine &Name = ""){
     return CreateCast(Instruction::FPToUI, V, DestTy, Name);
   }





More information about the llvm-commits mailing list