Know some identities about tokenfactor nodes.
[oota-llvm.git] / lib / CodeGen / IntrinsicLowering.cpp
index b6ebe0991b3fcc8b2552cb3f8584aeb322706aa5..63ff815291381b682516a1df70af21de4e472a54 100644 (file)
 //
 //===----------------------------------------------------------------------===//
 
-#include "llvm/IntrinsicLowering.h"
+#include "llvm/CodeGen/IntrinsicLowering.h"
 #include "llvm/Constants.h"
 #include "llvm/DerivedTypes.h"
 #include "llvm/Module.h"
-#include "llvm/iOther.h"
+#include "llvm/Instructions.h"
+#include <iostream>
+
 using namespace llvm;
 
 template <class ArgIt>
@@ -105,8 +107,8 @@ void DefaultIntrinsicLowering::AddPrototypes(Module &M) {
         EnsureFunctionExists(M, "memset", I->abegin(), --I->aend(),
                              I->abegin()->getType());
         break;
-      case Intrinsic::isnan:
-        EnsureFunctionExists(M, "isnan", I->abegin(), I->aend(), Type::BoolTy);
+      case Intrinsic::isunordered:
+        EnsureFunctionExists(M, "isunordered", I->abegin(), I->aend(), Type::BoolTy);
         break;
       }
 
@@ -200,12 +202,10 @@ void DefaultIntrinsicLowering::LowerIntrinsicCall(CallInst *CI) {
                     (*(CI->op_begin()+1))->getType(), MemsetFCache);
     break;
   }
-  case Intrinsic::isnan: {
-    // FIXME: This should force the argument to be a double.  There may be
-    // multiple isnans for different FP arguments.
-    static Function *isnanFCache = 0;
-    ReplaceCallWith("isnan", CI, CI->op_begin()+1, CI->op_end(),
-                    Type::BoolTy, isnanFCache);
+  case Intrinsic::isunordered: {
+    static Function *isunorderedFCache = 0;
+    ReplaceCallWith("isunordered", CI, CI->op_begin()+1, CI->op_end(),
+                    Type::BoolTy, isunorderedFCache);
     break;
   }
   }