[PATCH] [Reassociate] Add initial support for vector instructions.

Robert Lougher rob.lougher at gmail.com
Fri Feb 13 08:57:49 PST 2015


Rebased the patch and added tests for 'or' and 'and' (previously these just showed that the operands were commuted - the tests now check that the expressions are optimized).

This is the minimum changes necessary to add reassociation of vectors.  The idea is to split the changes into smaller, reviewable chunks.  The differences with Chad's original patch is:

1. Xor instructions are not optimized (the code in the original patch is incomplete).  This will be added later.

2. Various constant handling is missing (e.g. removal of negative constant factors).  Chad's original patch extended the checks to include constant splats.  Again, these will addressed in later patches.

3. CanonicalizeNegConstExpr() was added after Chad's patch.  Again, this will be handled in later patches.

4. Tests that rely on other passes (gvn, instcombine) have either been modified or removed.

5. FIXME tests have been added for some of the missing optimizations.

Chad's original review has been dormant since October.  Note, I emailed Chad privately to make sure he was happy with someone else continuing the work.


http://reviews.llvm.org/D7566

Files:
  lib/Transforms/Scalar/Reassociate.cpp
  test/Transforms/Reassociate/fast-ReassociateVector.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7566.19894.patch
Type: text/x-patch
Size: 14105 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150213/b9dcb794/attachment.bin>


More information about the llvm-commits mailing list