[llvm-commits] CVS: llvm/lib/Support/APInt.cpp
Reid Spencer
reid at x10sys.com
Sun May 13 17:15:47 PDT 2007
Changes in directory llvm/lib/Support:
APInt.cpp updated: 1.81 -> 1.82
---
Log message:
Make the results for the rotate functions correct when rotateAmt == 0.
---
Diffs of the changes: (+4 -0)
APInt.cpp | 4 ++++
1 files changed, 4 insertions(+)
Index: llvm/lib/Support/APInt.cpp
diff -u llvm/lib/Support/APInt.cpp:1.81 llvm/lib/Support/APInt.cpp:1.82
--- llvm/lib/Support/APInt.cpp:1.81 Sun May 13 18:44:59 2007
+++ llvm/lib/Support/APInt.cpp Sun May 13 19:15:28 2007
@@ -1249,6 +1249,8 @@
}
APInt APInt::rotl(uint32_t rotateAmt) const {
+ if (rotateAmt == 0)
+ return *this;
// Don't get too fancy, just use existing shift/or facilities
APInt hi(*this);
APInt lo(*this);
@@ -1258,6 +1260,8 @@
}
APInt APInt::rotr(uint32_t rotateAmt) const {
+ if (rotateAmt == 0)
+ return *this;
// Don't get too fancy, just use existing shift/or facilities
APInt hi(*this);
APInt lo(*this);
More information about the llvm-commits
mailing list