Commit Graph

2074 Commits

Author SHA1 Message Date
Jack Carter 77dce2f905 [Mips][msa] Added most builtins from add.a to xori
Includes:
add.a, adds_a, adds_s, adds_u, addv, addvi, andi.b, asub_[su], ave_[su],
aver_[su], bclr, bclri, bins[lr], bins[lr]i, bmnzi, bmzi, bneg, bnegi, bset,
bseti, c(eq|ne), c(eq|ne)i, cl[et]_[su], cl[et]i_[su], copy_[su].[bhw],
div_[su], dotp_[su], dpadd_[su], dpsub_[su], fadd, fceq, fclass, fcl[et], fcne,
fdiv, fexp2, ffint_[su], ffql, ffqr, fill, flog2, fmadd, fmax, fmax_a, fmin,
fmin_a, fmsub, fmul, frint, fseq, fsle, fslt, fsne, fsqr, fsub, ftint_[su],
ftq, ilvev, ilvl, ilvod, ilvr, ldi, frcp, frsqrt, madd_q, maddr_q, maddv,
max_[asu], maxi_[su], min_[asu], mini_[su], mod_[su], msub_q, msubr_q, msubv,
mul_q, mulr_q, mulv, nloc, nlzc, nori, ori, pckev, pckod, pcnt, sat_[su], shf,
sld, sldi, sll, slli, splat, splati, sr[al], sr[al]i, subs_[su], subv, subvi,
xori


Patch by Daniel Sanders

llvm-svn: 188461
2013-08-15 14:47:02 +00:00
Hao Liu 4efa1402fe Clang and AArch64 backend patches to support shll/shl and vmovl instructions and ACLE functions
llvm-svn: 188452
2013-08-15 08:26:30 +00:00
Stephen Lin 4362261b00 CHECK-LABEL-ify some code gen tests to improve diagnostic experience when tests fail.
llvm-svn: 188447
2013-08-15 06:47:53 +00:00
Arnold Schwaighofer 68443b0a14 Fix xcore tests to use regex.
llvm-svn: 188271
2013-08-13 14:51:38 +00:00
Robert Lytton 0e07649ae5 Add XCore target
llvm-svn: 188258
2013-08-13 09:43:10 +00:00
Tim Northover 19ae1175ae Fix FileCheck --check-prefix lines.
Various tests had sprung up over the years which had --check-prefix=ABC on the
RUN line, but "CHECK-ABC:" later on. This happened to work before, but was
strictly incorrect. FileCheck is getting stricter soon though.

Patch by Ron Ofir.

llvm-svn: 188174
2013-08-12 12:51:05 +00:00
Benjamin Kramer 588b35ed8f Add lrint to the list of math builtins. It never sets errno so we can mark it as readnone.
llvm-svn: 188065
2013-08-09 10:12:30 +00:00
Rafael Espindola 71eccb39b8 Fix alignof computation of large arrays on x86_64.
We were exposing the extra alignment given to large arrays. The new behavior
matches gcc, which is a good thing since this is a gcc extension.

Thanks to Joerg Sonnenberger for noticing it.

While at it, centralize the method description in the .h file.

llvm-svn: 187999
2013-08-08 19:53:46 +00:00
Hans Wennborg 75958c41e2 clang-cl: Support the run-time selection options (/MD, /MT et al.)
These flags set some preprocessor macros and injects a dependency
on the runtime library into the object file, which later is picked up
by the linker.

This also adds a new CC1 flag for adding a dependent library.

Differential Revision: http://llvm-reviews.chandlerc.com/D1315

llvm-svn: 187945
2013-08-08 00:17:41 +00:00
Rafael Espindola 885727581c Correctly allign arrays on 32 bit systems.
Before this patch we would align

long long int big[1024];

to 4 bytes on 32 bit systems. The problem is that we were only looking
at the element type when getLargeArrayMinWidth returned non zero.

llvm-svn: 187897
2013-08-07 18:08:19 +00:00
Craig Topper 50ad5b7354 Add support for passing -1 to __builtin_shufflevector to signify an undefined element value to match IR capabilities.
llvm-svn: 187694
2013-08-03 17:40:38 +00:00
David Blaikie 79af384d72 DebugInfo: Don't prefer declarations over definitions in -flimit-debug-info in C
Without an ODR, the -flimit-debug-info debug info size optimization of
emitting declarations for fully defined types when only a declaration is
needed by the TU, is incorrect. Emit the full definition whenever it's
available in non-C++.

llvm-svn: 187611
2013-08-01 20:57:40 +00:00
David Majnemer 62f0ffd733 AST: Treat inline function declarations in -fms-compatibility as if it were in C++ when in C mode
This essentially fixes PR16766.

