Bug 88602 - Consider adding ext_vector_type for better clang compatibility
Summary: Consider adding ext_vector_type for better clang compatibility
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 9.0
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-26 16:55 UTC by Jan Hubicka
Modified: 2019-01-02 10:34 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Hubicka 2018-12-26 16:55:34 UTC
Clang has attribute ext_vector_type which is like vector_size but it accepts number of lanes.  This is used by some vector code and while it can be replaced by multiplication by sizeof (elt_type) it may be good idea to add it.
Comment 1 Jan Hubicka 2019-01-02 09:25:54 UTC
It turns out that ext_vector_type attribute is not only about declaring vector variable but also affects semantics. Brief documentation is in https://clang.llvm.org/docs/LanguageExtensions.html#vectors-and-extended-vectors
and see also discussion in 
http://hubicka.blogspot.com/2018/12/even-more-fun-with-building-and.html

I can confirm that Skia code is somewhat more compact/ergonomic with the extension though i still do not fully understand the design.