summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/address-space.c
Commit message (Collapse)AuthorAgeFilesLines
* clang: Fix assert on void pointer arithmetic with address_spaceMatt Arsenault2019-10-311-4/+18
| | | | | This attempted to always use the default address space void pointer type instead of preserving the source address space.
* Clean up AMDGCN testsYaxun Liu2018-02-151-6/+6
| | | | | | Differential Revision: https://reviews.llvm.org/D43340 llvm-svn: 325279
* [AMDGPU] Switch to the new addr space mapping by defaultYaxun Liu2018-02-021-5/+0
| | | | | | | | This requires corresponding llvm change. Differential Revision: https://reviews.llvm.org/D40956 llvm-svn: 324102
* CodeGen: Fix address space of global variableYaxun Liu2017-07-081-4/+6
| | | | | | | | | | | | | Certain targets (e.g. amdgcn) require global variable to stay in global or constant address space. In C or C++ global variables are emitted in the default (generic) address space. This patch introduces virtual functions TargetCodeGenInfo::getGlobalVarAddressSpace and TargetInfo::getConstantAddressSpace to handle this in a general approach. It only affects IR generated for amdgcn target. Differential Revision: https://reviews.llvm.org/D33842 llvm-svn: 307470
* CodeGen: Cast temporary variable to proper address spaceYaxun Liu2017-06-191-2/+2
| | | | | | | | | | | | | | | | In C++ all variables are in default address space. Previously change has been made to cast automatic variables to default address space. However that is not sufficient since all temporary variables need to be casted to default address space. This patch casts all temporary variables to default address space except those for passing indirect arguments since they are only used for load/store. This patch only affects target having non-zero alloca address space. Differential Revision: https://reviews.llvm.org/D33706 llvm-svn: 305711
* CodeGen: Cast alloca to expected address spaceYaxun Liu2017-05-181-3/+5
| | | | | | | | | | | Alloca always returns a pointer in alloca address space, which may be different from the type defined by the language. For example, in C++ the auto variables are in the default address space. Therefore cast alloca to the expected address space when necessary. Differential Revision: https://reviews.llvm.org/D32248 llvm-svn: 303370
* [OpenCL] Map default address space to alloca address spaceYaxun Liu2017-04-111-3/+10
| | | | | | | | | | | | | | For OpenCL, the private address space qualifier is 0 in AST. Before this change, 0 address space qualifier is always mapped to target address space 0. As now target private address space is specified by alloca address space in data layout, address space qualifier 0 needs to be mapped to alloca addr space specified by the data layout. This change has no impact on targets whose alloca addr space is 0. With contributions from Matt Arsenault, Tony Tye and Wen-Heng (Jack) Chung Differential Revision: https://reviews.llvm.org/D31404 llvm-svn: 299965
* Update Clang tests to handle explicitly typed load changes in LLVM.David Blaikie2015-02-271-5/+5
| | | | llvm-svn: 230795
* Remove trailing whitespace to make test compatible with typeless pointer ↵David Blaikie2015-02-151-1/+1
| | | | | | migration llvm-svn: 229274
* test: Remove two redundant lines from this testJustin Bogner2015-01-241-3/+0
| | | | | | The FileCheck already checks for these lines, no need to grep as well. llvm-svn: 227006
* CHECK-LABEL-ify some code gen tests to improve diagnostic experience when ↵Stephen Lin2013-08-151-4/+4
| | | | | | tests fail. llvm-svn: 188447
* hopefully fix a bunch of ARM buildbot failuresNuno Lopes2012-05-091-3/+3
| | | | llvm-svn: 156513
* allow this to pass on 32-bit hosts.Chris Lattner2010-07-081-2/+2
| | | | llvm-svn: 107845
* fix the clang side of PR7437: EmitAggregateCopyChris Lattner2010-07-081-0/+12
| | | | | | | | | | | was not producing a memcpy with the right address spaces because of two places in it doing casts of the arguments to i8, one of which that didn't preserve the address space. There is also an optimizer bug here. llvm-svn: 107842
* filecheckize this test.Chris Lattner2010-07-081-5/+17
| | | | llvm-svn: 107841
* Update tests to use %clang_cc1 instead of 'clang-cc' or 'clang -cc1'.Daniel Dunbar2009-12-151-5/+5
| | | | | | | | | - This is designed to make it obvious that %clang_cc1 is a "test variable" which is substituted. It is '%clang_cc1' instead of '%clang -cc1' because it can be useful to redefine what gets run as 'clang -cc1' (for example, to set a default target). llvm-svn: 91446
* Eliminate &&s in tests.Daniel Dunbar2009-11-081-4/+4
| | | | | | - 'for i in $(find . -type f); do sed -e 's#\(RUN:.*[^ ]\) *&& *$#\1#g' $i | FileUpdate $i; done', for the curious. llvm-svn: 86430
* Rename clang to clang-cc.Daniel Dunbar2009-03-241-5/+5
| | | | | | Tests and drivers updated, still need to shuffle dirs. llvm-svn: 67602
* These tests have no needed to redirect stderr to stdout.Daniel Dunbar2008-11-111-5/+5
| | | | llvm-svn: 59019
* fix a bug handling type attributes in the declspec. declspec processingChris Lattner2008-06-261-1/+12
| | | | | | | | | | used to mutate the attribute list for declspecs when the type was converted, breaking the case where one declspec was shared by multiple declarators. This fixes rdar://6032532. llvm-svn: 52769
* Multiple tests in a single test file must be linked with '&&'.Argyrios Kyrtzidis2008-06-121-2/+2
| | | | | | Otherwise, failing tests other than the last one will not be reported. llvm-svn: 52231
* this started failing because a GEP was constant folded, Chris Lattner2008-04-131-1/+3
| | | | | | improve the robustness of the test. llvm-svn: 49618
* Fix several bugs in array -> pointer decomposition.Chris Lattner2008-04-021-1/+1
| | | | | | | | | | | | | | | | First, we got several CVR propagation cases wrong, which Eli pointed out in PR2039. Second, we didn't propagate address space qualifiers correctly, leading to incorrect lowering of code in CodeGen/address-space.c. Third, we didn't uniformly propagate the specifier in the array to the pointer ("int[restrict 4]" -> "int *restrict"). This adds an ASTContext::getArrayDecayedType member that handles the non-trivial logic for this seemingly simple operation. llvm-svn: 49078
* Add ending newline to test.Christopher Lamb2008-02-041-1/+1
| | | | llvm-svn: 46692
* Add experimental support for address space qualified types. Address spaceChristopher Lamb2008-02-041-0/+7
qualifiers use the __attribute__((address_space(id))) syntax. llvm-svn: 46691
OpenPOWER on IntegriCloud