From: Reid Spencer Date: Mon, 4 Dec 2006 05:19:34 +0000 (+0000) Subject: For PR950: Implement a stub for folding ICmp and FCmp instructions X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=commitdiff_plain;h=2f8bbf5d65cf7514cdc0821f14a81f4cf2b0a3ac 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 --- diff --git a/lib/VMCore/ConstantFold.cpp b/lib/VMCore/ConstantFold.cpp index ef929d73159..b15c4724593 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 &IdxList) { if (IdxList.size() == 0 || diff --git a/lib/VMCore/ConstantFold.h b/lib/VMCore/ConstantFold.h index 2824979cf44..ee3c64cc598 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 &IdxList); } // End llvm namespace diff --git a/lib/VMCore/ConstantFolding.h b/lib/VMCore/ConstantFolding.h index 2824979cf44..ee3c64cc598 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 &IdxList); } // End llvm namespace