[PATCH] D88287: [NARY-REASSOCIATE] Support reassociation of min/max

Evgeniy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 25 01:56:36 PDT 2020


ebrevnov created this revision.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
ebrevnov requested review of this revision.

Support reassociation for min/max. With that we should be able to transform min(min(a, b), c) -> min(min(a, c), b) if min(a, c) is already available.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D88287

Files:
  llvm/include/llvm/IR/PatternMatch.h
  llvm/include/llvm/Transforms/Scalar/NaryReassociate.h
  llvm/lib/Transforms/Scalar/NaryReassociate.cpp
  llvm/test/Transforms/NaryReassociate/nary-smax.ll
  llvm/test/Transforms/NaryReassociate/nary-smin.ll
  llvm/test/Transforms/NaryReassociate/nary-umax.ll
  llvm/test/Transforms/NaryReassociate/nary-umin.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88287.294253.patch
Type: text/x-patch
Size: 32155 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200925/89c577ee/attachment.bin>


More information about the llvm-commits mailing list