llvm 2.0 doesn't support llvm.isunordered.*
authorChris Lattner <sabre@nondot.org>
Sun, 7 Jan 2007 08:52:43 +0000 (08:52 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 7 Jan 2007 08:52:43 +0000 (08:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32994 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Intrinsics.td
lib/CodeGen/IntrinsicLowering.cpp

index 91c53335a9b517fd11d1863d986e51d856dc20e4..e08fe2d4d56f92177af775c88e5d26389ab0390a 100644 (file)
@@ -161,10 +161,6 @@ let Properties = [IntrWriteArgMem] in {
 }
 
 let Properties = [IntrNoMem] in {
-  def int_isunordered_f32 : Intrinsic<[llvm_bool_ty, 
-                                       llvm_float_ty,  llvm_float_ty]>;
-  def int_isunordered_f64 : Intrinsic<[llvm_bool_ty, 
-                                       llvm_double_ty, llvm_double_ty]>;
   def int_sqrt_f32 : Intrinsic<[llvm_float_ty , llvm_float_ty]>;
   def int_sqrt_f64 : Intrinsic<[llvm_double_ty, llvm_double_ty]>;
 
index ba89052572a1a20c3d17019d2b2dff1391375f35..72a1d1485b49118e5a2d7039705f915617e881a3 100644 (file)
@@ -92,11 +92,6 @@ void IntrinsicLowering::AddPrototypes(Module &M) {
                               Type::Int32Ty, (--(--I->arg_end()))->getType(),
                               (Type *)0);
         break;
-      case Intrinsic::isunordered_f32:
-      case Intrinsic::isunordered_f64:
-        EnsureFunctionExists(M, "isunordered", I->arg_begin(), I->arg_end(),
-                             Type::BoolTy);
-        break;
       case Intrinsic::sqrt_f32:
       case Intrinsic::sqrt_f64:
         if(I->arg_begin()->getType() == Type::FloatTy)
@@ -392,18 +387,6 @@ void IntrinsicLowering::LowerIntrinsicCall(CallInst *CI) {
                     (*(CI->op_begin()+1))->getType(), MemsetFCache);
     break;
   }
-  case Intrinsic::isunordered_f32:
-  case Intrinsic::isunordered_f64: {
-    Value *L = CI->getOperand(1);
-    Value *R = CI->getOperand(2);
-
-    Value *LIsNan = new FCmpInst(FCmpInst::FCMP_ONE, L, L, "LIsNan", CI);
-    Value *RIsNan = new FCmpInst(FCmpInst::FCMP_ONE, R, R, "RIsNan", CI);
-    CI->replaceAllUsesWith(
-      BinaryOperator::create(Instruction::Or, LIsNan, RIsNan,
-                             "isunordered", CI));
-    break;
-  }
   case Intrinsic::sqrt_f32: {
     static Constant *sqrtfFCache = 0;
     ReplaceCallWith("sqrtf", CI, CI->op_begin()+1, CI->op_end(),