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

Peter Waller via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 7 08:59:47 PST 2022


peterwaller-arm added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:17455
+        return getPTrue(DAG, SDLoc(N), N->getValueType(0),
+                        N->getConstantOperandVal(2));
     }
----------------
Notwithstanding Paul's comment, I think something like this also needs to account for the mapping between PredPattern constants and the integer %n constant.

https://github.com/llvm/llvm-project/blob/2e999b7dd1934a44d38c3a753460f1e5a217e9a5/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h#L530-L556

Note that 1-8 have a one-to-one correspondance and above that they don't.


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

https://reviews.llvm.org/D137547



More information about the llvm-commits mailing list