[PATCH] D106561: [AArch64] Optimise min/max lowering in ISel

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 27 10:50:13 PDT 2021


dmgreen added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:1037
     setOperationAction(ISD::BITREVERSE, MVT::v2i64, Custom);
+    setOperationAction(ISD::UMAX, MVT::v1i64, Custom);
+    setOperationAction(ISD::UMAX, MVT::v2i64, Custom);
----------------
Can these go into a loop, looping over the UMAX/UMIN/...


================
Comment at: llvm/test/Analysis/CostModel/AArch64/min-max.ll:1
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
 ; RUN: opt < %s -mtriple=aarch64--linux-gnu -cost-model -analyze | FileCheck %s --check-prefix=COST
----------------
Rin wrote:
> david-arm wrote:
> > dmgreen wrote:
> > > I was updating this file the other day. I think if you rebase the changes may disappear.
> > nit: It might be easier to review the patch if you first introduced a NFC change to update the tests using utils/update_analyze_test_checks.py?
> Ah, fair, I'll rebase then
It turns out I had not updated that test yet.. it should now have the changes I mentioned, if you rebase the patch.

Can you make sure the instructions have a proper cost now too? They should be 2 I think. There is already some code in AArch64TTIImpl::getIntrinsicInstrCost for it.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106561



More information about the llvm-commits mailing list