Move types back to the 2.5 API.
[oota-llvm.git] / include / llvm / InstrTypes.h
index 43fe664003da1857f79cfdf50984b5f4cd757250..ddb6ad377d86ba239ecb10f13a463962adb6cf30 100644 (file)
@@ -667,6 +667,14 @@ public:
   static inline bool classof(const Value *V) {
     return isa<Instruction>(V) && classof(cast<Instruction>(V));
   }
+  
+  /// @brief Create a result type for fcmp/icmp
+  static const Type* makeCmpResultType(const Type* opnd_type) {
+    if (const VectorType* vt = dyn_cast<const VectorType>(opnd_type)) {
+      return VectorType::get(Type::Int1Ty, vt->getNumElements());
+    }
+    return Type::Int1Ty;
+  }
 };