[PATCH] D17142: SystemZ: Check that argument -fzvector is only given for -z13
Ulrich Weigand via cfe-commits
cfe-commits at lists.llvm.org
Mon Feb 15 09:53:54 PST 2016
uweigand added a subscriber: uweigand.
uweigand added a comment.
I'm not sure this is the right approach. In any case, it differs from how the option is handled in GCC.
-mzvector enables the language *syntax* extension, i.e. allows use of the "vector unsigned int" etc. data types. Note that this is simply syntactic sugar, the same vector types can *always* be enabled using the attribute((vector_size)) extension instead.
Therefore, GCC allows -mzvector to be always used, even when using a -march= setting that does not include z13 vector operations. In the latter case, the operations on vector types are simply implemented via scalar operations, just like what happens when you use attribute((vector_size)) without hardware vector support.
However, there is one hitch: most of the vector *built-ins* cannot be supported without hardware vector support. But I guess the correct fix for that problem is to disable those built-ins, not to disable all of -mzvector.
http://reviews.llvm.org/D17142
More information about the cfe-commits
mailing list