[PATCH] D57516: [PatternMatch] add special-case uaddo matching for increment-by-one

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 31 08:07:34 PST 2019


spatel created this revision.
spatel added reviewers: RKSimon, sanjoy, lebedev.ri.
Herald added a subscriber: mcrosier.

This is the most important uaddo problem mentioned in PR31754:
https://bugs.llvm.org/show_bug.cgi?id=31754

We were failing to match the canonicalized pattern when it's an 'add 1' operation.
Pattern matching, however, shouldn't assume that we have canonicalized IR, so we match 4 commuted variants of uaddo.

There's also a test with a crazy type to show that the existing CGP transform based on this matcher is not limited by target legality checks.


https://reviews.llvm.org/D57516

Files:
  include/llvm/IR/PatternMatch.h
  test/CodeGen/X86/codegen-prepare-uaddo.ll
  test/Transforms/CodeGenPrepare/overflow-intrinsics.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57516.184507.patch
Type: text/x-patch
Size: 5458 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190131/5f0e67cd/attachment.bin>


More information about the llvm-commits mailing list