[PATCH] D113776: [Clang][SVE] Properly enable/disable dependant SVE target features based upon +(no)sve.* options

Sander de Smalen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 16 10:04:36 PST 2021


sdesmalen added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Arch/AArch64.cpp:73
 static bool DecodeAArch64Features(const Driver &D, StringRef text,
                                   std::vector<StringRef> &Features,
                                   llvm::AArch64::ArchKind ArchKind) {
----------------
bsmith wrote:
> sdesmalen wrote:
> > does the order of the features matter?
> > ```+sve,+nosve => disables sve
> > +nosve,+sve => enables sve
> > +nosve,+sve2 => enables sve and sve2```
> > 
> > 
> Yes it does, but I believe that is the desired behaviour.
Doesn't your patch change this behaviour? The condition on line 147 no longer considers the original order of the flags.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D113776/new/

https://reviews.llvm.org/D113776



More information about the cfe-commits mailing list