[PATCH] D137547: [AArch64][SVE] Use PTRUE instruction for get_active_lane_mask intrinsic if the range is appropriate for predicator constant

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 24 07:39:29 PST 2022


paulwalker-arm added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:4758-4759
+      unsigned ElementSize = 128 / Op.getValueType().getVectorMinNumElements();
+      unsigned NumActiveElems =
+          Op.getConstantOperandVal(2) - Op.getConstantOperandVal(1);
+      Optional<unsigned> PredPattern =
----------------
paulwalker-arm wrote:
> This doesn't look correct because `while` can take 64-bit operation. This code can truncate the result in such a way that a ptrue might incorrectly look like a viable replacement.
Sorry I meant "while can take 64-bit operands".


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137547



More information about the llvm-commits mailing list