[PATCH][DAGCombiner] Distribute TRUNC through AND in rotation amount
Adam Nemet
anemet at apple.com
Mon Mar 3 16:38:04 PST 2014
This is already done for shifts. Allow it for rotations as well. E.g.:
(rotl:i32 x, (trunc (and y, 31))) -> (rotl:i32 x, (and (trunc y), 31))
Use the newly factored-out distributeTruncateThroughAnd.
With this patch and some X86.td tweaks we should be able to remove redundant
masking of the rotation amount like in the example above. HW implicitly
performs this masking.
The testcase will be added as part of the X86 patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0004-DAGCombiner-Distribute-TRUNC-through-AND-in-rotation.patch
Type: application/octet-stream
Size: 1715 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140303/ee053a36/attachment.obj>
More information about the llvm-commits
mailing list