This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SVE] Add the SVE dupq_lane intrinsic
ClosedPublic

Authored by kmclaughlin on Feb 17 2020, 10:51 AM.

Details

Summary

Implements the @llvm.aarch64.sve.dupq.lane intrinsic.

As specified in the ACLE, the behaviour of:

svdupq_lane_u64(data, index)

...is identical to:

svtbl(data, svadd_x(svptrue_b64(),
                                 svand_x(svptrue_b64(), svindex_u64(0, 1), 1),
                                 index * 2))

If the index is in the range [0,3], the operation is equivalent
to a single DUP (.q) instruction.

Diff Detail

Event Timeline

kmclaughlin created this revision.Feb 17 2020, 10:51 AM
Herald added a project: Restricted Project. · View Herald Transcript
sdesmalen accepted this revision.Feb 21 2020, 10:25 AM

LGTM!

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
7495

nit: auto *CIdx

7496

nit: can you replace auto in these cases with SDValue? (which I think this is?)

7506

nit: please move Zero down to its use below.

This revision is now accepted and ready to land.Feb 21 2020, 10:25 AM
kmclaughlin marked 4 inline comments as done.Feb 24 2020, 6:09 AM

Thanks for taking a look at this, @sdesmalen!

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
7496

Replaced other cases of auto here with SDValue or SDNode

This revision was automatically updated to reflect the committed changes.
kmclaughlin marked an inline comment as done.