https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95777

            Bug ID: 95777
           Summary: Allow specifying more than one target options at the
                    same time in target and target_clones attribute
           Product: gcc
           Version: 10.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: yyc1992 at gmail dot com
  Target Milestone: ---

Currently it seems that (document and own tests) only a single option is
allowed for each version of the function using `target` and `target_clones`.
This can be a problem for options that are not strict subset of each other
(e.g. the AVX512 ones IIUC). Of course specifying `cpu=haswell` and
`cpu=skylake` for the same target doesn't make much sense so some checking
should be in place but I believe allowing multiple directly testable features
to be specified at the same time should be allowed.

A related issue is that while one can indeed do some of these by specifying a
`arch=<cpu>`. However, even if the runtime CPU supports all the features it'll
still not get selected if the name doesn't exactly match (tested with
`arch=haswell` on my kabelake laptop). If a fallback could be implemented to
make this work that will be also good enough for me at least...

Reply via email to