Fixed a bug in which signed comparisons were being used instead of unsigned comparisons.
authorSanjiv Gupta <sanjiv.gupta@microchip.com>
Wed, 3 Jun 2009 13:36:44 +0000 (13:36 +0000)
committerSanjiv Gupta <sanjiv.gupta@microchip.com>
Wed, 3 Jun 2009 13:36:44 +0000 (13:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72771 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PIC16/PIC16.h
lib/Target/PIC16/PIC16ISelLowering.cpp

index 40bed2f50e102b30eacb172aaa124c440ad50cbb..cf0f9db9e8111b8582f371d4cd16d97610058e96 100644 (file)
@@ -300,9 +300,11 @@ namespace PIC16CC {
     case PIC16CC::LT:   return "lt";
     case PIC16CC::ULT:   return "lt";
     case PIC16CC::LE:  return "le";
+    case PIC16CC::ULE:  return "le";
     case PIC16CC::GT:  return "gt";
     case PIC16CC::UGT:  return "gt";
     case PIC16CC::GE:   return "ge";
+    case PIC16CC::UGE:   return "ge";
     }
   }
 
index 92fdcb2c0c15077fc84427f2bccea1f7b2eb4eb6..ffdb90a7f6d13247a9e2ab405a682e1094653896 100644 (file)
@@ -1557,8 +1557,8 @@ static PIC16CC::CondCodes IntCCToPIC16CC(ISD::CondCode CC) {
   case ISD::SETLT:  return PIC16CC::LT;
   case ISD::SETLE:  return PIC16CC::LE;
   case ISD::SETULT: return PIC16CC::ULT;
-  case ISD::SETULE: return PIC16CC::LE;
-  case ISD::SETUGE: return PIC16CC::GE;
+  case ISD::SETULE: return PIC16CC::ULE;
+  case ISD::SETUGE: return PIC16CC::UGE;
   case ISD::SETUGT: return PIC16CC::UGT;
   }
 }