aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-12-04 05:19:34 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-12-04 05:19:34 +0000
commit2f8bbf5d65cf7514cdc0821f14a81f4cf2b0a3ac (patch)
treed9bc319905273003707278972d468ced76d3b7e4
parent81dfeb3264d3c1f619c3f73046ded1ac6883e59d (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.cpp7
-rw-r--r--lib/VMCore/ConstantFold.h2
-rw-r--r--lib/VMCore/ConstantFolding.h2
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