[PATCH] [LSR] canonicalize Prod*(1<<C) to Prod<<C

Jingyue Wu jingyue at google.com
Mon Jun 15 10:48:34 PDT 2015


Hi sanjoy, atrick,

Because LSR happens at a late stage where mul of a power of 2 is
typically canonicalized to shl, this canonicalization emits code that
can be better CSE'ed.

http://reviews.llvm.org/D10448

Files:
  lib/Analysis/ScalarEvolutionExpander.cpp
  test/Transforms/LoopIdiom/basic.ll
  test/Transforms/LoopReroll/nonconst_lb.ll
  test/Transforms/LoopStrengthReduce/2011-10-06-ReusePhi.ll
  test/Transforms/LoopStrengthReduce/post-inc-icmpzero.ll
  test/Transforms/LoopStrengthReduce/shl.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10448.27688.patch
Type: text/x-patch
Size: 5171 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150615/8bcecab7/attachment.bin>


More information about the llvm-commits mailing list