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

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 4 05:31:33 PDT 2023


RKSimon added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/LoopUtils.cpp:952
   }
-  CmpInst::Predicate Pred = getMinMaxReductionPredicate(RK);
-  Value *Cmp = Builder.CreateCmp(Pred, Left, Right, "rdx.minmax.cmp");
----------------
Mel-Chen wrote:
> xbolva00 wrote:
> > Why we dont use intrinsic in all cases?
> Refer to [[ https://reviews.llvm.org/D148221 | D148221 ]].
> My understanding is that for fp min max there are still some FMF issues to be handled.
> @RKSimon
maxnum/minnum reductions are sensitive to ordering if the values might be nan


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