[PATCH] D149731: [IR] New function llvm::createMinMaxSelectCmpOp for creating min/max operation in select-cmp form

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 3 02:20:56 PDT 2023


nikic added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/LoopUtils.cpp:943
 
+Value *llvm::createMinMaxSelectCmpOp(IRBuilderBase &Builder, RecurKind RK,
+                                     Value *Left, Value *Right) {
----------------
Mel-Chen wrote:
> xbolva00 wrote:
> > We have intrinsics for min and max. Do not emit cmp select form..
> I am aware that we can use intrinsic to represent min max operations, but this patch aims to preserve the ability to express min max operations in select-cmp form. This is necessary for the vectorization feature I am currently developing. It is important to emphasize that this patch does not enforce the use of select-cmp form for min max operations, but rather provides an additional option.
Why does your patch require the non-canonical select-cmp form? Please explain this in the patch description.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149731/new/

https://reviews.llvm.org/D149731



More information about the llvm-commits mailing list