[llvm-commits] [llvm] r52602 - /llvm/trunk/lib/Support/APInt.cpp
Dan Gohman
gohman at apple.com
Sat Jun 21 15:03:13 PDT 2008
Author: djg
Date: Sat Jun 21 17:03:12 2008
New Revision: 52602
URL: http://llvm.org/viewvc/llvm-project?rev=52602&view=rev
Log:
Avoid creating a redundant zero APInt.
Modified:
llvm/trunk/lib/Support/APInt.cpp
Modified: llvm/trunk/lib/Support/APInt.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/APInt.cpp?rev=52602&r1=52601&r2=52602&view=diff
==============================================================================
--- llvm/trunk/lib/Support/APInt.cpp (original)
+++ llvm/trunk/lib/Support/APInt.cpp Sat Jun 21 17:03:12 2008
@@ -2048,7 +2048,7 @@
result = "-";
insert_at = 1;
}
- if (tmp == APInt(tmp.getBitWidth(), 0))
+ if (tmp == zero)
result = "0";
else while (tmp.ne(zero)) {
APInt APdigit(1,0);
More information about the llvm-commits
mailing list