aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen
AgeCommit message (Collapse)Author
2014-02-24Introduce the asmjs-unknown-emscripten target triple.Dan Gohman
Notable changes from le32-unknown-nacl so far include: - Set i32 as the legal integer set, to help the optimizer avoid creating needlessly inefficient code for asm.js. - We can use llvm.pow. - Don't predefine __ELF__ or __pnacl__ so that we don't need to undefine them later. - Do predefine asm.js and Emscripten macros, so that we don't need to define them later. - Don't provide __has_feature(pnacl).
2013-08-07Treat __sync_synchronize and asm("":::"memory") as stronger fences.JF Bastien
This is a companion patch to: https://codereview.chromium.org/22240002/ https://codereview.chromium.org/22474008/ and deals with the Clang-side of things. The above patch will handle the fallouts of this Clang patch, including some changes to un-duplicate work that RewriteAsmDirectives.cpp does. The goal of this patch is to force some extra ordering on non-atomics for le32 which LLVM doesn't necessarily provide. R=eliben@chromium.org TEST= ninja check-all BUG= https://code.google.com/p/nativeclient/issues/detail?id=3475 BUG= https://code.google.com/p/nativeclient/issues/detail?id=3611 Review URL: https://codereview.chromium.org/22294002
2013-07-25Add a -finstrument-functions-size=n option to control basic blockRobert Grosse
filtering. If omitted entirely, the original behavior is restored. This also undos the string and __pnacl_profile stuff from the previous CL. Finally, it fixes and updates the -finstrument-function tests. BUG=none R=bradnelson@google.com, dschuff@chromium.org Review URL: https://codereview.chromium.org/19793007
2013-07-22Cherrypick upstream volatile _Complex alignment patchesJF Bastien
Specifically: r186564 - Fix volatile _Complex alignment test on platforms where 64-bit floating point isn't 64-bit aligned r186490 - Propagate alignment for _Complex These should fix GCC torture test failures, as well as the all-important uses of volatile _Complex numbers in C, and their alignment being incorrect. BUG= PNaCl FYI bots red on torture tests TEST= ./tools/toolchain_tester/torture_test.py pnacl x86-64 --concurrency=32 >& torture-x86-64.log ; ./tools/toolchain_tester/torture_test.py pnacl x86-32 --concurrency=32 >& torture-x86-32.log ; ./tools/toolchain_tester/torture_test.py pnacl arm --concurrency=32 >& torture-arm.log R=stichnot@chromium.org Review URL: https://codereview.chromium.org/19915003
2013-07-15Merge commit '20c7d45a4da9f58ad805ad1d37f92fe7dc232ec8'Eli Bendersky
Conflicts: lib/CodeGen/ItaniumCXXABI.cpp
2013-07-12Merge branch 'master' of http://git.chromium.org/native_client/pnacl-clangEli Bendersky
2013-07-10Cherry-picking the pow-for-le32 fix from upstream clang.Eli Bendersky
SVN log from upstream clang: r185568 | eliben | 2013-07-03 12:19:12 -0700 (Wed, 03 Jul 2013) Add target hook CodeGen queries when generating builtin pow*. Without fmath-errno, Clang currently generates calls to @llvm.pow.* intrinsics when it sees pow*(). This may not be suitable for all targets (for example le32/PNaCl), so the attached patch adds a target hook that CodeGen queries. The target can state its preference for having or not having the intrinsic generated. Non-PNaCl behavior remains unchanged; PNaCl-specific test added. BUG= https://code.google.com/p/nativeclient/issues/detail?id=3513 R=dschuff@chromium.org Review URL: https://codereview.chromium.org/18953003
2013-06-27Clang should not generate calls to llvm.pow.* intrinsics.Eli Bendersky
Instead, it should generate calls to the pow* library functions, which get found within the pexe. This is a LOCALMOD for now, but I'm working on a more generic solution that can be upstreamed to Clang. BUG=https://code.google.com/p/nativeclient/issues/detail?id=3513 R=jvoung@chromium.org Review URL: https://codereview.chromium.org/18135002
2013-05-21Reverting r182337, which merged r182266, __declspec(selectany)Reid Kleckner
Was "Implement __declspec(selectany) under -fms-extensions ..." git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_33@182381 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-21Merging r182266:Bill Wendling
------------------------------------------------------------------------ r182266 | rnk | 2013-05-20 07:02:37 -0700 (Mon, 20 May 2013) | 13 lines Implement __declspec(selectany) under -fms-extensions selectany only applies to externally visible global variables. It has the effect of making the data weak_odr. The MSDN docs suggest that unused definitions can only be dropped at linktime, so Clang uses weak instead of linkonce. MSVC optimizes away references to constant selectany data, so it must assume that there is only one definition, hence weak_odr. Reviewers: espindola Differential Revision: http://llvm-reviews.chandlerc.com/D814 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_33@182337 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-15Merging r181750:Bill Wendling
------------------------------------------------------------------------ r181750 | rafael | 2013-05-13 17:44:24 -0700 (Mon, 13 May 2013) | 4 lines Use atomic instructions on linux thumb v7. This matches gcc's behaviour. The patch also explicitly parses the version so that this keeps working when we add support for v8. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_33@181920 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-15Merging r181728:Bill Wendling
------------------------------------------------------------------------ r181728 | rafael | 2013-05-13 13:09:47 -0700 (Mon, 13 May 2013) | 6 lines Use atomic instructions on ARM linux. This is safe given how the pre-v6 atomic ops funcions in libgcc are implemented. This fixes pr15429. ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_33@181919 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-06Add SystemZ supportUlrich Weigand
This patch then adds all the usual platform-specific pieces for SystemZ: driver support, basic target info, register names and constraints, ABI info and vararg support. It also adds new tests to verify pre-defined macros and inline asm, and updates a test for the minimum alignment change. This version of the patch incorporates feedback from reviews by Eric Christopher and John McCall. Thanks to all reviewers! Patch by Richard Sandiford. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181211 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-04AArch64: teach Clang about __clear_cache intrinsicTim Northover
libgcc provides a __clear_cache intrinsic on AArch64, much like it does on 32-bit ARM. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181111 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-03Reapply r180982 with repaired logic and an additional testcase.Adrian Prantl
Un-break the gdb buildbot. - Use the debug location of the return expression for the cleanup code if the return expression is trivially evaluatable, regardless of the number of stop points in the function. - Ensure that any EH code in the cleanup still gets the line number of the closing } of the lexical scope. - Added a testcase with EH in the cleanup. rdar://problem/13442648 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181056 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-03Move parsing of identifiers in MS-style inline assembly intoJohn McCall
the actual parser and support arbitrary id-expressions. We're actually basically set up to do arbitrary expressions here if we wanted to. Assembly operands permit things like A::x to be written regardless of language mode, which forces us to embellish the evaluation context logic somewhat. The logic here under template instantiation is incorrect; we need to preserve the fact that an expression was unevaluated. Of course, template instantiation in general is fishy here because we have no way of delaying semantic analysis in the MC parser. It's all just fishy. I've also fixed the serialization of MS asm statements. This commit depends on an LLVM commit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180976 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-01Fix typo in FileCheck.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180877 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-01[inline asm] Add a test case for r180873. Test case needs to be on the clangChad Rosier
side because we need an inline asm diagnostics handler in place. Unfortunately, we emit a .s file because we need to build the SelectionDAG to hit the backend issue. rdar://13446483 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180874 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-30Revert 180817 because 180816 was reverted.Adrian Prantl
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180823 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-30Do not generate VLAs as complex variables any more, as they are nowAdrian Prantl
correctly represented as breg+0 locations in the backend. (Paired commit with LLVM: r180815) rdar://problem/13658587 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180817 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-30Struct-path aware TBAA: enable struct-path aware TBAA for classes.Manman Ren
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180795 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-27Struct-path aware TBAA: fix handling of may_alias attribute.Manman Ren
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180656 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-27Struct-path aware TBAA: change the format of TBAAStructType node.Manman Ren
We switch the order of offset and field type to make TBAAStructType node (name, parent node, offset) similar to scalar TBAA node (name, parent node). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180653 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-22Add triple to tbaa-struct.cpp to appease botsManman Ren
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180065 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-22TBAA: make sure zero-length bitfield works for tbaa.struct and path-aware tbaaManman Ren
For ms structs, zero-length bitfields following non-bitfield members are completely ignored, we should not increase the field index. Before the fix, we will have an assertion failure. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180038 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-22Don't emit _ZTW wrappers for TLS variables which don't use the C++ ↵Richard Smith
thread_local keyword. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180004 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-18Fix typo.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179811 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-18some more tests for r179743.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179781 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-18Add IRGen test case for r179743.Argyrios Kyrtzidis
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179777 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-17Test cases for r179719.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179720 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-17Set SRet flags properly in '-cxx-abi microsoft'.Timur Iskhodzhanov
Also, - abstract out the indirect/in memory/in registers decisions into the CGCXXABI - fix handling of empty struct arguments for '-cxx-abi microsoft' - add/fix tests git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179681 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-17Test cases for r179655.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179656 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-16Add support for sparcv9 targets.Jakob Stoklund Olesen
The SPARC v8 and SPARC v8 architectures are very similar, so use a base class to share most information between them. Include operating systems with known SPARC v9 ports. Also fix two issues with the SPARC v8 data layout string: SPARC v8 is a big endian target with a 64-bit aligned stack. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179596 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12Add test case for r179403.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179404 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12Add test case for r179399.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179400 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12Add test case for r179383 and r179393.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179394 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-12Remove REQUIRES now that r179237 fixed the real problem.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179349 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11Add test case for r179343.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179344 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11Test case for r179339.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179340 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11Struct-path aware TBAA: uniformize scalar tag and path tag.Manman Ren
For struct-path aware TBAA, we used to use scalar type node as the scalar tag, which has an incompatible format with the struct path tag. We now use the same format: base type, access type and offset. We also uniformize the scalar type node and the struct type node: name, a list of pairs (offset + pointer to MDNode). For scalar type, we have a single pair. These are to make implementaiton of aliasing rules easier. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179335 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-11Update test case for r179323.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179324 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10get rid of stdio.h include in testcaseAdrian Prantl
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179237 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10add mips target requirement to testcaseAdrian Prantl
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179236 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10Mips specific inline asm memory operand modifier test caseJack Carter
These changes are based on commit responses for r179135. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179229 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10FileCheck-ify some clang grep tests that use double quotesReid Kleckner
The escaping interaction between Python and grep doesn't work on my system. This change fixes the tests for me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179214 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10[ms-inline asm] Move a few test cases from the 32-bit version to the 64-bitChad Rosier
version as lea is only available in 64-bit mode. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179190 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-10[ms-inline asm] Add a few test cases that were regressed by r179115. ThatChad Rosier
commit was reverted in r179120, but I do plan on reapplying with a fix shortly. Part of rdar://13611297 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179182 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-08The PNaCl target no longer permits __attribute__((regparm)).Eli Bendersky
Remove the custom lowering code dealing with it, disallow it in PNaclTargetInfo and adjust tests accordingly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179059 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-08Test case for r179030.Chad Rosier
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179031 91177308-0d34-0410-b5e6-96231b3b80d8
2013-04-05Try to appease the atom buildbotsManman Ren
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@178898 91177308-0d34-0410-b5e6-96231b3b80d8