summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-06-21 22:03:12 +0000
committerDan Gohman <gohman@apple.com>2008-06-21 22:03:12 +0000
commit33204b7c2034f5f80a7173535b5158f06ab953c3 (patch)
treed0696ba01adafdf9e2ebb9d63eb285de8f64ff09 /llvm/lib
parent38c19aae38fb624974fc3823824cccb49aef9832 (diff)
downloadbcm5719-llvm-33204b7c2034f5f80a7173535b5158f06ab953c3.tar.gz
bcm5719-llvm-33204b7c2034f5f80a7173535b5158f06ab953c3.zip
Avoid creating a redundant zero APInt.
llvm-svn: 52602
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Support/APInt.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp
index e13011faeac..38b379005af 100644
--- a/llvm/lib/Support/APInt.cpp
+++ b/llvm/lib/Support/APInt.cpp
@@ -2048,7 +2048,7 @@ std::string APInt::toString(uint8_t radix, bool wantSigned) const {
result = "-";
insert_at = 1;
}
- if (tmp == APInt(tmp.getBitWidth(), 0))
+ if (tmp == zero)
result = "0";
else while (tmp.ne(zero)) {
APInt APdigit(1,0);
OpenPOWER on IntegriCloud