[PATCH][DAGCombiner] Distribute TRUNC through AND in rotation amount
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...
Size: 1715 bytes
Desc: not available
More information about the llvm-commits