This is an archive of the discontinued LLVM Phabricator instance.

[clang][SveEmitter] Fix enum declarations. [NFCI]
ClosedPublic

Authored by fpetrogalli on Nov 12 2020, 3:25 AM.

Details

Summary

Adapt the declarations of svpattern and svprfop to the most recent
one defined in section "5. Enum declarations" of the SVE ACLE
specifications [1].

The signature of the intrinsics using these enums have been changed
accordingly.

A test has been added to make sure that svpattern and svprfop are
not typedefs.

[1] https://developer.arm.com/documentation/100987/latest, version
00bet6

Diff Detail

Event Timeline

fpetrogalli created this revision.Nov 12 2020, 3:25 AM
fpetrogalli requested review of this revision.Nov 12 2020, 3:25 AM

Thanks for the patch @fpetrogalli! One small comment from me, but not a blocker for me, so approved.

clang/test/Sema/aarch64-sve-enums.c
15–16

[nit] It would be good if you could add a small comment here explaining what this is doing. As far as I can tell, you're creating a typedef'd struct with the same identifier as the one defined in arm_sve.h, then checking that it does not overload enum svpattern defined in arm_sve.h?

joechrisellis accepted this revision.Nov 12 2020, 7:33 AM
This revision is now accepted and ready to land.Nov 12 2020, 7:33 AM

Improve comment in test.

fpetrogalli marked an inline comment as done.Nov 12 2020, 12:50 PM
This revision was landed with ongoing or failed builds.Nov 16 2020, 6:50 AM
This revision was automatically updated to reflect the committed changes.