commit | 33204b7c2034f5f80a7173535b5158f06ab953c3 | [log] [tgz] |
---|---|---|
author | Dan Gohman <gohman@apple.com> | Sat Jun 21 22:03:12 2008 +0000 |
committer | Dan Gohman <gohman@apple.com> | Sat Jun 21 22:03:12 2008 +0000 |
tree | d0696ba01adafdf9e2ebb9d63eb285de8f64ff09 | |
parent | 38c19aae38fb624974fc3823824cccb49aef9832 [diff] [blame] |
Avoid creating a redundant zero APInt. llvm-svn: 52602
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp index e13011f..38b3790 100644 --- a/llvm/lib/Support/APInt.cpp +++ b/llvm/lib/Support/APInt.cpp
@@ -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);