[PATCH] D41136: [EarlyCSE] recognize commuted and swapped variants of min/max as equivalent (PR35642)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 13 10:45:03 PST 2017


spatel updated this revision to Diff 126784.
spatel added a comment.

Patch updated:
Use ValueTracking's matchSelectPattern() rather than pattern matchers for min/max. This:

1. Makes the patch smaller
2. Catches more cases (extra test added)
3. Allows follow-up patches to enable abs() and FP min/max more easily


https://reviews.llvm.org/D41136

Files:
  lib/Transforms/Scalar/EarlyCSE.cpp
  test/Transforms/EarlyCSE/commute.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41136.126784.patch
Type: text/x-patch
Size: 6292 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171213/e4c0fc90/attachment.bin>


More information about the llvm-commits mailing list