[PATCH] D32114: [APInt] Merge the multiword code from lshrInPlace and tcShiftRight into a single implementation

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 15 23:31:19 PDT 2017


craig.topper created this revision.

This merges the two different multiword shift right implementations into a single version located in tcShiftRight. lshrInPlace now calls tcShiftRight for the multiword case.

I retained the memmove fast path from lshrInPlace and used a memset for the zeroing. The for loop is basically tcShiftRight's implementation with the zeroing and the intra-shift of 0 removed.


https://reviews.llvm.org/D32114

Files:
  include/llvm/ADT/APInt.h
  lib/Support/APInt.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32114.95393.patch
Type: text/x-patch
Size: 4723 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170416/db208fd7/attachment.bin>


More information about the llvm-commits mailing list