llvm-svn: 187586
2013-08-01 17:26:42 +00:00
Tim Northover 2fe823a6c3 AArch64: initial NEON support
Patch by Ana Pazos

- Completed implementation of instruction formats:
AdvSIMD three same
AdvSIMD modified immediate
AdvSIMD scalar pairwise

- Completed implementation of instruction classes
(some of the instructions in these classes
belong to yet unfinished instruction formats):
Vector Arithmetic
Vector Immediate
Vector Pairwise Arithmetic

- Initial implementation of instruction formats:
AdvSIMD scalar two-reg misc
AdvSIMD scalar three same

- Intial implementation of instruction class:
Scalar Arithmetic

- Initial clang changes to support arm v8 intrinsics.
Note: no clang changes for scalar intrinsics function name mangling yet.

- Comprehensive test cases for added instructions
To verify auto codegen, encoding, decoding, diagnosis, intrinsics.

llvm-svn: 187568
2013-08-01 09:23:19 +00:00
Rafael Espindola 9d910f9ac3 Remove the mblaze backend from clang.
Approval in here http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-July/064169.html

llvm-svn: 187143
2013-07-25 18:42:13 +00:00
Eli Bendersky c3496b0643 Partial revert of r185568.
r186899 and r187061 added a preferred way for some architectures not to get
intrinsic generation for math builtins. So the code changes in r185568 can
now be undone (the test remains).

llvm-svn: 187079
2013-07-24 21:22:01 +00:00
Bill Schmidt 179afae0bf [PowerPC64] Fix passing of single-vector-member structs to match ABI.
The 64-bit PowerPC ELF ABI requires a struct that contains a single
vector member to be passed in a vector register as though the wrapping
struct were not present.  Instead we were passing this as a byval
struct.

The same logic was already present for floating-point arguments, so
this patch just extends the logic to handle vector types.  The new
test case verifies that clang coerces the parameter and annotates it
as inreg.

Thanks,
Bill

llvm-svn: 186993
2013-07-23 22:15:57 +00:00
Eli Bendersky e6cbf1c04f Make the nomathbuiltin.c test less demanding.
This should hopefully unbreak the Windows bots at http://bb.pgr.jp

llvm-svn: 186906
2013-07-23 01:09:17 +00:00
Eli Friedman 088d39afc6 Integers which are too large should be an error.
Switch some warnings over to errors which should never have been warnings
in the first place.  (Also, a minor fix to the preprocessor rules for
integer literals while I'm here.)

llvm-svn: 186903
2013-07-23 00:25:18 +00:00
Eli Bendersky aefa5e2ff2 Add a -fno-math-builtin option to the Clang -cc1
llvm-svn: 186899
2013-07-23 00:13:01 +00:00
JF Bastien 2a0a476e74 Fix volatile _Complex alignment test on platforms where 64-bit floating point isn't 64-bit aligned
Add x86-64 triple, and check its datalayout. Also add some comments, and use the new CHECK-LABEL.

llvm-svn: 186564
2013-07-18 06:11:45 +00:00
NAKAMURA Takumi 39eb51e89a clang/test/CodeGen/volatile-complex.c: Loosen CHECKs for -Asserts.
llvm-svn: 186492
2013-07-17 06:39:40 +00:00
JF Bastien 27dcbb24e5 Propagate alignment for _Complex
_Complex load/store didn't have their alignment set properly, which was visible when GCC's torture tests use volatile _Complex.

Update some existing tests to check for alignment, and add a new test which also has over-aligned volatile _Complex (since the imaginary part shouldn't be overaligned, only the real part).

llvm-svn: 186490
2013-07-17 05:57:42 +00:00
Eli Friedman 64f2391899 Fix crash on complex constant zero.
Fixes <rdar://problem/14442543>.

llvm-svn: 186452
2013-07-16 20:19:04 +00:00
Tim Northover e0482760fc Fix test on release builds.
Unfortunately I don't think there's a good way to validate branch targets on
release builds. Fortunately it's a minor part of this test (and based on
generic code) so I don't mind dropping it.

llvm-svn: 186398
2013-07-16 10:22:19 +00:00
Tim Northover 6aacd49094 ARM: implement low-level intrinsics for the atomic exclusive operations.
This adds three overloaded intrinsics to Clang:
    T __builtin_arm_ldrex(const volatile T *addr)
    int __builtin_arm_strex(T val, volatile T *addr)
    void __builtin_arm_clrex()

The intent is that these do what users would expect when given most sensible
types. Currently, "sensible" translates to ints, floats and pointers.

llvm-svn: 186394
2013-07-16 09:47:53 +00:00
Richard Smith 8d304d5c73 Make these tests more robust against IRgen choosing to emit more named metadata.
llvm-svn: 186279
2013-07-14 06:18:38 +00:00
Argyrios Kyrtzidis 8ade08edba Changes so that a few tests do not fail when running under guarded malloc.
Guarded malloc emits some messages at the beginning in stderr when enabled.
These messages caused a few tests to fail.

llvm-svn: 186219
2013-07-12 22:30:03 +00:00
NAKAMURA Takumi d704cb755f clang/test/CodeGen/c11atomics.c: Fix testcase for -Asserts since r186054.
llvm-svn: 186055
2013-07-11 03:45:54 +00:00
Eli Friedman be4504df26 Simplify atomic load/store IRGen.
Also fixes a couple minor bugs along the way; see testcases.

llvm-svn: 186049
2013-07-11 01:32:21 +00:00
Adrian Prantl 7278788ffe Reapply an improved version of r180816/180817.
Do not generate VLAs as complex variables any more, as they are now
correctly represented as breg+0 locations in the backend.

(Paired commit with LLVM: r185966)

rdar://problem/13658587

llvm-svn: 185967
2013-07-09 20:29:03 +00:00
NAKAMURA Takumi 9250b05696 clang/test/CodeGen/2008-01-25-ByValReadNone.c: Add explicit -triple x86_64-unknown-unknown.
It would emit @llvm.memcpy with "-triple x86_64-(mingw32|win32)" and had been failing since Nick's r185735.

  ; Function Attrs: nounwind
  declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture readonly, i64, i32, i1) #1

