From 33204b7c2034f5f80a7173535b5158f06ab953c3 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Sat, 21 Jun 2008 22:03:12 +0000 Subject: [PATCH] Avoid creating a redundant zero APInt. llvm-svn: 52602 --- llvm/lib/Support/APInt.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp index e13011faeac3..38b379005af0 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); -- GitLab