[PATCH] D53533: [Reassociate] replace fake binop queries with 'match' API

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 22 15:44:07 PDT 2018


spatel created this revision.
spatel added reviewers: cameron.mcinally, mcrosier, dsanders.

We need to update this code before introducing an 'fneg' instruction in IR, so we might as well kill off the integer neg/not queries too.

This is no-functional-change-intended for integer code and most vector code. For vectors, we can see that the 'match' API allows for undef elements in constants, so we optimize those cases better.

Ideally, there would be a test for each code diff, but I don't see evidence of that for the existing code, so I didn't try very hard to come up with new vector tests for each code change.


https://reviews.llvm.org/D53533

Files:
  lib/Transforms/Scalar/Reassociate.cpp
  test/Transforms/Reassociate/inverses.ll
  test/Transforms/Reassociate/negation.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53533.170513.patch
Type: text/x-patch
Size: 6134 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181022/157d4a82/attachment.bin>


More information about the llvm-commits mailing list