summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSanjiv Gupta <sanjiv.gupta@microchip.com>2009-06-03 13:36:44 +0000
committerSanjiv Gupta <sanjiv.gupta@microchip.com>2009-06-03 13:36:44 +0000
commita53241a880b882fe3bed1e4145b5b60c0c24d1cb (patch)
treed76d06a539e65587af8982bdac3f714d0c0ee869
parentaef810900a7aacbe151b42d56c3cb44daab4ef79 (diff)
downloadbcm5719-llvm-a53241a880b882fe3bed1e4145b5b60c0c24d1cb.tar.gz
bcm5719-llvm-a53241a880b882fe3bed1e4145b5b60c0c24d1cb.zip
Fixed a bug in which signed comparisons were being used instead of unsigned comparisons.
llvm-svn: 72771
-rw-r--r--llvm/lib/Target/PIC16/PIC16.h2
-rw-r--r--llvm/lib/Target/PIC16/PIC16ISelLowering.cpp4
2 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Target/PIC16/PIC16.h b/llvm/lib/Target/PIC16/PIC16.h
index 40bed2f50e1..cf0f9db9e81 100644
--- a/llvm/lib/Target/PIC16/PIC16.h
+++ b/llvm/lib/Target/PIC16/PIC16.h
@@ -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";
}
}
diff --git a/llvm/lib/Target/PIC16/PIC16ISelLowering.cpp b/llvm/lib/Target/PIC16/PIC16ISelLowering.cpp
index 92fdcb2c0c1..ffdb90a7f6d 100644
--- a/llvm/lib/Target/PIC16/PIC16ISelLowering.cpp
+++ b/llvm/lib/Target/PIC16/PIC16ISelLowering.cpp
@@ -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;
}
}
OpenPOWER on IntegriCloud