I believe this is what we talked about on IRC. If you would prefer a different name for the attributes I'm happy to change it.
There are a bunch of intrinsics that are implemented as macros so there's no place to put the attribute other than user's code. But that would be a compatibility issue. Should use of a target specific builtin automatically imply the minimum vector width required by that builtin?
There are also a bunch of intrinsics that are implemented as macros using target independent builtins like builtin_shufflevector. For those intrinsics I have no way of expressing a vector width requirement unless we want to make builtin_shufflevector require the vector width of its arguments. Or we could make x86 specific builtins that generate the correct shuffles using custom code in CGBuiltin.cpp
How do we want to encode the required vector width for a builtin? Do we want to parse the type string for the builtins and infer for that? Or should we encode it in the attribute string for the builtin?
To avoid confusion with the actual width returning, maybe WidthPos? or just Pos?