This is another attempt at supporting prefer-vector-width attribute in the X86 backend. Some of this is based on a conversation I had with Eric Christopher on IRC. This is a subset of the functionality in D41341.
This patch passes the prefer vector width attribute into the X86Subtarget constructor so that we can keep it as a numeric value on the Subtarget and not just a bool flag for each width.
I've add a subtarget feature to specify a preference that should eventually be set by default for skx, cannonlake, and icelake. For now it just makes a convenient command line hook to see how the same function would be generated with and without the preference. Something that can't be done with the prefer-vector-width function attribute.
I've qualifed all known places in the X86 backend that turn 128/256-bit vectors into 512-bit vectors with the preference. Some places will only obey the preference if hasVLX is enabled. Without VLX support there sometimes isn't a way to support the operation, particularly when the operation involves a mask register.
This does not include any changes to constrain the type legalizer which we will probably still need. Hopefully the X86ISelLowering changes in this patch will mean the legalizer change only touches the X86ISelLowering constructor to qualify the setOperationAction calls.
This comment could probably use some clarification: i.e. we're going to want to use blah blah blah.
Also how is this going to work for a preferred 128 bit vector?