[PATCH] D101062: [AArch64][SVE] Better utilisation of immediate forms for bitwise/arith intrinsics

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 29 14:40:06 PDT 2021


sdesmalen added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp:13865
+static bool isAllActivePredicate(SDValue N) {
+  // Matches AArch64DAGToDAGISel::SelectAllActivePredicate().
+  unsigned NumElts = N.getValueType().getVectorMinNumElements();
----------------
bsmith wrote:
> I very much dislike the blatant duplication of this function between here and ISelDAGToDAG, however I couldn't find anywhere sensible to share code between the two (and there is already a comment like this elsewhere in this file). Any pointers for a suitable place for this function would be much appreciated!
In `AArch64DAGToDAGISel` you can call `getTargetLowering()`, which returns a `const TargetLowering *`. This can be casted to `const AArch64TargetLowering*` which in turn can be used to access `AArch64TargetLowering::isAllActivePredicate`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101062



More information about the llvm-commits mailing list