[PATCH] D87457: [ARM][TTI] Prevents constants in a min/max pattern from being hoisted when in a loop

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 10 13:08:09 PDT 2020


dmgreen added a comment.

The TTI changes here look OK to me. I think it is probably worth trying to make the ARM check a bit more specific though. We are trying to match a SSAT, not any min/max. It's worth making sure that the subtarget will have an SSAT instruction, and that the size of the type we will be saturating to will fit into an i32.

I'm not sure about having to match a more specific min(max(..)) and max(min(..)) pattern too. That will depend on how some examples look if they only have the max, but won't produce a ssat.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87457



More information about the llvm-commits mailing list