summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* [OpenCL] Remove tests without triple from test/Headers/opencl-c-header.cl.Yaxun Liu2016-05-301-4/+0
| | | | | | This test requires triples with Itanium C++ ABI whereas triples with MSVC environment uses Microsoft C++ ABI. llvm-svn: 271198
* [OpenCL] Add the default header file opencl-c.h for OpenCL C languageYaxun Liu2016-05-301-0/+37
| | | | | | | | | | | | OpenCL has large number of "builtin" functions ("builtin" in the sense of OpenCL spec) which are defined in header files. To compile OpenCL kernels using these builtin functions, a header file is needed. This header file is based on the Khronos implementation (https://github.com/KhronosGroup/SPIR/blob/spirv-1.0/lib/Headers/opencl.h) with heavy refactoring. Re-commit after fixing failures on ppc64/systemz etc. Differential Revision: http://reviews.llvm.org/D18369 llvm-svn: 271197
* Enable some accidentally dead tests and fix up the bitrotDavid Blaikie2016-05-294-7/+10
| | | | | | | | | | | Problem found by Nico, originally committed by me in r213213. The .test prefix wasn't actually being run. Once that was fixed the test cases had outdated command line syntax and IR debug info format, so updated for those issues to get them back up and running. Thanks Nico! llvm-svn: 271188
* Mark test as requiring x86-registered-target.Rafael Espindola2016-05-291-0/+1
| | | | llvm-svn: 271163
* Handle -Wa,--mrelax-relocations=[no|yes].Rafael Espindola2016-05-293-0/+25
| | | | llvm-svn: 271162
* Revert r271136 [OpenCL] Add the default header file opencl-c.h for OpenCL C ↵Yaxun Liu2016-05-281-9/+0
| | | | | | language due to build failure on ppc64/hexagon/systemz. llvm-svn: 271144
* CodeGen: support blocks on COFF targets in DLLsSaleem Abdulrasool2016-05-281-0/+76
| | | | | | | | | | | This extends the blocks support to support blocks with a dynamically linked blocks runtime. The previous code generation would work only for static builds of the blocks runtime. Mark the block "isa" pointers and functions as dllimport if no explicit declaration marked with __declspec(dllexport) is found. This additional check allows for the use of the functionality in the runtime library if desired. llvm-svn: 271138
* [OpenCL] Add the default header file opencl-c.h for OpenCL C languageYaxun Liu2016-05-281-0/+9
| | | | | | | | | | OpenCL has large number of "builtin" functions ("builtin" in the sense of OpenCL spec) which are defined in header files. To compile OpenCL kernels using these builtin functions, a header file is needed. This header file is based on the Khronos implementation (https://github.com/KhronosGroup/SPIR/blob/spirv-1.0/lib/Headers/opencl.h) with heavy refactoring. Differential Revision: http://reviews.llvm.org/D18369 llvm-svn: 271136
* [AVX512] Add masked v16i32 and v8i64 unaligned store tests.Craig Topper2016-05-281-0/+12
| | | | llvm-svn: 271134
* [driver][mips] Revert support for CodeSourcery MIPS toolchainSimon Atanasyan2016-05-28179-0/+696
| | | | | | This is revert of r270366. The support for CS toolchain were dropped too early. llvm-svn: 271109
* [X86][SSE] Replace VPMOVSX and (V)PMOVZX integer extension intrinsics with ↵Simon Pilgrim2016-05-283-24/+30
| | | | | | | | | | | | | | generic IR (clang) The VPMOVSX and (V)PMOVZX sign/zero extension intrinsics can be safely represented as generic __builtin_convertvector calls instead of x86 intrinsics. This patch removes the clang builtins and their use in the sse2/avx headers - a companion patch will remove/auto-upgrade the llvm intrinsics. Note: We already did this for SSE41 PMOVSX sometime ago. Differential Revision: http://reviews.llvm.org/D20684 llvm-svn: 271106
* AMDGPU: Add fract builtinMatt Arsenault2016-05-281-0/+14
| | | | llvm-svn: 271080
* [OpenMP] Fix SEMA bug in the capture of global variables in template functions.Samuel Antao2016-05-271-12/+163
| | | | | | | | | | | | | | Summary: Target regions require globals to be captured. This patch fixes a bug exposed when that happens in a template function. Reviewers: hfinkel, arpith-jacob, kkwli0, carlo.bertolli, ABataev Subscribers: guansong, ABataev, cfe-commits, caomhin, fraggamuffin Differential Revision: http://reviews.llvm.org/D18110 llvm-svn: 271001
* [mips] Compact branch policy setting.Simon Dardis2016-05-271-0/+18
| | | | | | | | | | | | | | This patch adds the commandline option -mcompact-branches={never,optimal,always), which controls how LLVM generates compact branches for MIPSR6 targets. By default, the compact branch policy is 'optimal' where LLVM will generate the most appropriate branch for any situation. The 'never' and 'always' policy will disable or always generate compact branches wherever possible respectfully. Reviewers: dsanders, vkalintiris, atanasyan Differential Revision: http://reviews.llvm.org/D20729 llvm-svn: 271000
* [mips] Kill 'support' for untested EABI.Daniel Sanders2016-05-273-16/+0
| | | | | | | | | | | | | | | | | Summary: There are no llvm backend tests* for EABI and no EABI buildbots. There were only three clang tests, all of which checked that -mabi=eabi was passed to the assembler. *There is a single backend test that specifies EABI but it actually tests MIPS16. Reviewers: atanasyan Subscribers: emaste, sdardis, atanasyan, cfe-commits Differential Revision: http://reviews.llvm.org/D20679 llvm-svn: 270998
* [MSVC2015] Fix mangling for static variables initialization guardsDmitry Polukhin2016-05-271-7/+16
| | | | | | | | | It seems that suffix '@4HA' was omitted for unknown reason. It is non-cont non-volatile 'int' type of normal variable TSS. Differential revision: http://reviews.llvm.org/D20683 llvm-svn: 270974
* [OPENMP] Fixed processing of '-fopenmp-version=' option and test.Alexey Bataev2016-05-271-7/+7
| | | | llvm-svn: 270962
* [CodeGen] Don't crash when sizeof(long) != 4 for some intrinsDavid Majnemer2016-05-271-0/+23
| | | | | | | | | | _InterlockedIncrement and _InterlockedDecrement have 'long' in their prototypes. We assumed 'long' was the same size as an i32 which is incorrect for other targets. This fixes PR27892. llvm-svn: 270953
* Re-commit r270748 "clang-cl: Treat dllimport explicit template instantiation ↵Hans Wennborg2016-05-264-17/+81
| | | | | | | | | | definitions as declarations (PR27810, PR27811)" Also make explicit instantiation decls not apply to nested classes when targeting MSVC. That dll attributes are not inherited by inner classes might be the explanation for MSVC's behaviour here. llvm-svn: 270897
* [AMDGPU] Remove individual debugger options + update featuresKonstantin Zhuravlyov2016-05-261-16/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D20336 llvm-svn: 270895
* [OpenMP] Codegen for target update directive.Samuel Antao2016-05-261-0/+245
| | | | | | | | | | | | Summary: This patch implements the code generation for the `target update` directive. The implemntation relies on the logic already in place for target data standalone directives, i.e. target enter/exit data. Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev Subscribers: caomhin, cfe-commits Differential Revision: http://reviews.llvm.org/D20650 llvm-svn: 270886
* [OpenMP] Parsing and sema support for the from clauseSamuel Antao2016-05-266-33/+216
| | | | | | | | | | | | | | | Summary: The patch contains the parsing and sema support for the `from` clause. Patch based on the original post by Kelvin Li. Reviewers: hfinkel, carlo.bertolli, kkwli0, arpith-jacob, ABataev Subscribers: caomhin, cfe-commits Differential Revision: http://reviews.llvm.org/D18488 llvm-svn: 270882
* [OpenMP] Parsing and sema support for the to clauseSamuel Antao2016-05-269-84/+304
| | | | | | | | | | | | | | | Summary: The patch contains the parsing and sema support for the `to` clause. Patch based on the original post by Kelvin Li. Reviewers: carlo.bertolli, hfinkel, kkwli0, arpith-jacob, ABataev Subscribers: caomhin, cfe-commits Differential Revision: http://reviews.llvm.org/D18597 llvm-svn: 270880
* [OpenMP] Parsing and sema support for target update directiveSamuel Antao2016-05-264-0/+346
| | | | | | | | | | | | | | | Summary: This patch is to add parsing and sema support for `target update` directive. Support for the `to` and `from` clauses will be added by a different patch. This patch also adds support for other clauses that are already implemented upstream and apply to `target update`, e.g. `device` and `if`. This patch is based on the original post by Kelvin Li. Reviewers: hfinkel, carlo.bertolli, kkwli0, arpith-jacob, ABataev Subscribers: caomhin, cfe-commits Differential Revision: http://reviews.llvm.org/D15944 llvm-svn: 270878
* [OpenMP] Add support for the 'private pointer' flag to signal variables ↵Samuel Antao2016-05-262-7/+103
| | | | | | | | | | | | | | captured in target regions and used in first-private clauses. Summary: If a variable is implicitly mapped (doesn't show in a map clause), the runtime library has to be informed if the corresponding capture shows up in first-private clause, so that the storage previously allocated in the device is used. This patch adds the support for that. Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev Subscribers: caomhin, cfe-commits Differential Revision: http://reviews.llvm.org/D20112 llvm-svn: 270870
* [OpenMP] Adjust map type bits according to latest spec and use zero size ↵Samuel Antao2016-05-267-194/+308
| | | | | | | | | | | | | | array sections for pointers. Summary: This patch changes the bits used to specify the map types according to the latest version of the libomptarget document and add the support for zero size array section when pointers are being implicitly mapped. This completes the missing new 4.5 map semantics. Reviewers: hfinkel, carlo.bertolli, arpith-jacob, kkwli0, ABataev Subscribers: caomhin, cfe-commits Differential Revision: http://reviews.llvm.org/D20111 llvm-svn: 270868
* Adding missing _mm512_castsi512_si256 intrinsic. Michael Zuckerman2016-05-261-0/+7
| | | | llvm-svn: 270851
* [Analyzer] Correct stack address escape diagnosticSean Eveson2016-05-261-2/+2
| | | | | | | | | | | | | | | | | | Summary: Leaking a stack address via a static variable refers to it in the diagnostic as a 'global'. This patch corrects the diagnostic for static variables. Patch by Phil Camp, SN Systems Reviewers: dcoughlin, zaks.anna Subscribers: xazax.hun, cfe-commits Differential Revision: http://reviews.llvm.org/D19866 Patch by Phil Camp llvm-svn: 270849
* Fix crash while parsing variable template with variadic template argumentsOlivier Goffart2016-05-261-0/+6
| | | | | | | | | | It is only a crash if the compiler optimize for this!=nullptr because LocalInstantiationScope::getPartiallySubstitutedPack checks if 'this' is null (This is crashing when clang is compiled with GCC6) Differential Revision: http://reviews.llvm.org/D20511 llvm-svn: 270845
* [driver][mips] Specify stdlib used in the tests explicitlySimon Atanasyan2016-05-262-0/+28
| | | | | | That allows to pass the tests even if default stdlib is not libstdc++. llvm-svn: 270842
* [OPENMP] Add option '-fopenmp-version=[31|40|45]' allowing choosingAlexey Bataev2016-05-262-1/+20
| | | | | | | | | | OpenMP version. If '-fopenmp' option is provided '-fopenmp-version=' allows to control, which version of OpenMP must be supported. Currently it affects only the value of _OPENMP define. llvm-svn: 270838
* [X86][F16C] Improved f16c intrinsics checks Simon Pilgrim2016-05-261-6/+20
| | | | | | Added checks for upper elements being zero'd in scalar conversions llvm-svn: 270836
* [MSVC] Support for __unaligned qualifier in functionsAndrey Bokhanko2016-05-263-0/+15
| | | | | | | | | | | | | | | This implements support for MS-specific __unaligned qualifier in functions and makes the following test case both compile and mangle correctly: struct S { void f() __unaligned; }; void S::f() __unaligned { } Differential Revision: http://reviews.llvm.org/D20437 llvm-svn: 270834
* [X86][AVX2] Improved checks for float/double mask generation for non-masked ↵Simon Pilgrim2016-05-261-0/+8
| | | | | | gathers llvm-svn: 270833
* Fix instrinsics names: Michael Zuckerman2016-05-261-15/+12
| | | | | | | | | _mm128_cmp_ps_mask-->_mm_cmp_ps_mask _mm128_mask_cmp_ps_mask-->_mm_mask_cmp_ps_mask _mm128_cmp_pd_mask-->_mm_cmp_pd_mask _mm128_mask_cmp_pd_mask-->_mm_mask_cmp_pd_mask llvm-svn: 270830
* [Clang][AVX512][BUILTIN] Adding intrinsics for set1Michael Zuckerman2016-05-261-0/+30
| | | | | | Differential Revision: http://reviews.llvm.org/D20562 llvm-svn: 270825
* [OPENMP] Set '_OPENMP' macro to '201511' value to reflect support forAlexey Bataev2016-05-261-1/+1
| | | | | | | | OpenMP 4.5. According to OpenMP 4.5 the _OPENMP macro name is defined to have the decimal value yyyymm where yyyy and mm are the year and month designations of the version of the OpenMP API that the implementation supports. Clang supports OpenMP 4.5 so updated value of _OPENMP macro to 201511. llvm-svn: 270822
* Don't feed standard error to FileCheck.Akira Hatanaka2016-05-261-1/+1
| | | | | | | | | This is an attempt to fix the buildbot that started failing after r270808. http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/13141 llvm-svn: 270817
* [ObjC] Remove _Atomic from return type and parameter type ofAkira Hatanaka2016-05-262-0/+95
| | | | | | | | | | | | | | objective-c properties. This fixes an assert in CodeGen that fires when the getter and setter functions for an objective-c property of type _Atomic(_Bool) are synthesized. rdar://problem/26322972 Differential Revision: http://reviews.llvm.org/D20407 llvm-svn: 270808
* [Sema] Note when we encounter a problem in ExprConstant.George Burgess IV2016-05-252-4/+114
| | | | | | | | | | | | | | | | | | | | Currently, the constexpr evaluator is very conservative about unmodeled side-effects when we're evaluating an expression in a mode that allows such side-effects. This patch makes us note when we might have actually encountered an unmodeled side-effect, which allows us to be more accurate when we know an unmodeled side-effect couldn't have occurred. This patch has been split into two commits; this one primarily introduces the bits necessary to track whether we might have potentially hit such a side-effect. The one that actually does the tracking (which boils down to more or less a rename of keepEvaluatingAfterFailure to noteFailure) is coming soon. Differential Revision: http://reviews.llvm.org/D18540 llvm-svn: 270781
* [CGDebugInfo] Modify the preferred expression location for member calls.Hal Finkel2016-05-251-0/+24
| | | | | | | | | | | | | | | | | | | | If the callee has a valid location (not all do), then use that. Otherwise, fall back to the starting location. This makes sure that the debug info for calls points to the call (not the start of the expression providing the object on which the member function is being called). For example, given this: f->foo()->bar(); we don't want both calls to point to the 'f', but rather to the 'foo()' and the 'bar()'. Fixes PR27567. Differential Revision: http://reviews.llvm.org/D19708 llvm-svn: 270775
* Fix rejects-valid on constexpr function that accesses a not-yet-defined 'externRichard Smith2016-05-251-0/+14
| | | | | | | const' variable. That variable might be defined as 'constexpr', so we cannot prove that a use of it could never be a constant expression. llvm-svn: 270774
* Add a loop's debug location to its llvm.loop metadataHal Finkel2016-05-253-10/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Getting accurate locations for loops is important, because those locations are used by the frontend to generate optimization remarks. Currently, optimization remarks for loops often appear on the wrong line, often the first line of the loop body instead of the loop itself. This is confusing because that line might itself be another loop, or might be somewhere else completely if the body was an inlined function call. This happens because of the way we find the loop's starting location. First, we look for a preheader, and if we find one, and its terminator has a debug location, then we use that. Otherwise, we look for a location on an instruction in the loop header. The fallback heuristic is not bad, but will almost always find the beginning of the body, and not the loop statement itself. The preheader location search often fails because there's often not a preheader, and even when there is a preheader, depending on how it was formed, it sometimes carries the location of some preceeding code. I don't see any good theoretical way to fix this problem. On the other hand, this seems like a straightforward solution: Put the debug location in the loop's llvm.loop metadata. When emitting debug information, this commit causes us to add the debug location as an operand to each loop's llvm.loop metadata. Thus, we now generate this metadata for all loops (not just loops with optimization hints) when we're otherwise generating debug information. The remark test case changes depend on the companion LLVM commit r270771. llvm-svn: 270772
* Revert r270748 "clang-cl: Treat dllimport explicit template instantiation ↵Hans Wennborg2016-05-252-47/+15
| | | | | | | | | definitions as declarations (PR27810, PR27811)" It seems to have broken the sanitizer-windows bot. Reverting while investigating. llvm-svn: 270754
* clang-cl: Treat dllimport explicit template instantiation definitions as ↵Hans Wennborg2016-05-252-15/+47
| | | | | | | | | | | declarations (PR27810, PR27811) This matches what MSVC does, and should make compiles faster by avoiding to unnecessarily emit a lot of code. Differential Revision: http://reviews.llvm.org/D20608 llvm-svn: 270748
* [X86][AVX2] Full set of AVX2 intrinsics testsSimon Pilgrim2016-05-251-600/+745
| | | | | | llvm/test/CodeGen/X86/avx2-intrinsics-fast-isel.ll will be synced to this llvm-svn: 270708
* [AVX512] Don't rely on value names. They're different in release builds.Benjamin Kramer2016-05-251-9/+9
| | | | llvm-svn: 270704
* Fix mangled name of method with ns_consumed parameters.Nico Weber2016-05-253-7/+18
| | | | | | | | | | | | | | | | | | | | | | | When a function/method use a parameter with "ns_consumed" attribute, ensure that the mangled name is the same whether -fobjc-arc is used or not. Since "ns_consumed" attribute is generally used to inform ARC that a function/method does sink the reference, it mean it is usually implemented in a compilation unit compiled without -fobjc-arc but used form a compilation unit compiled with it. Originally found while trying to use "ns_consumed" attribute in an Objective-C++ file in Chromium (http://crbug.com/599980) where it caused a linker error. Regression introduced by revision 262278 (previously the attribute was incorrectly not part of the mangled name). Patch from Sylvain Defresne <sdefresne@chromium.org>! http://reviews.llvm.org/D20113 llvm-svn: 270702
* [Clang][AVX512][BUILTIN] Add missing intrinsics for castMichael Zuckerman2016-05-251-11/+72
| | | | | | Differential Revision: http://reviews.llvm.org/D20523 llvm-svn: 270699
* Revert "[AArch64] Using new TargetParser in Clang"Renato Golin2016-05-251-4/+1
| | | | | | | | This reverts commit r270688 and r270689. The issue is not a random order, but a different order for some targets and others (prob. Linux vs Darwin). Reverting until we have a better fix. llvm-svn: 270691
OpenPOWER on IntegriCloud