[PATCH] D42309: [LV] Use Demanded Bits and ValueTracking for reduction type-shrinking
Matthew Simpson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 19 11:21:06 PST 2018
mssimpso created this revision.
mssimpso added reviewers: Ayal, gilr, mkuper.
mssimpso edited the summary of this revision.
The type-shrinking logic in reduction detection, although narrow in scope, is also rather ad-hoc, which has led to bugs (e.g., PR35734). This patch modifies the approach to rely on the demanded bits and value tracking analyses, if available. We currently perform type-shrinking separately for reductions and other instructions in the loop. Long-term, we should probably think about computing minimal bit widths in a more complete way for the loops we want to vectorize.
Reference: https://bugs.llvm.org/show_bug.cgi?id=35734
Repository:
rL LLVM
https://reviews.llvm.org/D42309
Files:
include/llvm/Transforms/Utils/LoopUtils.h
lib/Transforms/Utils/LoopUtils.cpp
lib/Transforms/Vectorize/LoopVectorize.cpp
test/Transforms/LoopVectorize/reduction-small-size.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D42309.130665.patch
Type: text/x-patch
Size: 22221 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180119/9bbb712f/attachment.bin>
More information about the llvm-commits
mailing list