summaryrefslogtreecommitdiffstats
path: root/clang/test
Commit message (Collapse)AuthorAgeFilesLines
* [X86] Use __builtin_ia32_vec_ext_v4hi and __builtin_ia32_vec_set_v4hi to ↵Craig Topper2016-07-091-0/+12
| | | | | | | | implement pextrw/pinsertw MMX intrinsics instead of trying to use native IR. Without this we end up generating code that doesn't use mmx registers and probably doesn't work well with other mmx intrinsics. llvm-svn: 274968
* [X86] Uncomment the _mm_extract_ps test and add checks.Craig Topper2016-07-091-4/+5
| | | | llvm-svn: 274965
* CodeGen: tweak CFString section for COFF, ELFSaleem Abdulrasool2016-07-091-6/+6
| | | | | | | | | Place the structure data into `cfstring`. This both isolates the structures to permit coalescing in the future (by the linker) as well as ensures that it doesnt get marked as read-only data. The structures themselves are not read-only, only the string contents. llvm-svn: 274956
* Teach -ast-print to print constexpr variables.Vassil Vassilev2016-07-081-1/+3
| | | | | | Patch reviewed by Richard Smith (D22168). llvm-svn: 274930
* [OpenCL] Add missing -cl-no-signed-zeros option into driverYaxun Liu2016-07-082-12/+24
| | | | | | | | | | | | Add OCL option -cl-no-signed-zeros to driver options. Also added to opencl.cl testcases. Patch by Aaron En Ye Shi. Differential Revision: http://reviews.llvm.org/D22067 llvm-svn: 274923
* Fix flag name in comment in cuda-version-check.cu.Justin Lebar2016-07-081-1/+1
| | | | llvm-svn: 274897
* Don't crash when printing auto variables.Vassil Vassilev2016-07-081-0/+9
| | | | | | Patch by Axel Naumann! llvm-svn: 274859
* [OpenCL] Fix access qualifiers handling for typedefsAlexey Bader2016-07-083-15/+70
| | | | | | | | | | | | | | | | | | | | | | | | | OpenCL s6.6: "Access qualifier must be used with image object arguments of kernels and of user-defined functions [...] If no qualifier is provided, read_only is assumed". This does not define the behavior for image types used in typedef declaration, but following the spec logic, we should allow access qualifiers specification in typedefs, e.g.: typedef write_only image1d_t img1d_wo; Unlike cv-qualifiers, user cannot add access qualifier to a typedef type, i.e. this is not allowed: typedef image1d_t img1d; // note: previously declared 'read_only' here void foo(write_only img1d im) {} // error: multiple access qualifier Patch by Andrew Savonichev. Reviewers: Anastasia Stulova. Differential revision: http://reviews.llvm.org/D20948 llvm-svn: 274858
* [X86] Remove dead builtins that don't exist in the backend intrinsic file ↵Craig Topper2016-07-081-1/+0
| | | | | | and don't have custom handling in CGBuiltins.cpp either. llvm-svn: 274825
* [analyzer] Add rudimentary handling of AtomicExpr.Devin Coughlin2016-07-081-0/+95
| | | | | | | | | | | | | | This proposed patch adds crude handling of atomics to the static analyzer. Rather than ignore AtomicExprs, as we now do, this patch causes the analyzer to escape the arguments. This is imprecise -- and we should model the expressions fully in the future -- but it is less wrong than ignoring their effects altogether. This is rdar://problem/25353187 Differential Revision: http://reviews.llvm.org/D21667 llvm-svn: 274816
* Revert "Driver: Stop linking to C++ when using sanitizers on Darwin"Saleem Abdulrasool2016-07-081-16/+8
| | | | | | | This reverts SVN r274797. It broke the Green Dragon bot. Revert it until the failure can be addressed. llvm-svn: 274814
* [CUDA] Pass correct option in test.Michael Kuperstein2016-07-071-1/+1
| | | | llvm-svn: 274805
* Driver: Stop linking to C++ when using sanitizers on DarwinSaleem Abdulrasool2016-07-071-8/+16
| | | | | | | | | | | Sanitizers on Darwin are built as dynamic libraries, not static libraries. Sanitizers will have their C++ dependency satisfied internally (LC_LOAD_DYLIB) in the libclang_rt dylib. As long as the sanitizers stay dynamic and not static, linking against C++ when enabling a sanitizer becomes over linkage. Patch by Dave Lee! llvm-svn: 274797
* [AArch64] Change the preferred alignment for char and short.Chad Rosier2016-07-072-5/+3
| | | | | | | | This reinstates commits r273280 and r273289. Original Review: http://reviews.llvm.org/D21414. llvm-svn: 274791
* [CUDA] Check that our CUDA install supports the requested architectures.Justin Lebar2016-07-078-0/+52
| | | | | | | | | | | | | | | Summary: Raise an error if you're using a CUDA installation that's too old for the requested architectures. In practice, this means that you need a CUDA 8 install to compile for sm_6*. Reviewers: tra Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D21869 llvm-svn: 274781
* [CUDA] Rename the __nvvm_bar0 builtin back to __syncthreads.Justin Lebar2016-07-071-1/+1
| | | | | | | | | The builtin was renamed in r274770. But __syncthreads is part of our user-facing API, so we need to keep the name as-is. Patch by Justin Bogner. llvm-svn: 274780
* NVPTX: Use the nvvm builtins to read SRegs rather than the legacy ptx onesJustin Bogner2016-07-073-83/+83
| | | | | | The ptx spellings were removed from LLVM in r274769. llvm-svn: 274770
* Revert "[aarch64] Update datalayout for aarch64 tests"Chad Rosier2016-07-072-3/+5
| | | | | | | This reverts commit r273289, which was a follow to r273280, which was reverted because the change was not properly approved. llvm-svn: 274767
* Revert "Retry "Include debug info for nested structs and classes""Adrian McCarthy2016-07-063-10/+10
| | | | | | | | | | Reverting because it causes a test failure on build bots (Modules/ModuleDebugInfo.cpp). Failure does not reproduce locally. svn revision: rL274698 This reverts commit 3c5ed6599b086720aab5b8bd6941149d066806a6. llvm-svn: 274706
* Retry "Include debug info for nested structs and classes"Adrian McCarthy2016-07-063-10/+10
| | | | | | | | | | This should work now that the LLVM-side of the change has landed successfully. Original Differential Revision: http://reviews.llvm.org/D21705 This reverts commit a30322e861c387e1088f47065d0438c6bb019879. llvm-svn: 274698
* [analyzer] Suppress false positives in std::shared_ptrDevin Coughlin2016-07-064-125/+183
| | | | | | | | | | | | | | | | | | | | | The analyzer does not model C++ temporary destructors completely and so reports false alarms about leaks of memory allocated by the internals of shared_ptr: std::shared_ptr<int> p(new int(1)); p = nullptr; // 'Potential leak of memory pointed to by field __cntrl_' This patch suppresses all diagnostics where the end of the path is inside a method in std::shared_ptr. It also reorganizes the tests for suppressions in the C++ standard library to use a separate simulated header for library functions with bugs that were deliberately inserted to test suppression. This will prevent other tests from using these as models. rdar://problem/23652766 llvm-svn: 274691
* [SemaExpr] Support assignments from vector to scalars with same sizeBruno Cardoso Lopes2016-07-061-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before r266366, clang used to support constructs like: typedef __attribute__((vector_size(8))) double float64x1_t; typedef __attribute__((vector_size(16))) double float64x2_t; float64x1_t vget_low_f64(float64x2_t __p0); double y = 3.0 + vget_low_f64(v); But it would reject: double y = vget_low_f64(v) + 3.0; It also always rejected assignments: double y = vget_low_f64(v); This patch: (a) revivies the behavior of `3.0 + vget_low_f64(v)` prior to r266366, (b) add support for `vget_low_f64(v) + 3.0` and (c) add support for assignments. These vector semantics have never really been tied up but it seems odd that we used to support some binop froms but do not support assignment. If we did support scalar for the purposes of arithmetic, we should probably be able to reinterpret as scalar for the purposes of assignment too. Differential Revision: http://reviews.llvm.org/D21700 rdar://problem/26093791 llvm-svn: 274646
* Revert "Include debug info for nested structs and classes"Adrian McCarthy2016-07-063-10/+10
| | | | | | This reverts commit 0af5ee9631c7c167dc40498b415876553e314c95. llvm-svn: 274633
* Include debug info for nested structs and classesAdrian McCarthy2016-07-063-10/+10
| | | | | | | | This includes nested types in the member list, even if there are no members of that type. Note that structs and classes have themselves as an "implicit struct" as the first member, so we skip implicit ones. Differential Revision: http://reviews.llvm.org/D21705 llvm-svn: 274628
* Add negative test for TBAARoger Ferrer Ibanez2016-07-061-0/+4
| | | | | | | | | Revision r178818 added tests for TBAA but was missing negative tests to ensure that TBAA markers are not emitted when TBAA is off. Differential Revision: http://reviews.llvm.org/D21295 llvm-svn: 274610
* [X86] Use native IR for immediate values 0-7 of packed fp cmp builtins. This ↵Craig Topper2016-07-061-3/+9
| | | | | | makes them the same as what is done when using the SSE builtins for these same encodings. llvm-svn: 274608
* [OpenMP] Sema and parsing for 'distribute simd' pragmaKelvin Li2016-07-0612-6/+3385
| | | | | | | | Summary: This patch is an implementation of sema and parsing for the OpenMP composite pragma 'distribute simd'. Differential Revision: http://reviews.llvm.org/D22007 llvm-svn: 274604
* [AVX512] Use the generic ctlz intrinsic to implement the vplzcntd/q builtins.Craig Topper2016-07-062-18/+30
| | | | llvm-svn: 274603
* [Sema] Fix a bug where pack expansion was not expanded in type aliasErik Pilkington2016-07-051-0/+32
| | | | | | | | | | The problem is that the parameter pack in a function type type alias is not reexpanded after being transformed. Also remove an incorrect comment in a similar function. Fixes PR26017. Differential Revision: http://reviews.llvm.org/D21030 llvm-svn: 274566
* Re-apply "test: Use add_lit_testsuites so that subsets of tests can be ↵Justin Bogner2016-07-0511-7/+12
| | | | | | | | | | | | | | | | | specified" This version should actually remove the empty directories I removed all of the files from. Thanks to tstellar for pointing out git-svn's --rmdir flag. Original message: This creates make/ninja targets like check-clang-codegen and check-clang-unit, much like LLVM already has. I had to move some input files into Input directories so they weren't picked up as test directories. llvm-svn: 274565
* Revert "test: Use add_lit_testsuites so that subsets of tests can be specified"Justin Bogner2016-07-0511-12/+7
| | | | | | | This reverts r274560. It's breaking a bunch of bots due to a directory with a space in the name. Doesn't repro locally for some reason. llvm-svn: 274562
* test: Use add_lit_testsuites so that subsets of tests can be specifiedJustin Bogner2016-07-0511-7/+12
| | | | | | | | | This creates make/ninja targets like check-clang-codegen and check-clang-unit, much like LLVM already has. I had to move some input files into Input directories so they weren't picked up as test directories. llvm-svn: 274560
* [Clang][Feature] Adding CLFLUSHOPT feature and intrinsic to clangMichael Zuckerman2016-07-051-0/+9
| | | | | | Differential Revision: http://reviews.llvm.org/D21792 llvm-svn: 274559
* [X86][AVX512] Converted the VBROADCAST intrinsics to generic IRSimon Pilgrim2016-07-054-93/+122
| | | | llvm-svn: 274544
* [X86][AVX512F] add float/double abs intrinsicsAsaf Badouh2016-07-051-4/+41
| | | | | | | | | add abs intrinsics that use native LLVM-IR. change _mm512_mask[z]_and_epi{32|64} to use select intrinsic Differential Revision: http://reviews.llvm.org/D21973 llvm-svn: 274542
* [OpenCL] An implementation of device side enqueue (DSE) from OpenCL v2.0 ↵Anastasia Stulova2016-07-052-0/+282
| | | | | | | | | | | | | | | | | s6.13.17. - Added new Builtins: enqueue_kernel, get_kernel_work_group_size and get_kernel_preferred_work_group_size_multiple. These Builtins use custom check to diagnose parameters of the passed Blocks i. e. variable number of 'local void*' type params, and check different overloads specified in Table 6.31 of OpenCL v2.0. - IR is generated as an internal library call for each OpenCL Builtin, reusing ObjC Block implementation. Review: http://reviews.llvm.org/D20249 llvm-svn: 274540
* [Clang][BuiltIn][AVX512] adding ↵Michael Zuckerman2016-07-052-0/+62
| | | | | | | | _mm{|256|512}_mask_cvt{s|us|}epi16_storeu_epi8 intrinsics Differential Revision: http://reviews.llvm.org/D21729 llvm-svn: 274532
* [OpenMP] Sema and parse for 'distribute parallel for simd'Kelvin Li2016-07-0519-2/+4809
| | | | | | | | Summary: This patch is an implementation of sema and parsing for the OpenMP composite pragma 'distribute parallel for simd'. Differential Revision: http://reviews.llvm.org/D21977 llvm-svn: 274530
* [X86] Use undefined instead of setzero in shufflevector based intrinsics ↵Craig Topper2016-07-044-30/+30
| | | | | | when the second source is unused. Rewrite immediate extractions in shuffle intrinsics to be in ((c >> x) & y) form instead of ((c & z) >> x). This way only x varies between each use instead of having to vary x and z. llvm-svn: 274525
* [X86][AVX512] Converted the VSHUFPD intrinsics to generic IRSimon Pilgrim2016-07-042-11/+21
| | | | llvm-svn: 274523
* [OpenCL] Make OpenCL Builtins added according to the right version.Anastasia Stulova2016-07-042-7/+52
| | | | | | | | | | Currently we only have OpenCL 2.0 Builtins i.e. pipes or address space conversions. They have to be added only in the version 2.0 compilation mode to make the identifiers available for use in the other versions. Review: http://reviews.llvm.org/D20249 llvm-svn: 274509
* [X86][AVX512] Converted the VPERMPD/VPERMQ intrinsics to generic IRSimon Pilgrim2016-07-042-85/+92
| | | | llvm-svn: 274502
* [X86][AVX512] Converted the VPERMILPD/VPERMILPS intrinsics to generic IRSimon Pilgrim2016-07-041-12/+16
| | | | llvm-svn: 274492
* [Sparc] Allow LEON cpu models to be selected with -mcpuJacob Baungard Hansen2016-07-041-0/+32
| | | | | | | | | | | | Summary: This change exposes the recently added LEON CPUs (D19359) in the LLVM Sparc backend to Clang, allowing the cpu's to be selected using the -mcpu flag. Reviewers: jyknight, lero_chris Subscribers: jyknight, cfe-commits Differential Revision: http://reviews.llvm.org/D21683 llvm-svn: 274487
* [AVX512] Modify what indices we emit for the zero vector we use for zero ↵Craig Topper2016-07-041-1/+2
| | | | | | extension of the result of a v2i1 or v4i1 masked compare. This way we emit something that the backend easily interprets as a concatenation rather than a true shuffle. This delivers slightly better codegen with the current backend capabilities. llvm-svn: 274484
* [Sema] A flexible array member must not be the only named memberDavid Majnemer2016-07-041-0/+6
| | | | | | | | | We didn't correctly detect situations where a flexible array member was the only named member in a record. This fixes PR28407. llvm-svn: 274477
* [X86][AVX512] Converted the MOVDDUP/MOVSLDUP/MOVSHDUP masked intrinsics to ↵Simon Pilgrim2016-07-022-32/+50
| | | | | | | | generic IR llvm companion patch imminent llvm-svn: 274442
* [X86] Replace 128-bit and 256 masked vpermilps/vpermilpd builtins with ↵Craig Topper2016-07-021-16/+24
| | | | | | native IR. llvm-svn: 274425
* PR28394: For compatibility with c++11 and c++14, if a static constexpr dataRichard Smith2016-07-021-0/+20
| | | | | | | | member is redundantly redeclared outside the class definition in code built in c++17 mode, ensure we emit a non-discardable definition of the data member for c++11 and c++14 compilations to use. llvm-svn: 274416
* Add TargetInfo for 32-bit and 64-bit RenderScriptPirama Arumuga Nainar2016-07-021-0/+25
| | | | | | | | | | | | | | | | | | | Summary: The TargetInfo for 'renderscript32' and 'renderscript64' ArchTypes are subclasses of ARMleTargetInfo and AArch64leTargetInfo respectively. RenderScript32TargetInfo modifies the ARM ABI to set LongWidth and LongAlign to be 64-bits. Other than this modification, the underlying TargetInfo base classes is initialized as if they have "armv7" and "aarch64" architecture type respectively. Reviewers: rsmith, echristo Subscribers: aemerson, tberghammer, cfe-commits, danalbert, mehdi_amini, srhines Differential Revision: http://reviews.llvm.org/D21334 llvm-svn: 274409
OpenPOWER on IntegriCloud