[PATCH] D141043: [AArch64][SVE] Avoid AND operation if both side are splat of i1 or PTRUE

Dinar Temirbulatov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 6 07:45:05 PST 2023


dtemirbulatov added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:16271
+  // we can produce just i1 splat_vector as the result
+  SDValue Op0 = findRootNonReinterpretNode(Src);
+  SDValue Op1 = findRootNonReinterpretNode(N->getOperand(1));
----------------
sdesmalen wrote:
> I think you can use the existing function `isAllActivePredicate` to check if either of the operands is an all active-predicate. This function already looks through reinterpret nodes and already checks both the splat/ptrue case.
but I need to check and return ptrue/splat node and isAllActivePredicate() just checks.


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

https://reviews.llvm.org/D141043



More information about the llvm-commits mailing list