summaryrefslogtreecommitdiffstats
path: root/clang/test/Parser/cxx-altivec.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove the -faltivec alias option and replace it with -maltivec everywhere.Eric Christopher2017-03-211-3/+3
| | | | | | | | | | | The alias was only ever used on darwin and had some issues there, and isn't used in practice much. Also fixes a problem with -mno-altivec not turning off -maltivec. Also add a diagnostic for faltivec/fno-altivec that directs users to use maltivec options and include the altivec.h file explicitly. llvm-svn: 298449
* The time when -faltivec (or, on clang only, -maltivec) will magicallyEric Christopher2016-03-241-0/+1
| | | | | | | | | include altivec.h has come and gone. Rationale: This causes modules, rewrite-includes, etc to be sad and people should just include altivec.h in their source. llvm-svn: 264235
* Add builtins for the 64-bit vector integer arithmetic instructions added in ↵Kit Barton2015-03-111-6/+7
| | | | | | | | | | POWER8. These are the Clang-related changes for the instructions added to LLVM in http://reviews.llvm.org/D7959. Phabricator review: http://reviews.llvm.org/D8041 llvm-svn: 231931
* [PowerPC]Activate "vector bool long long" (and alternate spellings) as a ↵Bill Seurer2015-03-031-2/+17
| | | | | | | | | | | | valid type for Altivec support for Power. There are two test case updates for very basic testing. While I was editing cxx-altivec.cpp I also updated it to better match some other changes in altivec.c. Note: "vector bool long" was not also added because its use is considered deprecated. http://reviews.llvm.org/D7235 llvm-svn: 231118
* [PowerPC] Initial VSX intrinsic support, with min/max for vector doubleBill Schmidt2014-10-311-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we have initial support for VSX, we can begin adding intrinsics for programmer access to VSX instructions. This patch performs the necessary enablement in the front end, and tests it by implementing intrinsics for minimum and maximum using the vector double data type. The main change in the front end is to no longer disallow "vector" and "double" in the same declaration (lib/Sema/DeclSpec.cpp), but "vector" and "long double" must still be disallowed. The new intrinsics are accessed via vec_max and vec_min with changes in lib/Headers/altivec.h. Note that for v4f32, we already access corresponding VMX builtins, but with VSX enabled we should use the forms that allow all 64 vector registers. The new built-ins are defined in include/clang/Basic/BuiltinsPPC.def. I've added a new test in test/CodeGen/builtins-ppc-vsx.c that is similar to, but much smaller than, builtins-ppc-altivec.c. This allows us to test VSX IR generation without duplicating CHECK lines for the existing bazillion Altivec tests. Since vector double is now legal when VSX is available, I've modified the error message, and changed where we test for it and for vector long double, since the target machine isn't visible in the old place. This serendipitously removed a not-pertinent warning about 'long' being deprecated when used with 'vector', when "vector long double" is encountered and we just want to issue an error. The existing tests test/Parser/altivec.c and test/Parser/cxx-altivec.cpp have been updated accordingly, and I've added test/Parser/vsx.c to verify that "vector double" is now legitimate with VSX enabled. There is a companion patch for LLVM. llvm-svn: 220989
* Move __vector long deprecation checking into DeclSpec::FinishHal Finkel2014-08-241-0/+5
| | | | | | | | | | | | __vector long is deprecated, but __vector long long is not. As a result, we cannot check for __vector long (to issue the deprecation warning) as we parse the type because we need to know how many 'long's we have first. DeclSpec::Finish seems like a more-appropriate place to perform the check (which places it with several other similar Altivec vector checks). Fixes PR20720. llvm-svn: 216342
* [PPC64LE] Run some existing Altivec tests on powerpc64le as wellBill Schmidt2014-06-131-0/+2
| | | | | | | | | | | There are several Altivec tests that formerly ran only on big-endian targets (and in some cases only on 32-bit targets). It is useful to verify these on little-endian targets as well. While testing these, I discovered a typo in <altivec.h>. This is also fixed by this patch. llvm-svn: 210928
* Print detailed vector type information on diagnostics.Benjamin Kramer2014-04-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | 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
* Fix Altivec vector literal parser hack for C++11.Eli Friedman2013-08-131-1/+5
| | | | | | | It doesn't make any sense to accept "..." in the argument to a C-style cast, so use a separate expression list parsing routine which rejects it. PR16874. llvm-svn: 188330
* Modify how the -verify flag works. Currently, the verification string andRichard Trieu2011-12-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | diagnostic message are compared. If either is a substring of the other, then no error is given. This gives rise to an unexpected case: // expect-error{{candidate function has different number of parameters}} will match the following error messages from Clang: candidate function has different number of parameters (expected 1 but has 2) candidate function has different number of parameters It will also match these other error messages: candidate function function has different number of parameters number of parameters This patch will change so that the verification string must be a substring of the diagnostic message before accepting. Also, all the failing tests from this change have been corrected. Some stats from this cleanup: 87 - removed extra spaces around verification strings 70 - wording updates to diagnostics 40 - extra leading or trailing characters (typos, unmatched parens or quotes) 35 - diagnostic level was included (error:, warning:, or note:) 18 - flag name put in the warning (-Wprotocol) llvm-svn: 146619
* comparison of AltiVec vectors now gives bool result (fix for 7533)Anton Yartsev2010-11-181-18/+8
| | | | llvm-svn: 119678
* Add more error checking to attribute vecreturnJohn Thompson2010-09-181-0/+17
| | | | llvm-svn: 114251
* Added vecreturn attribute parsing.John Thompson2010-08-091-0/+35
| | | | llvm-svn: 110609
* Fix vector literal/cast confusion - bug 6895.John Thompson2010-06-301-0/+8
| | | | llvm-svn: 107347
* improve altivec vector bool/pixel support, patch by Anton YartsevChris Lattner2010-06-231-3/+14
| | | | | | with several tweaks by me. llvm-svn: 106619
* reapply john's patch, he broke mainline again by changing the test.Chris Lattner2010-04-201-0/+2
| | | | llvm-svn: 101871
* revert r101863, whcih is causing Sema/altivec-init.c to fail on a tonChris Lattner2010-04-201-2/+0
| | | | | | | | | | of buildbots with: error: 'error' diagnostics expected but not seen: Line 9: too few elements in vector initialization (expected 8 elements, have 2) 1 warning and 1 error generated. llvm-svn: 101864
* Altivec vector literal initializer count mismatch error removed.John Thompson2010-04-201-0/+2
| | | | llvm-svn: 101863
* improve altivec c++ support by adding casts, patch byChris Lattner2010-04-141-1/+0
| | | | | | Anton Yartsev! llvm-svn: 101281
* implement altivec.h and a bunch of support code, patch by Anton Yartsev!Chris Lattner2010-04-141-2/+2
| | | | llvm-svn: 101215
* Improve diagnostics when we fail to convert from a source type to aDouglas Gregor2010-04-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | destination type for initialization, assignment, parameter-passing, etc. The main issue fixed here is that we used rather confusing wording for diagnostics such as t.c:2:9: warning: initializing 'char const [2]' discards qualifiers, expected 'char *' [-pedantic] char *name = __func__; ^ ~~~~~~~~ We're not initializing a 'char const [2]', we're initializing a 'char *' with an expression of type 'char const [2]'. Similar problems existed for other diagnostics in this area, so I've normalized them all with more precise descriptive text to say what we're initializing/converting/assigning/etc. from and to. The warning for the code above is now: t.c:2:9: warning: initializing 'char *' from an expression of type 'char const [2]' discards qualifiers [-pedantic] char *name = __func__; ^ ~~~~~~~~ Fixes <rdar://problem/7447179>. llvm-svn: 100832
* implement support for -Wno-deprecated, PR6534. WhileChris Lattner2010-03-071-18/+18
| | | | | | | I'm in there, change the altivec diagnostics to use 'double' instead of "double" for consistency. llvm-svn: 97919
* First stage of adding AltiVec supportJohn Thompson2010-02-051-0/+108
llvm-svn: 95335
OpenPOWER on IntegriCloud