[llvm-commits] [llvm] r51127 - /llvm/trunk/include/llvm/Support/IRBuilder.h

Nate Begeman natebegeman at mac.com
Wed May 14 13:29:46 PDT 2008


Author: sampo
Date: Wed May 14 15:29:46 2008
New Revision: 51127

URL: http://llvm.org/viewvc/llvm-project?rev=51127&view=rev
Log:
Add support to IR builder for new vicmp, vfcmp routines

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

Modified: llvm/trunk/include/llvm/Support/IRBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/IRBuilder.h?rev=51127&r1=51126&r2=51127&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Support/IRBuilder.h (original)
+++ llvm/trunk/include/llvm/Support/IRBuilder.h Wed May 14 15:29:46 2008
@@ -446,21 +446,36 @@
     return CreateFCmp(FCmpInst::FCMP_UNE, LHS, RHS, Name);
   }
 
-  Value *CreateICmp(ICmpInst::Predicate P, Value *LHS, Value *RHS, 
-                     const char *Name = "") {
+  Value *CreateICmp(CmpInst::Predicate P, Value *LHS, Value *RHS, 
+                    const char *Name = "") {
     if (Constant *LC = dyn_cast<Constant>(LHS))
       if (Constant *RC = dyn_cast<Constant>(RHS))
         return ConstantExpr::getCompare(P, LC, RC);      
     return Insert(new ICmpInst(P, LHS, RHS, Name));
   }
-  Value *CreateFCmp(FCmpInst::Predicate P, Value *LHS, Value *RHS, 
-                     const char *Name = "") {
+  Value *CreateFCmp(CmpInst::Predicate P, Value *LHS, Value *RHS, 
+                    const char *Name = "") {
     if (Constant *LC = dyn_cast<Constant>(LHS))
       if (Constant *RC = dyn_cast<Constant>(RHS))
         return ConstantExpr::getCompare(P, LC, RC);
     return Insert(new FCmpInst(P, LHS, RHS, Name));
   }
 
+  Value *CreateVICmp(CmpInst::Predicate P, Value *LHS, Value *RHS, 
+                     const char *Name = "") {
+    if (Constant *LC = dyn_cast<Constant>(LHS))
+      if (Constant *RC = dyn_cast<Constant>(RHS))
+        return ConstantExpr::getCompare(P, LC, RC);      
+    return Insert(new VICmpInst(P, LHS, RHS, Name));
+  }
+  Value *CreateVFCmp(CmpInst::Predicate P, Value *LHS, Value *RHS, 
+                     const char *Name = "") {
+    if (Constant *LC = dyn_cast<Constant>(LHS))
+      if (Constant *RC = dyn_cast<Constant>(RHS))
+        return ConstantExpr::getCompare(P, LC, RC);
+    return Insert(new VFCmpInst(P, LHS, RHS, Name));
+  }
+
   //===--------------------------------------------------------------------===//
   // Instruction creation methods: Other Instructions
   //===--------------------------------------------------------------------===//





More information about the llvm-commits mailing list