[PATCH] D36395: [InstCombine] narrow rotate left/right patterns to eliminate zext/trunc (PR34046)
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 7 14:27:02 PDT 2017
spatel updated this revision to Diff 110088.
spatel added a comment.
Patch updated:
1. Add an assert for the shouldChangeType() guard that's in the caller function.
2. Replace the explicit match for zext of the shift value with a call to MaskedValueIsZero().
3. Remove the MaskedValueIsZero() check for the shift amount and generate our own masks to make the transform safe:
http://rise4fun.com/Alive/Qzm
4. Add test to exercise #2 and #3.
https://reviews.llvm.org/D36395
Files:
lib/Transforms/InstCombine/InstCombineCasts.cpp
lib/Transforms/InstCombine/InstCombineInternal.h
test/Transforms/InstCombine/rotate.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36395.110088.patch
Type: text/x-patch
Size: 9332 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170807/ea8c1797/attachment.bin>
More information about the llvm-commits
mailing list