This is an archive of the discontinued LLVM Phabricator instance.

[ARM, AArch64] Add Rotate Right (ROR) Intrinsic.
AbandonedPublic

Authored by mgrang on Jun 16 2016, 6:28 PM.

Details

Summary

Here is the Clang part of this patch:
http://reviews.llvm.org/D21457

Diff Detail

Event Timeline

mgrang updated this revision to Diff 61057.Jun 16 2016, 6:28 PM
mgrang retitled this revision from to [ARM, AArch64] Add Rotate Right (ROR) Intrinsic..
mgrang updated this object.
mgrang added reviewers: t.p.northover, grosbach.
mgrang added a subscriber: apazos.
mgrang updated this object.Jun 16 2016, 6:33 PM

Hi,

I'm not sure I understand why we need this. Doesn't normal bit-twiddling in C select the right instruction?

James

mgrang added a comment.EditedJun 17 2016, 11:47 AM

Hi James,

(copying over my response from the Clang part of this patch)

The use case for this intrinsic is a customer who makes calls to __builtin_arm_ror in their code base. Currently they compile with ARMCC, but LLVM does not have this intrinsic. So porting the code to build with LLVM becomes a hassle.

To facilitate customers to switch to LLVM we wanted to implement the following intrinsics:

ror: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0472m/chr1359125001077.html
enable_irq: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0472m/chr1359124996163.html
disable_irq: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0472m/chr1359125001077.html
current_sp : http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0472m/chr1359124995149.html
current_pc : http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0472m/chr1359124994884.html
breakpoint : http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0491c/CJAHBCFH.html

Could you please let me know if this is something that the community would like to support? I can then implement each one of these (although we can work on the implementation details).

Thanks,
Mandeep

mgrang abandoned this revision.Oct 21 2016, 10:41 AM