Skip to content
Commit 1dec2811 authored by Craig Topper's avatar Craig Topper
Browse files

[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

llvm-svn: 301201
parent 0ab4f06b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment