[llvm] [Analysis][AArch64] Add cost model for loop.dependence.{war/raw}.mask (PR #167551)

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 11 05:09:19 PST 2025


================
@@ -2139,6 +2139,53 @@ class BasicTTIImplBase : public TargetTransformInfoImplCRTPBase<T> {
       // Otherwise, fallback to default scalarization cost.
       break;
     }
+    case Intrinsic::loop_dependence_war_mask:
+    case Intrinsic::loop_dependence_raw_mask: {
+      // Compute the cost of the expanded version of these intrinsics:
+      //
+      // The possible expansions are...
+      //
+      // loop_dependence_war_mask:
+      //   diff = (ptrB - ptrA) / eltSize
+      //   cmp = icmp sle diff, 0
+      //   upper_bound = select cmp, -1, diff
+      //   mask = get_active_lane_mask lane_offset, upper_bound
----------------
sdesmalen-arm wrote:

what is `lane_offset` in this context? would this just be `0`?

https://github.com/llvm/llvm-project/pull/167551


More information about the llvm-commits mailing list