summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen
Commit message (Collapse)AuthorAgeFilesLines
* Reapply r208417 (olista01 'ARM: HFAs must be passed in consecutive ↵James Molloy2014-05-092-26/+26
| | | | | | registers'). Bots are now pacified. llvm-svn: 208425
* Revert r208417 (olista01 'ARM: HFAs must be passed in consecutive ↵James Molloy2014-05-092-26/+26
| | | | | | registers'). This is a followon commit from r208413 which broke the LLVM bots. llvm-svn: 208422
* ARM: HFAs must be passed in consecutive registersOliver Stannard2014-05-092-26/+26
| | | | | | | This is the clang counterpart to 208413, which ensures that Homogeneous Floating-point Aggregates are passed in consecutive registers on ARM. llvm-svn: 208417
* When doing int<->ptr coercion for big-endian, calculate the shift amount ↵James Molloy2014-05-071-0/+9
| | | | | | | | | | | | | | | correctly. Previously we calculated the shift amount based upon DataLayout::getTypeAllocSizeInBits. This will only work for legal types - types such as i24 that are created as part of structs for bitfields will return "32" from that function. Change to using getTypeSizeInBits. It turns out that AArch64 didn't run across this problem because it always returned [1 x i64] as the type for a bitfield, whereas ARM64 returns i64 so goes down this (better, but wrong) codepath. llvm-svn: 208231
* Re-satisfy the bots. Due to a de-sync between my clang and LLVM trees, I ↵James Molloy2014-05-071-1/+1
| | | | | | didn't notice that the generated BE alignment register is now unnamed and is not called '%align_be'. llvm-svn: 208217
* [ARM64-BE] Correctly deal with single element HFAs in varargs.James Molloy2014-05-071-0/+13
| | | | | | | Just because the first "if" didn't fire, doesn't mean we can not have an HFA in the "else" clause. llvm-svn: 208216
* ARM: Fix assertion caused by passing bitfield struct using ↵Oliver Stannard2014-05-071-2/+6
| | | | | | | | | | | | ABIArgInfo::getExpandWithPadding In cases where a struct must, according to the AAPCS, not be split between general purpose and floating point registers, we use ABIArgInfo::getExpandWithPadding to add the padding arguments. However, ExpandWithPadding does not work if the struct contains bitfields, so we instead must use ABIArgInfo::getDirect. llvm-svn: 208185
* Reapply: DebugInfo: Emit the definition of enums when the definition ↵David Blaikie2014-05-061-0/+10
| | | | | | | | | | | | | | | | | | | preceeds the declaration and initial use. Reverting r208106 to reapply r208065 with a fix for the regression. The issue was that the enum tried to be built even if the declaration hadn't been constructed for debug info - presenting problems for enum templates and typedefs of enums with names for linkage purposes. Original commit message: This regressed a little further 208055 though it was already a little broken. While the requiresCompleteType optimization should be implemented here. Future (possibly near future) work. llvm-svn: 208114
* Revert "DebugInfo: Emit the definition of enums when the definition preceeds ↵David Blaikie2014-05-061-10/+0
| | | | | | | | | | | the declaration and initial use." This is breaking the compiler-rt build. Reverting while I investigate/fix. This reverts commit r208065. llvm-svn: 208106
* DebugInfo: Emit the definition of enums when the definition preceeds the ↵David Blaikie2014-05-061-0/+10
| | | | | | | | | | | | declaration and initial use. This regressed a little further 208055 though it was already a little broken. While the requiresCompleteType optimization should be implemented here. Future (possibly near future) work. llvm-svn: 208065
* Support field references to struct names and c++11 aliases from inline asm.Nico Weber2014-05-061-1/+31
| | | | | | This is in addition to the existing support for typedefs. llvm-svn: 208053
* Fix pr19653.Rafael Espindola2014-05-051-0/+5
| | | | | | Warn if an alias requests a section other than the aliasee section. llvm-svn: 207997
* Fix some typosAlp Toker2014-05-051-2/+2
| | | | llvm-svn: 207994
* CodeGen: complete ARM ACLE hint 8.4 supportSaleem Abdulrasool2014-05-041-0/+24
| | | | | | | Add support for the remaining hints from the ACLE. Although __dbg is listed as a hint, it is handled different, so it is not covered by this change. llvm-svn: 207930
* XCore target: fix bug in dereferencing null pointer.Robert Lytton2014-05-021-0/+27
| | | | | | Also add basic cpp ABI tests where they differ from C ABI output. llvm-svn: 207834
* XCore target: Add TypeString meta data to IR output.Robert Lytton2014-05-021-0/+169
| | | | | | | This includes the addition of the virtual function: TargetCodeGenInfo::EmitTargetMD() llvm-svn: 207832
* CodeGen: rename __builtin_arm_sevl to __sevlSaleem Abdulrasool2014-05-021-1/+1
| | | | | | | ACLE adds the __sevl() extension. Rename the hint from a custom name to the ACLE specified name. llvm-svn: 207829
* [ARM64] Port remaining relevant AArch64 clang tests over to ARM64Bradley Smith2014-04-301-0/+2
| | | | llvm-svn: 207632
* [ARM64]Fix a bug cannot select UQSHL/SQSHL with constant i64 shift amount.Hao Liu2014-04-281-0/+12
| | | | llvm-svn: 207401
* CodeGen: add __yield intrinsic for ARMSaleem Abdulrasool2014-04-251-0/+10
| | | | | | | | | The __yield intrinsic generates a hint instruction to indicate that the thread is not performing any useful operations at the moment. This is for compatibility with MSVC, although, the intrinsic is also part of the ACLE, and is enabled globally as a result. llvm-svn: 207275
* 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
* CodeGen: replace use of @llvm.arm.sevl with @llvm.arm.hintSaleem Abdulrasool2014-04-251-1/+1
| | | | | | | Use the new generic @llvm.arm.hint hint intrinsic rather than the specialised @llvm.arm.sevl hint instruction. llvm-svn: 207243
* [X86] Add Clang support for intrinsics __rdtsc and __rdtscp.Andrea Di Biagio2014-04-241-0/+3
| | | | | | | | | | | | | | This patch: 1. Adds a definition for two new GCCBuiltins in BuiltinsX86.def: __builtin_ia32_rdtsc; __builtin_ia32_rdtscp; 2. Replaces the already existing definition of intrinsic __rdtsc in ia32intrin.h with a simple call to the new GCC builtin __builtin_ia32_rdtsc. 3. Adds a definition for the new intrinsic __rdtscp in ia32intrin.h llvm-svn: 207132
* [mips] Support 128-bit int in N32 ABI by overriding TargetInfo::hasInt128Type()Daniel Sanders2014-04-242-0/+105
| | | | | | | | | | | | | | Summary: The condition in the base class is rather strange. It says a target has the 128-bit integer type if the size of a pointer is >= 64-bits. N32 has 32-bit pointers but 64-bit integers. I'm a bit reluctant to change this for all targets so this patch makes the method virtual and overrides it for MIPS64. Reviewers: atanasyan Reviewed By: atanasyan Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D3472 llvm-svn: 207121
* AArch64: update tests to new way of printing NEON lists.Tim Northover2014-04-243-65/+65
| | | | llvm-svn: 207117
* Fix test to not depend on llvm optimizations.Michael J. Spencer2014-04-241-4/+4
| | | | llvm-svn: 207062
* [ARM64] Enable more CodeGen tests for ARM64. The crypto and neon intrinsics ↵James Molloy2014-04-232-15/+20
| | | | | | tests needed changing slightly due to the naming differences between AArch64 and ARM64. llvm-svn: 206964
* [ARM64] Change inline assembly constraints to be more lax, to match the ↵James Molloy2014-04-231-0/+1
| | | | | | | | behaviour of Clang/AArch64 and GCC. GCC allows sub-64bit values to use the 'r' register constraint. llvm-svn: 206963
* [ARM64] Enable the test aarch64-type-sizes.c for ARM64 BE.James Molloy2014-04-231-0/+1
| | | | | | This completes the port of r203918 (cpirker "AArch64_be specific clang target settings") to ARM64. llvm-svn: 206962
* [ARM64] Add a missed case label for arm64_be, and enable the aarch64-varargs ↵James Molloy2014-04-231-0/+1
| | | | | | | | test for arm64_be. This ensures that r203917 (cpirker "AArch64_be varargs processing for ARM ABI") is ported to ARM64. llvm-svn: 206961
* ARM64: update NEON test to improved backend codegenTim Northover2014-04-221-2/+2
| | | | llvm-svn: 206890
* ARM64: Do not expand variadic HFA/HVA arguments with the Darwin ABI.Bob Wilson2014-04-211-0/+6
| | | | | | | | | | | Unlike the standard AAPCS64 ABI, variadic arguments are always passed on the stack with the Darwin ABI, and this was not being considered when deciding whether to expand HFA/HVA arguments in a call. An HFA argument with a "float" base type was being expanded into separate "float" arguments, each of which was then extended to a double, resulting in a serious mismatch from what is expected by the va_arg implementation. <rdar://problem/15777067> llvm-svn: 206729
* ARM64: make sure the caller is expected to extend in AAPCS.Tim Northover2014-04-181-0/+7
| | | | | | | This is one of those DarwinPCS differences. It'd been caught in arguments, but not return values. llvm-svn: 206594
* ARM64: make sure HFAs on the stack get properly aligned.Tim Northover2014-04-182-3/+15
| | | | | | Another AAPCS bug, part of PR19432. llvm-svn: 206580
* BackendUtil: Pass through -mdisable-tail-callsDuncan P. N. Exon Smith2014-04-181-0/+16
| | | | | | | | | | | | | | | The frontend option -fno-optimize-sibling-calls resolves to -cc1's -mdisable-tail-calls, which is passed to the TargetMachine in the backend. PassManagerBuilder was adding the -tailcallelim pass anyway. Use a new DisableTailCalls option in PassManagerBuilder to disable tail calls harder. Requires the matching commit in LLVM that adds DisableTailCalls. <rdar://problem/16050591> llvm-svn: 206543
* ARM64: remove holes from *all* HFAs on the stack.Tim Northover2014-04-171-0/+9
| | | | | | | | | | My first attempt to make sure HFAs were contiguous was in the block dealing with padding registers, which meant it only triggered on the first stack-based HFA. This should extend it to the rest as well. Another part of PR19432. llvm-svn: 206456
* [ARM64] Allow the disabling of NEON and crypto instructions. Update tests to ↵James Molloy2014-04-1648-52/+52
| | | | | | pass -target-feature +neon. llvm-svn: 206394
* Re-enable several builtins in non-gnu modes.Evgeniy Stepanov2014-04-161-0/+11
| | | | | | | | | This is a partial revert of 183015. By not recognizing things like _setjmp we lose (returns_twice) attribute on them, which leads to incorrect code generation. Fixes PR16138. llvm-svn: 206362
* [ARM64] Update tests to reflect the change of the default CPU in llvm.Quentin Colombet2014-04-152-2/+2
| | | | llvm-svn: 206314
* ARM64: track alignment padding registers on AAPCS targetsTim Northover2014-04-151-0/+14
| | | | | | | | | | This implements clause C.8 of the AAPCS in the front-end, so that Clang accurately knows when the registers run out and it has to insert padding before the stack objects begin. PR19432. llvm-svn: 206296
* Ensure we evaluate VLA bounds if a variably-modified type is used as theRichard Smith2014-04-141-2/+8
| | | | | | | argument to __builtin_va_arg. Patch by Rahul Jain, some test massaging and IR emission order changes by me. llvm-svn: 206223
* Update Clang for LLVM split stack API changes in r205997Reid Kleckner2014-04-101-0/+18
| | | | | | Patch by Alex Crichton! llvm-svn: 205998
* [MS-ABI] Lit fix for r205810Warren Hunt2014-04-081-1/+1
| | | | | | | On linux strings have different linkage than on windows. This patch makes the lit test more general. llvm-svn: 205812
* [MS-ABI] Add support for #pragma section and related pragmasWarren Hunt2014-04-082-26/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the msvc pragmas section, bss_seg, code_seg, const_seg and data_seg as well as support for __declspec(allocate()). Additionally it corrects semantics and adds diagnostics for __attribute__((section())) and the interaction between the attribute and the msvc pragmas and declspec. In general conflicts should now be well diganosed within and among these features. In supporting the pragmas new machinery for uniform lexing for msvc pragmas was introduced. The new machinery always lexes the entire pragma and stores it on an annotation token. The parser is responsible for parsing the pragma when the handling the annotation token. There is a known outstanding bug in this implementation in C mode. Because these attributes and pragmas apply _only_ to definitions, we process them at the time we detect a definition. Due to tentative definitions in C, we end up processing the definition late. This means that in C mode, everything that ends up in a BSS section will end up in the _last_ BSS section rather than the one that was live at the time of tentative definition, even if that turns out to be the point of actual definition. This issue is not known to impact anything as of yet because we are not aware of a clear use or use case for #pragma bss_seg but should be fixed at some point. Differential Revision=http://reviews.llvm.org/D3065#inline-16241 llvm-svn: 205810
* -fms-extensions: Don't define __PRETTY_FUNCTION__ to __FUNCTION__Reid Kleckner2014-04-071-0/+1
| | | | | | | This reverts r90596 from 2009. Having this macro definition makes Clang strictly less useful with -fms-extensions. llvm-svn: 205729
* CodeGen: Emit some functions as weak_odr under -fms-compatibilityDavid Majnemer2014-04-021-2/+3
| | | | | | | | | | | | | | | | | | | Summary: MSVC always emits inline functions marked with the extern storage class specifier. The result is something similar to the opposite of __attribute__((gnu_inline)). This extension is also available in C. This fixes PR19264. Reviewers: rnk, rsmith CC: cfe-commits Differential Revision: http://llvm-reviews.chandlerc.com/D3207 llvm-svn: 205485
* ARM64: add a few bits of polynomial intrinsic codegen.Tim Northover2014-04-012-33/+62
| | | | llvm-svn: 205303
* ARM64: add missing ldN/stN intrinsics and enable tests.Tim Northover2014-04-011-371/+346
| | | | llvm-svn: 205296
* Implement the 'optnone' attribute, which suppresses most optimizationsPaul Robinson2014-03-311-0/+25
| | | | | | on a function. llvm-svn: 205255
* ARM64: enable aarch64-neon-intrinsics.c testTim Northover2014-03-311-1076/+871
| | | | | | | | | | | | This adds support for the various NEON intrinsics used by aarch64-neon-intrinsics.c (originally written for AArch64) and enables the test. My implementations are designed to be semantically correct, the actual code quality looks like its a wash between the two backends, and is frequently different (hence the large number of CHECK changes). llvm-svn: 205210
OpenPOWER on IntegriCloud