commit | 36e5af50c1440d0e81b17ce6792b259f56deb42f | [log] [tgz] |
---|---|---|
author | Craig Topper <craig.topper@gmail.com> | Mon Apr 24 17:37:10 2017 +0000 |
committer | Craig Topper <craig.topper@gmail.com> | Mon Apr 24 17:37:10 2017 +0000 |
tree | a4a43d2cfc9f219f5e8833d60085b1bc0dc66b69 | |
parent | e6dc33fc170335b32b6b132c2c71377dc5ab09e0 [diff] |
[APInt] Simplify the zext and sext methods This replaces a hand written copy loop with a call to memcpy for both zext and sext. For sext, it replaces multiple if/else blocks propagating sign information forward. Now we just do a copy, a sign extension on the last copied word, a memset, and clearUnusedBits. Differential Revision: https://reviews.llvm.org/D32417 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301201 91177308-0d34-0410-b5e6-96231b3b80d8