This is an archive of the discontinued LLVM Phabricator instance.

[AArch64 NEON] Support poly128_t and implement relevant intrinsic. -LLVM
ClosedPublic

Authored by kevin.qin on Dec 5 2013, 5:47 PM.

Details

Reviewers
t.p.northover
Summary

Hi,

This patch implement ACLE intrinsic with poly128_t newly introduced. Because of Clang and LLVM limits(quite a lot of APIs about i128 doesn't exist), the LLVM intrinsic is defined on v16i8 instead of i128. This is a work around solution, but in current framework, it is the simplest way to get poly128_t supported. Please review. Thanks.

Diff Detail

Event Timeline

Hi Kevin,

I think the load/store intrinsics are unnecessary; you can use a normal load or store instruction here quite happily (perhaps with a bitcast around it, though even that's probably excessive).

The pmull changes look reasonable though.

Cheers.

Tim.

Hi Tim,

Thanks for your review. Previously, I tried normal load/store, llvm will
use two GPR64 instead of FPR128 to store poly128. And because of this, each
load/store of poly128 will emit 2 load/store operations on two GPR64. To
solve this, I need to bind i128 to FPR128, while it may cause more trouble
as AArch64 doesn't really support i128. If end-user want to make some
128-bit calculation on aarch64 target, mostly he'll get some trouble.
Also, I don't want bind i128 load/store to FPR128. In fact, NEON only
provide 1 calculation(PMULL) working on i128. So I guess for most of the
case loading or storing i128, the data will be used by some library
functions running on cores instead of NEON, so storing i128 to two GPR64 is
more general.

2013/12/6 Tim Northover <t.p.northover@gmail.com>

Hi Kevin,

I think the load/store intrinsics are unnecessary; you can use a normal

load or store instruction here quite happily (perhaps with a bitcast around
it, though even that's probably excessive).

The pmull changes look reasonable though.

Cheers.

Tim.

http://llvm-reviews.chandlerc.com/D2344

kevin.qin updated this revision to Unknown Object (????).Dec 8 2013, 10:26 PM

Removed AArch64 intrinsic for load/store poly128 and use common load/store f128 instead. Please review, thanks.

t.p.northover accepted this revision.Dec 9 2013, 3:33 AM

This looks good to me, thanks for working on the updated version.

Cheers.

Tim.

Eugene.Zelenko closed this revision.Oct 4 2016, 4:37 PM
Eugene.Zelenko added a subscriber: Eugene.Zelenko.

Committed in rL196887.