Page MenuHomePhabricator

[ARM,MVE] Add predicated intrinsics for many unary functions.
ClosedPublic

Authored by simon_tatham on Feb 26 2020, 4:23 AM.

Details

Summary

This commit adds the predicated MVE intrinsics for the same set of
unary operations that I added in their unpredicated forms in

but since the predicated versions are a lot more similar to each
other, I've kept them all together in a single big patch. Everything
here is done in the standard way we've been doing other predicated
operations: an IR intrinsic called @llvm.arm.mve.foo.predicated and
some isel rules that match that alongside whatever they accept for the
unpredicated version of the same instruction.

In order to write the isel rules conveniently, I've refactored the
existing isel rules for the affected instructions into multiclasses
parametrised by a vector-type class, in the usual way. All those
refactorings are intended to leave the existing isel rules unchanged:
the only difference should be that new ones for the predicated
intrinsics are introduced.

The only tiny infrastructure change I needed in this commit was to
change the implementation of IntrinsicMX in arm_mve_defs.td so
that the records it defines are anonymous rather than named (and use
NameOverride to set the output intrinsic name), which allows me to
call it twice in two multiclasses with the same NAME without a
tablegen-time error.

Diff Detail

Event Timeline

simon_tatham created this revision.Feb 26 2020, 4:23 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptFeb 26 2020, 4:23 AM
This revision is now accepted and ready to land.Feb 26 2020, 5:58 AM
This revision was automatically updated to reflect the committed changes.