Page MenuHomePhabricator

[AArch64] Add support for various operations on nxv1i1 types.
ClosedPublic

Authored by sdesmalen on Jun 29 2022, 9:26 AM.

Details

Summary

The supported operations are:

  • Logical operations (and, or, xor, bic)
  • Logical reductions (and, or, xor, [us]min, [us]max)
  • Conversions to/from svbool_t
  • Predicate count (CNTP)

Diff Detail

Event Timeline

sdesmalen created this revision.Jun 29 2022, 9:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 29 2022, 9:26 AM
sdesmalen requested review of this revision.Jun 29 2022, 9:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 29 2022, 9:26 AM
sdesmalen updated this revision to Diff 441059.Jun 29 2022, 9:50 AM

Fixed bug in lowering of aarch64_sve_cntp.

sdesmalen updated this revision to Diff 441434.Jun 30 2022, 9:24 AM

Move the lowering of nxv1i1 llvm.aarch64.sve.cntp to the operation that
lowered to that intrinsic (VECREDUCE_OR), so that all the intrinsics only
support legal types.

paulwalker-arm added inline comments.Jul 5 2022, 4:31 PM
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
21113

Can this be Pg because you've updated getPTrue so getPredicateForVector should do the right thing?

llvm/test/CodeGen/AArch64/sve-int-pred-reduce.ll
112–114

Given this patch fixes the xor reductions is it worth merging this patch with D129081?

sdesmalen updated this revision to Diff 442456.Jul 6 2022, 1:12 AM
sdesmalen marked an inline comment as done.

Use Pg instead of creating a new predicate for VECREDUCE_XOR.

sdesmalen added inline comments.Jul 6 2022, 1:16 AM
llvm/test/CodeGen/AArch64/sve-int-pred-reduce.ll
112–114

This patch already has quite a lot going on, so I'd rather keep them separate if that's alright. I did regenerate the tests for the other patch after rebasing it on top of this patch.

paulwalker-arm accepted this revision.Jul 6 2022, 2:49 AM
paulwalker-arm added inline comments.
llvm/test/CodeGen/AArch64/sve-int-pred-reduce.ll
112–114

Stacking the patches works for me. Thanks.

This revision is now accepted and ready to land.Jul 6 2022, 2:49 AM
This revision was landed with ongoing or failed builds.Jul 6 2022, 8:58 AM
This revision was automatically updated to reflect the committed changes.