On Tue, Sep 12, 2023 at 7:26 PM Joseph Myers <jos...@codesourcery.com> wrote: > > On Tue, 12 Sep 2023, Sylvain Noiry via Gcc-patches wrote: > > > Summary: > > Allow the creation and usage of builtins vectors of complex > > in C, using __attribute__ ((vector_size ())) > > If you're adding a new language feature like this, you need to update > extend.texi to explain the valid uses of the attribute for complex types, > and (under "Vector Extensions") the valid uses of the resulting vectors. > You also need to add testcases to the testsuite for such vectors - both > execution tests covering valid uses of the vectors, and tests that invalid > declarations or uses of such vectors (uses with any operator, or other > operand to such operator, that aren't valid) are properly rejected - go > through all cases of operators, with one or two complex vector operands, > of the same or different types, and with different choices for what type > the other operand might be when one has complex vector type, and make sure > they are all properly tested and do have the desired and documented > semantics. > > If the intended semantics are the same for C and C++, the tests should be > c-c++-common tests. Any cases where the intended semantics are different > will need separate tests for each language or appropriately conditional > test assertions in c-c++-common.
And to add - in other related discussions we always rejected adding vector types of composite types. I realize that if the hardware supports vector complex arithmetic instructions this might be the first true good reason to allow these. Richard. > -- > Joseph S. Myers > jos...@codesourcery.com