For PR950: Implement a stub for folding ICmp and FCmp instructions
authorReid Spencer <rspencer@reidspencer.com>
Mon, 4 Dec 2006 05:19:34 +0000 (05:19 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Mon, 4 Dec 2006 05:19:34 +0000 (05:19 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32169 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/ConstantFold.cpp
lib/VMCore/ConstantFold.h
lib/VMCore/ConstantFolding.h

index ef929d7315920ce58de66615bf94b4a918550aba..b15c472459393fd9372be372b1b3c8293a11042d 100644 (file)
@@ -1600,6 +1600,13 @@ Constant *llvm::ConstantFoldBinaryInstruction(unsigned Opcode,
   return 0;
 }
 
+Constant *llvm::ConstantFoldCompare(
+    unsigned opcode, Constant *C1, Constant  *C2, unsigned short predicate)
+{
+  // Place holder for future folding of ICmp and FCmp instructions
+  return 0;
+}
+
 Constant *llvm::ConstantFoldGetElementPtr(const Constant *C,
                                           const std::vector<Value*> &IdxList) {
   if (IdxList.size() == 0 ||
index 2824979cf4431b30e0763dc91a87695c86a57ee6..ee3c64cc59877b458c1f951433a050613796f17b 100644 (file)
@@ -45,6 +45,8 @@ namespace llvm {
                                                  const Constant *Mask);
   Constant *ConstantFoldBinaryInstruction(unsigned Opcode, const Constant *V1,
                                           const Constant *V2);
+  Constant *ConstantFoldCompare(unsigned opcode, Constant *C1, Constant  *C2, 
+                                unsigned short predicate);
   Constant *ConstantFoldGetElementPtr(const Constant *C,
                                       const std::vector<Value*> &IdxList);
 } // End llvm namespace
index 2824979cf4431b30e0763dc91a87695c86a57ee6..ee3c64cc59877b458c1f951433a050613796f17b 100644 (file)
@@ -45,6 +45,8 @@ namespace llvm {
                                                  const Constant *Mask);
   Constant *ConstantFoldBinaryInstruction(unsigned Opcode, const Constant *V1,
                                           const Constant *V2);
+  Constant *ConstantFoldCompare(unsigned opcode, Constant *C1, Constant  *C2, 
+                                unsigned short predicate);
   Constant *ConstantFoldGetElementPtr(const Constant *C,
                                       const std::vector<Value*> &IdxList);
 } // End llvm namespace