summaryrefslogtreecommitdiffstats
path: root/clang/test/Sema/vector-ops.c
Commit message (Collapse)AuthorAgeFilesLines
* Revert "PR17164: Change clang's default behavior from ↵Mitch Phillips2020-01-231-2/+1
| | | | | | | | | | | | -flax-vector-conversions=all to -flax-vector-conversions=integer." This patch broke the Sanitizer buildbots. Please see the commit's differential revision for more information (https://reviews.llvm.org/D67678). This reverts commit b72a8c65e4e34779b6bc9e466203f553f5294486. (cherry picked from commit edd4398f4cd33a305afbca76ac4e6590e9337f4d)
* PR17164: Change clang's default behavior from -flax-vector-conversions=all ↵Richard Smith2020-01-171-1/+2
| | | | | | | | | | | | | | | | | | to -flax-vector-conversions=integer. Summary: See proposal on cfe-dev: http://lists.llvm.org/pipermail/cfe-dev/2019-April/062030.html Reviewers: SjoerdMeijer, eli.friedman Subscribers: kristof.beyls, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D67678 (cherry picked from commit b72a8c65e4e34779b6bc9e466203f553f5294486)
* [Sema] Support implicit scalar to vector conversionsSimon Dardis2017-05-121-70/+70
| | | | | | | | | | | | | | | | | | This patch teaches clang to perform implicit scalar to vector conversions when one of the operands of a binary vector expression is a scalar which can be converted to the element type of the vector without truncation following GCC's implementation. If the (constant) scalar is can be casted safely, it is implicitly casted to the vector elements type and splatted to produce a vector of the same type. Contributions from: Petar Jovanovic Reviewers: bruno, vkalintiris Differential Revision: https://reviews.llvm.org/D25866 llvm-svn: 302935
* [Sema] Retarget test to a specific platform for consistent datasizesSimon Dardis2017-04-061-1/+1
| | | | | | | | Attempt to satisfy llvm-clang-x86_64-expensive-checks-win by targeting x86_64-apple-darwin10 for Sema/vector-ops.c. The underlying failure is due to datatype differences between platforms. llvm-svn: 299643
* [Sema] Extend GetSignedVectorType to deal with non ExtVector typesSimon Dardis2017-04-061-3/+109
| | | | | | | | | | | | | This improves some error messages which would otherwise refer to ext_vector_type types in contexts where there are no such types. Factored out from D25866 at reviewer's request. Reviewers: bruno Differential Revision: https://reviews.llvm.org/D31667 llvm-svn: 299641
* Print detailed vector type information on diagnostics.Benjamin Kramer2014-04-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | We never aka vector types because our attributed syntax for it is less comprehensible than the typedefs. This leaves the user in the dark when the typedef isn't named that well. Example: v2s v; v4f w; w = v; The naming in this cases isn't even that bad, but the error we give is useless without looking up the actual typedefs. t.c:6:5: error: assigning to 'v4f' from incompatible type 'v2s' Now: t.c:6:5: error: assigning to 'v4f' (vector of 4 'float' values) from incompatible type 'v2s' (vector of 2 'int' values) We do this for all diagnostics that print a vector type. llvm-svn: 207267
* Use raw_ostream in TypePrinter and eliminate uses of temporary std::strings.Argyrios Kyrtzidis2012-05-051-1/+1
| | | | | | Part of rdar://10796159 llvm-svn: 156228
* Unpluralize -Wfoo-conversions warnings for consistency.David Blaikie2012-03-151-1/+1
| | | | | | | | | | | | Err on the side of brevity and rename (while providing aliases for the original name) -Wbool-conversions, -Wint-conversions, and -Wvector-conversions for consistency with constant, literal, string, and sign conversion warnings. And name the diagnostic groups explicitly while I'm here rather than rewriting the string in the groups and sema td files. Curiously, vector-conversion is not under -Wconversion. Perhaps it should be. llvm-svn: 152776
* The comparison of two vectors should return a signed result. ↵Tanya Lattner2011-10-171-2/+3
| | | | | | | | | hasIntegerRepresentation() used to always return false for vectors, but since it was changed, it also changed the return type of a compare of two unsigned vectors to be unsigned. This patch removes the check for hasIntegerRepresentation since its not needed and returns the appropriate signed type. I added a new test case and updated exisiting test cases that assumed an unsigned result. llvm-svn: 142250
* AltiVec vector comparison logic now affect only vectors of fundamental ↵Anton Yartsev2011-03-271-0/+3
| | | | | | AltiVec vector types. It fixes bug 9347. llvm-svn: 128381
* Vectors are not integer types, so the type system should not classifyDouglas Gregor2010-07-231-0/+25
them as such. Type::is(Signed|Unsigned|)IntegerType() now return false for vector types, and new functions has(Signed|Unsigned|)IntegerRepresentation() cover integer types and vector-of-integer types. This fixes a bunch of latent bugs. Patch from Anton Yartsev! llvm-svn: 109229
OpenPOWER on IntegriCloud