llvm-svn: 185796
2013-07-08 06:38:51 +00:00
Nick Lewycky 02df2062c6 Update test for change in r185735.
llvm-svn: 185736
2013-07-06 00:30:27 +00:00
Rafael Espindola 925213b0fa Add 'not' to commands that are expected to fail.
This is at least good documentation, but also opens the possibility of
using pipefail.

llvm-svn: 185652
2013-07-04 16:16:58 +00:00
Rafael Espindola 76e202c7b8 Looks like {{.*}} doesn't match the empty string. Fix test.
llvm-svn: 185650
2013-07-04 15:29:20 +00:00
Rafael Espindola 7ac579a3f8 Relax pattern to accept a signext on ppc64.
llvm-svn: 185649
2013-07-04 15:25:05 +00:00
Rafael Espindola be8a91b771 Replace 'grep foo | count 0' with 'not grep foo'.
This avoids depending on pipefail not being used.

llvm-svn: 185648
2013-07-04 15:22:16 +00:00
Rafael Espindola 0cf7c93849 Remove test for the old debug format which was XFAILed since 2009.
llvm-svn: 185647
2013-07-04 15:14:31 +00:00
Rafael Espindola 87627034a1 Add missing expected-warning.
llvm-svn: 185644
2013-07-04 15:04:25 +00:00
Rafael Espindola 550f263dcf Remove unused -verify.
llvm-svn: 185641
2013-07-04 14:51:11 +00:00
Rafael Espindola e703c0194c clang -cc1 has no -fno-unit-at-a-time or -funit-at-a-time. Fix test.
llvm-svn: 185639
2013-07-04 14:42:44 +00:00
Rafael Espindola a5695db67d Use a clang -cc1 option instead of -m32 and remove tcl quotes.
llvm-svn: 185637
2013-07-04 14:36:22 +00:00
Rafael Espindola 1011024e37 Remove tcl quotes.
llvm-svn: 185636
2013-07-04 14:30:41 +00:00
Rafael Espindola 450eb99c89 Convert test to FileCheck.
llvm-svn: 185635
2013-07-04 14:28:33 +00:00
Rafael Espindola 5dac06ff4b Remove old test.
It was trivially passing because of the tcl quotes and we have better datalayout
tests.

llvm-svn: 185630
2013-07-04 14:20:52 +00:00
Rafael Espindola d1d617593b Remove old test.
It was not clear what was being tested and the test was trivially passing
by getting grep confused with tcl quotes.

llvm-svn: 185629
2013-07-04 14:18:32 +00:00
Rafael Espindola 53e40e4b06 Clang has no nested function support. Delete this test.
llvm-svn: 185628
2013-07-04 14:13:53 +00:00
Eli Bendersky 9b64ec18c1 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.

llvm-svn: 185568
2013-07-03 19:19:12 +00:00
Serge Pavlov f432f85777 Test case for PR7887 - failed with asm("")
llvm-svn: 185543
2013-07-03 15:32:48 +00:00
Serge Pavlov b4bbae0703 Fixed test options.
llvm-svn: 185493
2013-07-03 01:43:57 +00:00