Commit Graph

226840 Commits

Author SHA1 Message Date
Todd Fiala 8ac4fd7b21 Guard xunit result test class and test method name access to prevent testbot breakage
http://llvm.org/bugs/show_bug.cgi?id=27179

llvm-svn: 265165
2016-04-01 17:59:51 +00:00
Simon Pilgrim b8283631a5 [X86][SSE] Regenerated vec_setcc tests.
llvm-svn: 265164
2016-04-01 17:55:02 +00:00
Simon Pilgrim 41e31ff6bd [X86][SSE] Regenerated the vec_set tests.
Replaced lots of dodgy greps with actual codegen

llvm-svn: 265163
2016-04-01 17:40:25 +00:00
Bruno Cardoso Lopes f854b042e7 [CrashReproducer] Add -fmodule-cache-path to reproducer script
The cc1 invocation in the reproducer script should contain a valid path in
-fmodule-cache-path; for that reuse "<name>.cache/module" dir we already
use to dump the vfs and modules.

llvm-svn: 265162
2016-04-01 17:39:08 +00:00
Sanjay Patel 9f413364d5 [x86] avoid intermediate splat for non-zero memsets (PR27100)
Follow-up to http://reviews.llvm.org/D18566 and http://reviews.llvm.org/D18676 -
where we noticed that an intermediate splat was being generated for memsets of
non-zero chars.

That was because we told getMemsetStores() to use a 32-bit vector element type,
and it happily obliged by producing that constant using an integer multiply.

The 16-byte test that was added in D18566 is now equivalent for AVX1 and AVX2
(no splats, just a vector load), but we have PR27141 to track that splat difference.

Note that the SSE1 path is not changed in this patch. That can be a follow-up.
This patch should resolve PR27100.

llvm-svn: 265161
2016-04-01 17:36:45 +00:00
Chad Rosier 8787a81023 [AArch64] Fix a typo. NFC.
llvm-svn: 265160
2016-04-01 17:34:38 +00:00
George Rimar 687788c90e [ELF] - Split Writer::assignAddresses(): extract code for initializing dummies sections
Extracts code for initializing dummies sections
to avoid possible duplication in following patches.

Differential review: http://reviews.llvm.org/D18691

llvm-svn: 265159
2016-04-01 17:30:52 +00:00
David Majnemer fe3f9d1721 [InstCombine] Don't sink an instr after a catchswitch
A catchswitch is a terminator, instructions cannot be inserted after it.

llvm-svn: 265158
2016-04-01 17:28:17 +00:00
David Majnemer 6f1f85f0e1 [SLPVectorizer] Don't insert an extractelement before a catchswitch
A catchswitch cannot be preceded by another instruction in the same
basic block (other than a PHI node).

Instead, insert the extract element right after the materialization of
the vectorized value.  This isn't optimal but is a reasonable compromise
given the constraints of WinEH.

This fixes PR27163.

llvm-svn: 265157
2016-04-01 17:28:15 +00:00
Rui Ueyama f7f52ef65d Make error handling consistent.
Some functions in Writer reports error using HasError, and some reports
their return values. This patch makes them to consistently use HasError.

llvm-svn: 265156
2016-04-01 17:24:19 +00:00
Rui Ueyama 8ecc2ec0e3 Remove dead code.
Thanks to George Rimor for pointing it out.

llvm-svn: 265155
2016-04-01 17:17:14 +00:00
Rui Ueyama a63baf176f Don't do extra work if -r is given.
fixAbsoluteSymbols fixes linker-created symbol addresses. Since we don't
create such symbols for relocatable output, we don't need to call this
function.

llvm-svn: 265154
2016-04-01 17:11:42 +00:00
Reid Kleckner 1992ac75db Fix warnings uncovered by building with clang-cl
Move ifdefs to avoid unused static helpers. Move alignment attribute so
that it is respected in GCC and MSVC.

llvm-svn: 265153
2016-04-01 17:09:12 +00:00
Reid Kleckner a8e5c0c200 Fix a load of -Wunknown-pragma warnings from clang-cl
llvm-svn: 265152
2016-04-01 17:09:08 +00:00
Rui Ueyama e044e9cf80 Tidy up address and file offset assignments in the Writer.
assignAddressesRelocatable function did not set addresses to sections
despite its name. What it actually did is to set file offsets to sections.
assignAddresses function assigned addresses and file offsets to sections.
So there was a confusion what they were doing, and they had duplicate code.

This patch separates file offset assignments from address assignments.
A new function, assignFileOffsets assign file offsets. assignAddresses
do not care about file offsets anymore.

llvm-svn: 265151
2016-04-01 17:07:17 +00:00
Rafael Espindola 790db9c458 Bring r264761 back with an extra fix.
The extra fix is to note that it still requires copy relocations.

Original message:

Change how we handle R_MIPS_LO16.

Mips aligns PT_LOAD to 16 bits (0x10000). That means that the lower 16
bits are always the same, so we can, effectively, say that the
relocation is relative.

P.S.: Suggestions for a better name for the predicate are welcome :-)

