[llvm] [AArch64] Lower alias mask to a whilewr (PR #100769)

David Green via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 29 10:49:40 PDT 2024


================
@@ -13782,8 +13784,89 @@ static SDValue tryLowerToSLI(SDNode *N, SelectionDAG &DAG) {
   return ResultSLI;
 }
 
+/// Try to lower the construction of a pointer alias mask to a WHILEWR.
+/// The mask's enabled lanes represent the elements that will not overlap across
+/// one loop iteration. This tries to match: or (splat (setcc_lt (sub ptrA,
+/// ptrB), -(element_size - 1))),
+///    (get_active_lane_mask 0, (div (sub ptrA, ptrB), element_size))
----------------
davemgreen wrote:

This is a bit hard to read. Maybe it is a little easier as:
```
/// one loop iteration. This tries to match:
/// or (splat (setcc_lt (sub ptrA, ptrB), -(element_size - 1))),
///    (get_active_lane_mask 0, (div (sub ptrA, ptrB), element_size))
```

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


More information about the llvm-commits mailing list