[PATCH] Moving few patterns from visitAnd/visitOr/visitXor to SimplifyUsingDistributiveLaws()

Dinesh Dwivedi dinesh.d at samsung.com
Mon Aug 18 00:44:53 PDT 2014


Hi rafael, bkramer, jingyue,

This patch enables SimplifyUsingDistributiveLaws() to handle following pattens.
  (X >> Z) & (Y >> Z)  -> (X&Y) >> Z  for all shifts.
  (X >> Z) | (Y >> Z)  -> (X|Y) >> Z  for all shifts.
  (X >> Z) ^ (Y >> Z)  -> (X^Y) >> Z  for all shifts.
These patterns were previously handled separately in visitAnd()/visitOr()/visitXor().

http://reviews.llvm.org/D4951

Files:
  lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
  lib/Transforms/InstCombine/InstructionCombining.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4951.12610.patch
Type: text/x-patch
Size: 6048 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140818/1506673a/attachment.bin>


More information about the llvm-commits mailing list