llvm-svn: 265150
2016-04-01 17:00:36 +00:00
Rong Xu 8e8fe859e0 [PGO] Refactor PGOFuncName meta data code to be used in clang
Refactor the code that gets and creates PGOFuncName meta data so that it can be
used in clang's value profile annotation.

Differential Revision: http://reviews.llvm.org/D18623

llvm-svn: 265149
2016-04-01 16:43:30 +00:00
Sanjay Patel a05e0ff223 [x86] avoid intermediate splat for non-zero memsets (PR27100)
Follow-up to D18566 - where we noticed that an intermediate splat was being
generated for memsets of non-zero chars.

That was because we told getMemsetStores() to use a 32-bit vector element type,
and it happily obliged by producing that constant using an integer multiply.

The tests that were added in the last patch are now equivalent for AVX1 and AVX2
(no splats, just a vector load), but we have PR27141 to track that splat difference.
In the new tests, the splat via shuffling looks ok to me, but there might be some
room for improvement depending on uarch there.

Note that the SSE1/2 paths are not changed in this patch. That can be a follow-up.
This patch should resolve PR27100.

Differential Revision: http://reviews.llvm.org/D18676

llvm-svn: 265148
2016-04-01 16:27:14 +00:00
Rafael Espindola 2ee0092053 Don't apply a recolation that the dynamic linker will rewrite.
This matches the behavior of both bfd and gold. Looks like we just got
here for mips because of a bad ordering of an if else chain.

llvm-svn: 265147
2016-04-01 16:21:09 +00:00
Anastasia Stulova fde7622ec0 [OpenCL] Moved nosvm attribute handling in Sema to other OpenCL attrs
llvm-svn: 265146
2016-04-01 16:05:09 +00:00
Benjamin Kramer 99c67b31cb [ADT] Make StringMap's tombstone aligned.
This avoids undefined behavior when casting pointers to it. Also make
sure that we don't cast to a derived StringMapEntry before checking for
tombstone, as that may have different alignment requirements.

llvm-svn: 265145
2016-04-01 15:51:51 +00:00
Vedant Kumar 7784171721 [PGOProfile] Rename a test to make it more reusable, NFC
llvm-svn: 265144
2016-04-01 15:45:33 +00:00
Rafael Espindola 666625b78c Pass a const pointer to getImplicitAddend. NFC.
llvm-svn: 265143
2016-04-01 14:36:09 +00:00
Rafael Espindola 31d2ada6d5 Refactor duplicated code.
We had almost identical code to handle creating a plt entry in two
places.

llvm-svn: 265142
2016-04-01 14:14:48 +00:00
Valery Pykhtin 5b3559c1ec [AMDGPU] fix MADAK/MADMK instructions operand namings to match encoding fields.
$vsrc1 -> $src1, $k -> $imm

Differential Revision: http://reviews.llvm.org/D18659

llvm-svn: 265141
2016-04-01 13:13:12 +00:00
Pavel Labath f0537825a2 Fix clean rule for a makefile
The test was failing on windows because the clean rule (which is executed even if the test is
skipped) returned an error there.

llvm-svn: 265140
2016-04-01 12:59:37 +00:00
Rafael Espindola b97f4beec4 Avoid creating duplicated relocations.
llvm-svn: 265139
2016-04-01 12:54:27 +00:00
Andrea Di Biagio 8c48841907 [x86] Remove redundant call to setTargetDAGCombine for BUILD_VECTOR node type.
Since revision 235394, we no longer perform target specific combines on
build_vector nodes. No functional change intended.

llvm-svn: 265138
2016-04-01 12:25:44 +00:00
George Rimar 5a5c39ca2a Fix linux buildbot after r265136
http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/20138

Fix: Move method above class that uses it.
Works fine with MSVS.

llvm-svn: 265137
2016-04-01 12:24:28 +00:00
George Rimar e2da42a762 Make dummySectionsNum() to be not a member of writer. NFC.
llvm-svn: 265136
2016-04-01 11:59:32 +00:00
Simon Pilgrim 7ec092d0f8 [X86][AVX512] Regenerated intrinsics tests
llvm-svn: 265135
2016-04-01 11:57:51 +00:00
Sagar Thakur 48973d21e1 [MIPS][LLVM-MC] Fix JR encoding for MIPSR6 ISA
Summary: The assembler was picking the wrong JR variant because the pre-R6 one was still enabled at R6.

Author: nitesh.jain
Reviewers: vkalintiris, dsanders
Subscribers: dsanders, llvm-commits, mohit.bhakkad, sagar, bhushan, jaydeep
Differential: D18387
llvm-svn: 265134
2016-04-01 11:55:33 +00:00
Benjamin Kramer 398e95c181 [ThinLTO] Fix uninitialized flags.
Found by msan. Patch by Adrian Kuegel!

llvm-svn: 265133
2016-04-01 11:49:59 +00:00
Johannes Doerfert 6ba927148d [FIX] Adjust the insert point for non-affine region PHIs
If a non-affine region PHI is generated we should not move the insert
  point prior to the synthezised value in the same block as we might
  split that block at the insert point later on. Only if the incoming
  value should be placed in a different block we should change the
  insertion point.

