[llvm-commits] [SignlessTypes] CVS: llvm/include/llvm/Support/PatternMatch.h

Zhou Sheng zhousheng00 at gmail.com
Mon Oct 23 11:13:58 PDT 2006



Changes in directory llvm/include/llvm/Support:

PatternMatch.h updated: 1.9.2.2 -> 1.9.2.3
---
Log message:



---
Diffs of the changes:  (+15 -2)

 PatternMatch.h |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)


Index: llvm/include/llvm/Support/PatternMatch.h
diff -u llvm/include/llvm/Support/PatternMatch.h:1.9.2.2 llvm/include/llvm/Support/PatternMatch.h:1.9.2.3
--- llvm/include/llvm/Support/PatternMatch.h:1.9.2.2	Sun Oct 22 03:59:00 2006
+++ llvm/include/llvm/Support/PatternMatch.h	Mon Oct 23 13:13:26 2006
@@ -123,6 +123,19 @@
   return BinaryOp_match<LHS, RHS, Instruction::SDiv>(L, R);
 }
 
+// SignlessType Revision: here we replace m_Rem with m_URem and add m_SRem
+// for SRem which is signed Rem.
+template<typename LHS, typename RHS>
+inline BinaryOp_match<LHS, RHS, Instruction::URem> m_URem(const LHS &L,
+                                                          const RHS &R) {
+  return BinaryOp_match<LHS, RHS, Instruction::URem>(L, R);
+}
+
+template<typename LHS, typename RHS>
+inline BinaryOp_match<LHS, RHS, Instruction::SRem> m_SRem(const LHS &L,
+                                                          const RHS &R) {
+  return BinaryOp_match<LHS, RHS, Instruction::SRem>(L, R);
+}
 template<typename LHS, typename RHS>
 inline BinaryOp_match<LHS, RHS, Instruction::FDiv> m_FDiv(const LHS &L,
                                                         const RHS &R) {
@@ -130,9 +143,9 @@
 }
 
 template<typename LHS, typename RHS>
-inline BinaryOp_match<LHS, RHS, Instruction::Rem> m_Rem(const LHS &L,
+inline BinaryOp_match<LHS, RHS, Instruction::FRem> m_FRem(const LHS &L,
                                                         const RHS &R) {
-  return BinaryOp_match<LHS, RHS, Instruction::Rem>(L, R);
+  return BinaryOp_match<LHS, RHS, Instruction::FRem>(L, R);
 }
 
 template<typename LHS, typename RHS>






More information about the llvm-commits mailing list