[PATCH] [SLSR] handle candidate form &B[i * S]

Jingyue Wu jingyue at google.com
Thu Feb 5 22:57:36 PST 2015


Hi hfinkel, atrick, meheff, eliben,

This patch enhances SLSR to handle another candidate form &B[i * S]. If
we found two candidates

S1: X = &B[i * S]
S2: Y = &B[i' * S]

and S1 dominates S2, we can replace S2 with

Y = &X[(i' - i) * S]

http://reviews.llvm.org/D7459

Files:
  lib/Transforms/Scalar/StraightLineStrengthReduce.cpp
  test/Transforms/StraightLineStrengthReduce/X86/lit.local.cfg
  test/Transforms/StraightLineStrengthReduce/X86/no-slsr.ll
  test/Transforms/StraightLineStrengthReduce/slsr-gep.ll
  test/Transforms/StraightLineStrengthReduce/slsr-mul.ll
  test/Transforms/StraightLineStrengthReduce/slsr.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7459.19461.patch
Type: text/x-patch
Size: 20666 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150206/c1f712d1/attachment.bin>


More information about the llvm-commits mailing list