[PATCH] D62414: [InstCombine] canonicalize fcmp+select to minnum/maxnum intrinsics

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 24 11:34:48 PDT 2019


spatel created this revision.
spatel added reviewers: arsenm, efriedma, lebedev.ri.
Herald added subscribers: hiraditya, wdng, mcrosier.
Herald added a project: LLVM.

This is the opposite direction of D62158 <https://reviews.llvm.org/D62158> (we have to choose 1 form or the other). Now that we have FMF on the select, this becomes more palatable. And the benefits of having a single IR instruction for this operation (less chances of missing folds based on extra uses, etc) overcome my previous comments about the potential advantage of larger pattern matching/analysis. I'll abandon the other patch if there's general agreement.


https://reviews.llvm.org/D62414

Files:
  llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
  llvm/test/Transforms/InstCombine/fast-math.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62414.201295.patch
Type: text/x-patch
Size: 5481 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190524/19664b26/attachment.bin>


More information about the llvm-commits mailing list