diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-12-04 05:19:34 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-12-04 05:19:34 +0000 |
commit | 2f8bbf5d65cf7514cdc0821f14a81f4cf2b0a3ac (patch) | |
tree | d9bc319905273003707278972d468ced76d3b7e4 | |
parent | 81dfeb3264d3c1f619c3f73046ded1ac6883e59d (diff) |
For PR950: Implement a stub for folding ICmp and FCmp instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32169 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/VMCore/ConstantFold.cpp | 7 | ||||
-rw-r--r-- | lib/VMCore/ConstantFold.h | 2 | ||||
-rw-r--r-- | lib/VMCore/ConstantFolding.h | 2 |
3 files changed, 11 insertions, 0 deletions
diff --git a/lib/VMCore/ConstantFold.cpp b/lib/VMCore/ConstantFold.cpp index ef929d7315..b15c472459 100644 --- a/lib/VMCore/ConstantFold.cpp +++ b/lib/VMCore/ConstantFold.cpp @@ -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 || diff --git a/lib/VMCore/ConstantFold.h b/lib/VMCore/ConstantFold.h index 2824979cf4..ee3c64cc59 100644 --- a/lib/VMCore/ConstantFold.h +++ b/lib/VMCore/ConstantFold.h @@ -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 diff --git a/lib/VMCore/ConstantFolding.h b/lib/VMCore/ConstantFolding.h index 2824979cf4..ee3c64cc59 100644 --- a/lib/VMCore/ConstantFolding.h +++ b/lib/VMCore/ConstantFolding.h @@ -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 |