[PATCH] [SLSR] simplify ternary adds by reassociation

Jingyue Wu jingyue at google.com
Wed Apr 8 09:27:35 PDT 2015


Hi broune, hfinkel, meheff, sanjoy,

Similar to handling existing candidate forms, this update
pattern-matches

x = a + c
y = (a + b) + c    // x dominates y

and rewrites y as

y = x + b.

To be conservative, we only do this when y is the only user of (a + b).

http://reviews.llvm.org/D8898

Files:
  lib/Transforms/Scalar/StraightLineStrengthReduce.cpp
  test/Transforms/StraightLineStrengthReduce/slsr-add.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8898.23424.patch
Type: text/x-patch
Size: 14776 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150408/9063bda7/attachment.bin>


More information about the llvm-commits mailing list