llvm-svn: 265132
2016-04-01 11:25:47 +00:00
George Rimar b345e0d15c Split Writer::assignAddresses(): extract common code to fixFileOff(). NFC.
llvm-svn: 265131
2016-04-01 11:04:47 +00:00
George Rimar 900a260357 Split Writer::assignAddresses(): extract assignPhdrs(). NFC.
llvm-svn: 265130
2016-04-01 10:49:14 +00:00
George Rimar efded31a61 [ELF] - Move calculation of _end to fixAbsoluteSymbols()
That is consistent with other symbols: _edata, _etext
and can help to avoid duplicate code.

Differential revision: http://reviews.llvm.org/D18655

llvm-svn: 265129
2016-04-01 10:23:32 +00:00
Andrey Turetskiy 958eb46443 [X86] Introduce Lakemont CPU.
Add a new Intel MCU CPU Lakemont, which doesn't support X87.

Differential Revision: http://reviews.llvm.org/D18650

llvm-svn: 265128
2016-04-01 10:16:15 +00:00
Alexey Bataev d51775b765 [OPENMP] Fixed documentation category for 'declare simd' attribute, NFC.
llvm-svn: 265127
2016-04-01 10:12:06 +00:00
Benjamin Kramer 22f24f6815 [Lexer] Let the compiler infer string lengths. No functionality change intended.
llvm-svn: 265126
2016-04-01 10:04:07 +00:00
Benjamin Kramer e550bbdf9d [Lexer] Don't read out of bounds if a conflict marker is at the end of a file
This can happen as we look for '<<<<' while scanning tokens but then expect
'<<<<\n' to tell apart perforce from diff3 conflict markers. Just harden
the pointer arithmetic.

Found by libfuzzer + asan!

llvm-svn: 265125
2016-04-01 09:58:45 +00:00
Pavel Labath a5d09f64a1 Change a recently added assert into lldbassert
llvm-svn: 265124
2016-04-01 09:57:30 +00:00
Dmitry Polukhin dc78bc8209 [OPENMP] Avoid useless recursive calls in getDSA if it is called in a loop, NFC
llvm-svn: 265123
2016-04-01 09:52:30 +00:00
James Molloy b876c72bcc Fix for pr24346: arm asm label calculation error in sub
Some ARM instructions encode 32-bit immediates as a 8-bit integer (0-255)
and a 4-bit rotation (0-30, even) in its least significant 12 bits. The
original fixup, FK_Data_4, patches the instruction by the value bit-to-bit,
regardless of the encoding. For example, assuming the label L1 and L2 are
0x0 and 0x104 respectively, the following instruction:

  add r0, r0, #(L2 - L1) ; expects 0x104, i.e., 260

would be assembled to the following, which adds 1 to r0, instead of 260:

  e2800104 add r0, r0, #4, 2 ; equivalently 1

The new fixup kind fixup_arm_mod_imm takes care of the encoding:

  e2800f41 add r0, r0, #260

Patch by Ting-Yuan Huang!

llvm-svn: 265122
2016-04-01 09:40:47 +00:00
Alexey Bataev c6ad97a3e7 [OPENMP 4.5] Allow data members as loop counters in loop-based
directives.

OpenMP 4.5 allows privatization of non-static data members in non-static
member functions. Patch allows to use and implicit privatization of data
members used as counters in loop-based directives.

llvm-svn: 265121
2016-04-01 09:23:34 +00:00
Oliver Stannard a5520b02a5 [AArch64] Better errors for out-of-range fixups
When a fixup that can be resolved by the assembler is out of range, we should
report an error in the source, rather than crashing.

Differential Revision: http://reviews.llvm.org/D18402

llvm-svn: 265120
2016-04-01 09:14:50 +00:00
Alexey Bataev c5970623e0 Revert "[OPENMP] Allow skip expression after comma in clauses with lists."
This reverts commit http://reviews.llvm.org/rL265003. After some
thoughts decided to emit errors here.

llvm-svn: 265119
2016-04-01 08:43:42 +00:00
Mehdi Amini 215d59e7b0 ThinLTO: move ObjCARCContractPass in the CodeGen pipeline
This is to be coherent with Full LTO.

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 265118
2016-04-01 08:22:59 +00:00
Haojian Wu 7d15853c9f [clang-tidy] Don't delete unused parameter in class override method in anonymous namespace.
Summary: Fixes PR26740.

Reviewers: alexfh

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D17926

llvm-svn: 265117
2016-04-01 07:57:30 +00:00
Jeroen Ketema b7f633b8d3 [OCaml] Use LLVMCreateMessage with constant strings when calling llvm_raise
The llvm_string_of_message function, called by llvm_raise, calls
LLVMDisposeMessage, which expects the message to be dynamically
allocated; it fails freeing the message otherwise. So always
dynamically allocate with LLVMCreateMessage.

Differential Revision: http://reviews.llvm.org/D18675

llvm-svn: 265116
2016-04-01 07:56:17 +00:00