This is an archive of the discontinued LLVM Phabricator instance.

[AArch64][SVE] Always use overloaded methods instead of preprocessor macro.
ClosedPublic

Authored by sdesmalen on Apr 12 2021, 4:11 AM.

Details

Summary

This fixes a subtle issue where:

svprf(pg, ptr, SV_ALL /*is sv_pattern instead of sv_prfop*/)

would be quietly accepted. With this change, the function declaration
guards that the third parameter is a enum sv_prfop. Previously svprf
would map directly to __builtin_sve_svprfb, which accepts the enum
operand as a signed integer and only checks that the incoming range is
valid, meaning that SV_ALL would be discarded as being outside the valid
immediate range, but would have allowed SV_VL1 without issuing a warning
(C) or error (C++).

Diff Detail

Event Timeline

sdesmalen created this revision.Apr 12 2021, 4:11 AM
sdesmalen requested review of this revision.Apr 12 2021, 4:11 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 12 2021, 4:11 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
This revision is now accepted and ready to land.Apr 13 2021, 3:29 AM
This revision was landed with ongoing or failed builds.Apr 13 2021, 1:13 PM
This revision was automatically updated to reflect the committed changes.