[PATCH] D121109: [AArch64] Add cost model for llvm.get.active.lane.mask intrinsic

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 7 10:16:35 PST 2022


dmgreen added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:1519
+      // suitably high cost for now.
+      return LT.first * 10;
+    }
----------------
The active_lane_mask has a default expansion. Can this add the costs expected from that expansion? Like the above fshr does.


================
Comment at: llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp:234
+    // This should be a single instruction.
+    if (!TLI->shouldExpandGetActiveLaneMask(ResVT, ArgType))
+      return 1;
----------------
sdesmalen wrote:
> Can the default case (i.e. when `shouldExpandGetActiveLaneMask = true`) be added to BasicTTIImpl?
> Then in the target's TTI, you only need to handle the case where the intrinsic is not expanded.
Does this need to be here? Or could it be part of the target independent code - assuming the cost is 1 if it is not expanded?


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

https://reviews.llvm.org/D121109



More information about the llvm-commits mailing list