OSDN Git Service

android-x86/external-llvm.git
8 years ago[SelectionDAG] Fold more offsets into GlobalAddresses
Dan Gohman [Fri, 22 Jan 2016 03:57:34 +0000 (03:57 +0000)]
[SelectionDAG] Fold more offsets into GlobalAddresses

This reapplies r258296 and r258366, and also fixes an existing bug in
SelectionDAG.cpp's isMemSrcFromString, neglecting to account for the
offset in a GlobalAddressSDNode, which is uncovered by those patches.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258482 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReplace Type::getInt32Ty() and comparison by isIntegerTy(32). NFC.
Manuel Jacob [Fri, 22 Jan 2016 03:30:27 +0000 (03:30 +0000)]
Replace Type::getInt32Ty() and comparison by isIntegerTy(32).  NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258480 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert r258473 as it's breaking the build with libc++
Ivan Krasin [Fri, 22 Jan 2016 03:21:52 +0000 (03:21 +0000)]
Revert r258473 as it's breaking the build with libc++

Reviewers: kcc

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258479 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[opaque pointer types] [NFC] DataLayout::getIndexedOffset: take source element type...
Eduard Burtescu [Fri, 22 Jan 2016 03:08:27 +0000 (03:08 +0000)]
[opaque pointer types] [NFC] DataLayout::getIndexedOffset: take source element type instead of pointer type and rename to getIndexedOffsetInType.

Summary:

Reviewers: mjacob, dblaikie

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258478 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[opaque pointer types] [NFC] FindAvailableLoadedValue: take LoadInst instead of just...
Eduard Burtescu [Fri, 22 Jan 2016 01:51:51 +0000 (01:51 +0000)]
[opaque pointer types] [NFC] FindAvailableLoadedValue: take LoadInst instead of just the pointer.

Reviewers: mjacob, dblaikie

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258477 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[opaque pointer types] [NFC] gep_type_{begin,end} now take source element type and...
Eduard Burtescu [Fri, 22 Jan 2016 01:33:43 +0000 (01:33 +0000)]
[opaque pointer types] [NFC] gep_type_{begin,end} now take source element type and address space.

Reviewers: mjacob, dblaikie

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258474 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUse std::piecewise_constant_distribution instead of ad-hoc binary search.
Ivan Krasin [Fri, 22 Jan 2016 01:32:34 +0000 (01:32 +0000)]
Use std::piecewise_constant_distribution instead of ad-hoc binary search.

Summary:
Fix the issue with the most recently discovered unit receiving much less attention.

Note: I had to change the seed for one test to make it pass. Alternatively,
the number of runs could be increased. I believe that the average time of
'foo' discovery is not increased, just seed=1 was particularly convenient
for the previous PRNG scheme used.

Reviewers: aizatsky, kcc

Subscribers: llvm-commits, kcc

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258473 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[opaque pointer types] [NFC] Add an explicit type argument to ConstantFoldLoadFromCon...
Eduard Burtescu [Fri, 22 Jan 2016 01:17:26 +0000 (01:17 +0000)]
[opaque pointer types] [NFC] Add an explicit type argument to ConstantFoldLoadFromConstPtr.

Reviewers: mjacob, dblaikie

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258472 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDo not lower VSETCC if operand is an f16 vector
Pirama Arumuga Nainar [Fri, 22 Jan 2016 01:16:57 +0000 (01:16 +0000)]
Do not lower VSETCC if operand is an f16 vector

Summary:
SETCC with f16 vectors has OperationAction set to Expand but still gets
lowered to FCM* intrinsics based on its result type.  This patch skips
lowering of VSETCC if the operand is an f16 vector.

v4 and v8 tests included.

Reviewers: ab, jmolloy

Subscribers: srhines, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258471 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "[SelectionDAG] Fold more offsets into GlobalAddresses"
Reid Kleckner [Fri, 22 Jan 2016 01:09:29 +0000 (01:09 +0000)]
Revert "[SelectionDAG] Fold more offsets into GlobalAddresses"

This reverts r258296 and the follow up r258366. With this change, we
miscompiled the following program on Windows:
  #include <string>
  #include <iostream>
  static const char kData[] = "asdf jkl;";
  int main() {
    std::string s(kData + 3, sizeof(kData) - 3);
    std::cout << s << '\n';
  }

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258465 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[libFuzzer] don't do expensive memmem if the result will not be used
Kostya Serebryany [Fri, 22 Jan 2016 01:04:58 +0000 (01:04 +0000)]
[libFuzzer] don't do expensive memmem if the result will not be used

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258462 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ThinLTO] Do metadata linking during batch function importing
Teresa Johnson [Fri, 22 Jan 2016 00:15:53 +0000 (00:15 +0000)]
[ThinLTO] Do metadata linking during batch function importing

Summary:
Since we are currently not doing incremental importing there is
no need to link metadata as a postpass. The module linker will
only link in the imported subroutines due to the functionality
added by r256003.

(Note that the metadata postpass linking functionalitiy is still
used by llvm-link, and may be needed here in the future if a more
incremental strategy is adopted.)

Reviewers: joker.eph

Subscribers: joker.eph, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258458 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[opaque pointer types] [NFC] Take advantage of get{Source,Result}ElementType when...
Eduard Burtescu [Thu, 21 Jan 2016 23:42:06 +0000 (23:42 +0000)]
[opaque pointer types] [NFC] Take advantage of get{Source,Result}ElementType when folding GEPs.

Summary:

Reviewers: mjacob, dblaikie

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258456 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agomove function definitions so we don't need separate declarations ; NFCI
Sanjay Patel [Thu, 21 Jan 2016 23:38:43 +0000 (23:38 +0000)]
move function definitions so we don't need separate declarations ; NFCI

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258455 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LibCallSimplifier] refactor FP function signature checks ; NFCI
Sanjay Patel [Thu, 21 Jan 2016 22:58:01 +0000 (22:58 +0000)]
[LibCallSimplifier] refactor FP function signature checks ; NFCI

Use the helper function added in r258428.

The check should really be hoisted to the caller of all of these
optimize* functions, but that's another step.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258446 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoavoid variable shadowing; NFC
Sanjay Patel [Thu, 21 Jan 2016 22:41:16 +0000 (22:41 +0000)]
avoid variable shadowing; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258445 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoremove unnecessary variable; NFC
Sanjay Patel [Thu, 21 Jan 2016 22:31:18 +0000 (22:31 +0000)]
remove unnecessary variable; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258444 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAvoid unnecessary stack realignment in musttail thunks with SSE2 enabled
Reid Kleckner [Thu, 21 Jan 2016 22:23:22 +0000 (22:23 +0000)]
Avoid unnecessary stack realignment in musttail thunks with SSE2 enabled

The X86 musttail implementation finds register parameters to forward by
running the calling convention algorithm until a non-register location
is returned. However, assigning a vector memory location has the side
effect of increasing the function's stack alignment. We shouldn't
increase the stack alignment when we are only looking for register
parameters, so this change conditionalizes it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258442 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE] Improve i16 splatting shuffles
Simon Pilgrim [Thu, 21 Jan 2016 22:07:41 +0000 (22:07 +0000)]
[X86][SSE] Improve i16 splatting shuffles

Better handling of the annoying pshuflw/pshufhw ops which only shuffle lower/upper halves of a vector.

Added vXi16 unary shuffle support for cases where i16 elements (from the same half of the source) are being splatted to the whole of one of the halves. This avoids the general lowering case which must shuffle the 32-bit elements first - meaning that we used to end up with unnecessary duplicate pshuflw/pshufhw shuffles.

Note this has the side effect of a lot of SSSE3 test cases no longer needing to use PSHUFB, as it falls below the 3 op combine threshold for when PSHUFB is typically worth it. I've raised PR26183 to discuss if the threshold should be changed and whether we need to make it more specific to the target CPU.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258440 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoIn test-release.sh, only run `uname -s` once. NFC.
Dimitry Andric [Thu, 21 Jan 2016 22:07:17 +0000 (22:07 +0000)]
In test-release.sh, only run `uname -s` once. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258439 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[RuntimeDyld][AArch64] Add support for the MachO ARM64_RELOC_SUBTRACTOR reloc.
Lang Hames [Thu, 21 Jan 2016 21:59:50 +0000 (21:59 +0000)]
[RuntimeDyld][AArch64] Add support for the MachO ARM64_RELOC_SUBTRACTOR reloc.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258438 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoLet test-release.sh checkout subprojects directly into the target tree,
Dimitry Andric [Thu, 21 Jan 2016 21:57:49 +0000 (21:57 +0000)]
Let test-release.sh checkout subprojects directly into the target tree,
instead of using symlinks

Summary:
In the past I have run into several problems with the way
`test-release.sh` creates all the subproject directories as siblings,
and then uses symlinks to stitch them all together.  In some scenarios
this leads to clang not being able to find header files, etc.

This patch changes the script so it directly exports into the correct
target locations for each subproject.

Reviewers: hans

Subscribers: emaste, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258436 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix for two constant propagation problems in GVN with the assume intrinsic
David L Kreitzer [Thu, 21 Jan 2016 21:32:35 +0000 (21:32 +0000)]
Fix for two constant propagation problems in GVN with the assume intrinsic
instruction.

Patch by Yuanrui Zhang.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258435 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix MachOObjectFile::getSymbolSection() to not call report_fatal_error()
Kevin Enderby [Thu, 21 Jan 2016 21:13:27 +0000 (21:13 +0000)]
Fix MachOObjectFile::getSymbolSection() to not call report_fatal_error()
but to return object_error::parse_failed.  Then made the code in llvm-nm
do for Mach-O files what is done in the darwin native tools which is to
print "(?,?)" or just "s" for bad section indexes.  Also added a test to show
it prints the bad section index of "42" when printing the fields as raw hex.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258434 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LibCallSimplifier] don't get fooled by a fake fmin()
Sanjay Patel [Thu, 21 Jan 2016 20:19:54 +0000 (20:19 +0000)]
[LibCallSimplifier] don't get fooled by a fake fmin()

This is similar to the bug/fix:
https://llvm.org/bugs/show_bug.cgi?id=26211
http://reviews.llvm.org/rL258325

The fmin() test case reveals another bug caused by sloppy
code duplication. It will crash without this patch because
fp128 is a valid floating-point type, but we would think
that we had matched a function that used doubles.

The new helper function can be used to replace similar
checks that are used in several other places in this file.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258428 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix buildbot failure due to r258420
Rong Xu [Thu, 21 Jan 2016 19:06:24 +0000 (19:06 +0000)]
Fix buildbot failure due to r258420

Include the needed headfile to fix the buildbot failure due to r258420 [PGO] Passmanagerbuilder change that enable IR level PGO instrumentation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258423 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[InstCombine] Simplify (x >> y) <= x
David Majnemer [Thu, 21 Jan 2016 18:55:54 +0000 (18:55 +0000)]
[InstCombine] Simplify (x >> y) <= x

This commit extends the patterns recognised by InstSimplify to also handle (x >> y) <= x in the same way as (x /u y) <= x.

The missing optimisation was found investigating why LLVM did not optimise away bound checks in a binary search: https://github.com/rust-lang/rust/pull/30917

Patch by Andrea Canciani!

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258422 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoPartially revert "Add command line options to force function/loop alignments."
Chad Rosier [Thu, 21 Jan 2016 18:49:15 +0000 (18:49 +0000)]
Partially revert "Add command line options to force function/loop alignments."

This partially reverts r256571 in favor of the solution in r258409.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258421 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PGO] Passmanagerbuilder change that enable IR level PGO instrumentation
Rong Xu [Thu, 21 Jan 2016 18:28:59 +0000 (18:28 +0000)]
[PGO] Passmanagerbuilder change that enable IR level PGO instrumentation

This patch includes the passmanagerbuilder change that enables IR level PGO instrumentation. It adds two passmanagerbuilder options: -profile-generate=<profile_filename> and -profile-use=<profile_filename>. The new options are primarily for debug purpose.

Reviewers: davidxl, silvas

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258420 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[TTI] Add getCacheLineSize
Adam Nemet [Thu, 21 Jan 2016 18:28:36 +0000 (18:28 +0000)]
[TTI] Add getCacheLineSize

Summary:
And use it in PPCLoopDataPrefetch.cpp.

@hfinkel, please let me know if your preference would be to preserve the
ppc-loop-prefetch-cache-line option in order to be able to override the
value of TTI::getCacheLineSize for PPC.

Reviewers: hfinkel

Subscribers: hulx2000, mcrosier, mssimpso, hfinkel, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258419 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PGO] IR level instrumentation of indirect call value profiling
Rong Xu [Thu, 21 Jan 2016 18:11:44 +0000 (18:11 +0000)]
[PGO] IR level instrumentation of indirect call value profiling

This patch adds the instrumentation for indirect call value profiling. It finds all the indirect call-sites and generates instrprof_value_profile intrinsic calls. A new opt level option -disable-vp is introduced to disable this instrumentation.

Reviewers: davidxl, betulb, vsk

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258417 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agomake helper functions static; NFCI
Sanjay Patel [Thu, 21 Jan 2016 18:01:57 +0000 (18:01 +0000)]
make helper functions static; NFCI

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258416 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUndo r258163 "Move part of an if condition into an assertion. NFC."
Manuel Jacob [Thu, 21 Jan 2016 17:36:14 +0000 (17:36 +0000)]
Undo r258163 "Move part of an if condition into an assertion.  NFC."

This undoes the change made in r258163.  The assertion fails if `Ptr` is of a
vector type.  The previous code doesn't look completely correct either, so I'll
investigate this more.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258411 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix a type in a comment
Philip Reames [Thu, 21 Jan 2016 17:32:12 +0000 (17:32 +0000)]
Fix a type in a comment

Thanks to Sean Silva for pointing it out.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258410 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[BlockPlacement] Add option to align all non-fall-through blocks.
Geoff Berry [Thu, 21 Jan 2016 17:25:52 +0000 (17:25 +0000)]
[BlockPlacement] Add option to align all non-fall-through blocks.

Summary: This option is being added for testing purposes.

Reviewers: mcrosier

Subscribers: mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258409 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "[SLP] Truncate expressions to minimum required bit width"
Matthew Simpson [Thu, 21 Jan 2016 17:17:20 +0000 (17:17 +0000)]
Revert "[SLP] Truncate expressions to minimum required bit width"

This reverts commit r258404.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258408 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUse early return to simplify code (NFC)
Teresa Johnson [Thu, 21 Jan 2016 17:16:53 +0000 (17:16 +0000)]
Use early return to simplify code (NFC)

Follow on to r258405.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258407 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[GCOV] Avoid emitting profile arcs for module and skeleton CUs
Vedant Kumar [Thu, 21 Jan 2016 17:04:42 +0000 (17:04 +0000)]
[GCOV] Avoid emitting profile arcs for module and skeleton CUs

Do not emit profile arc files and note files for module and skeleton
CU's.

Our users report seeing unexpected *.gcda and *.gcno files in their
projects when using gcov-style profiling with modules or frameworks.
The unwanted files come from these modules. This is not very helpful
for end-users. Further, we've seen reports of instrumented programs
crashing while writing these files out (due to I/O failures).

rdar://problem/22838296

Reviewed-by: aprantl
Differential Revision: http://reviews.llvm.org/D15997

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258406 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ThinLTO] Avoid unnecesary hash lookups during metadata linking (NFC)
Teresa Johnson [Thu, 21 Jan 2016 16:46:40 +0000 (16:46 +0000)]
[ThinLTO] Avoid unnecesary hash lookups during metadata linking (NFC)

Replace sequences of count() followed by operator[] with either
find() or insert(), depending on the context.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258405 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[SLP] Truncate expressions to minimum required bit width
Matthew Simpson [Thu, 21 Jan 2016 16:31:55 +0000 (16:31 +0000)]
[SLP] Truncate expressions to minimum required bit width

This change attempts to produce vectorized integer expressions in bit widths
that are narrower than their scalar counterparts. The need for demotion arises
especially on architectures in which the small integer types (e.g., i8 and i16)
are not legal for scalar operations but can still be used in vectors. Like
similar work done within the loop vectorizer, we rely on InstCombine to perform
the actual type-shrinking. We use the DemandedBits analysis and
ComputeNumSignBits from ValueTracking to determine the minimum required bit
width of an expression.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258404 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[mips] Allowed dla instructions on 32-bit architectures.
Scott Egerton [Thu, 21 Jan 2016 15:11:01 +0000 (15:11 +0000)]
[mips] Allowed dla instructions on 32-bit architectures.

Summary:
This is now the same as the behaviour of the GNU assembler. This was done
as it is required in order to build the Linux kernel with the integrated
assembler enabled.

Reviewers: dsanders, vkalintiris

Subscribers: dsanders, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258400 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert obsolete llvm-link -preserve-modules option/test
Teresa Johnson [Thu, 21 Jan 2016 14:28:52 +0000 (14:28 +0000)]
Revert obsolete llvm-link -preserve-modules option/test

This testing mode is now obsolete with the change to linkInModule
to take a std::unique_ptr to Module.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258399 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAVX512: Masked move intrinsic implementation.
Igor Breger [Thu, 21 Jan 2016 14:18:11 +0000 (14:18 +0000)]
AVX512: Masked move intrinsic implementation.
Implemented intrinsic for the follow instructions (reg move) : VMOVDQU8/16, VMOVDQA32/64, VMOVAPS/PD.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258398 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Adding VPERMT2B and VPERMI2B Intrinsics
Michael Zuckerman [Thu, 21 Jan 2016 13:36:01 +0000 (13:36 +0000)]
[AVX512] Adding VPERMT2B and VPERMI2B Intrinsics

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258397 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoPR26172: unnecessary indirection in HexagonCopyToCombine.cpp
Krzysztof Parzyszek [Thu, 21 Jan 2016 12:45:17 +0000 (12:45 +0000)]
PR26172: unnecessary indirection in HexagonCopyToCombine.cpp

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258395 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] - Removing warning on legal cases caused by commit r258132
Marina Yatsina [Thu, 21 Jan 2016 11:37:06 +0000 (11:37 +0000)]
[X86] - Removing warning on legal cases caused by commit r258132

There's an overloading of the "movsd" and "cmpsd" instructions, e.g. movsd can be either "Move Data from String to String" or "Move or Merge Scalar Double-Precision Floating-Point Value".
The former should produce warnings when parsing a memory operand that is not ESI/EDI, but the latter should not.

Fixed the code to produce warnings only after making sure we're dealing with the first case.

Expanded the tests of the produced warnings + fixed RUN line of the test so that it would check both stdout and stderr

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258393 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoChange ConstantFoldInstOperands to take Instruction instead of opcode and type. ...
Manuel Jacob [Thu, 21 Jan 2016 06:33:22 +0000 (06:33 +0000)]
Change ConstantFoldInstOperands to take Instruction instead of opcode and type.  NFC.

Summary:
The previous form, taking opcode and type, is moved to an internal
helper and the new form, taking an instruction, is a wrapper around this
helper.

Although this is a slight cleanup on its own, the main motivation is to
refactor the constant folding API to ease migration to opaque pointers.
This will be follow-up work.

Reviewers: eddyb

Subscribers: dblaikie, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258391 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoIntroduce ConstantFoldCastOperand function and migrate some callers of ConstantFoldIn...
Manuel Jacob [Thu, 21 Jan 2016 06:31:08 +0000 (06:31 +0000)]
Introduce ConstantFoldCastOperand function and migrate some callers of ConstantFoldInstOperands to use it.  NFC.

Summary:
Although this is a slight cleanup on its own, the main motivation is to
refactor the constant folding API to ease migration to opaque pointers.
This will be follow-up work.

Reviewers: eddyb

Subscribers: zzheng, dblaikie, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258390 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoIntroduce ConstantFoldBinaryOpOperands function and migrate some callers of ConstantF...
Manuel Jacob [Thu, 21 Jan 2016 06:26:35 +0000 (06:26 +0000)]
Introduce ConstantFoldBinaryOpOperands function and migrate some callers of ConstantFoldInstOperands to use it.  NFC.

Summary:
Although this is a slight cleanup on its own, the main motivation is to
refactor the constant folding API to ease migration to opaque pointers.
This will be follow-up work.

Reviewers: eddyb

Subscribers: dblaikie, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258389 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU/SI: Pass whether to use the SI scheduler via Target Attribute
Tom Stellard [Thu, 21 Jan 2016 04:28:34 +0000 (04:28 +0000)]
AMDGPU/SI: Pass whether to use the SI scheduler via Target Attribute

Summary:
Currently the SI scheduler can be selected via command line option,
but it turned out it would be better if it was selectable via a Target Attribute.

This patch adds "si-scheduler" attribute to the backend.

Reviewers: tstellarAMD, echristo

Subscribers: echristo, arsenm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258386 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agore-submit test case (withright format-version)
Xinliang David Li [Thu, 21 Jan 2016 02:35:59 +0000 (02:35 +0000)]
re-submit test case (withright format-version)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258384 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agollvm-go: call llvm-config with components
Andrew Wilkins [Thu, 21 Jan 2016 02:33:39 +0000 (02:33 +0000)]
llvm-go: call llvm-config with components

Summary:
Add components back into calls to llvm-config,
which was accidentally removed in r258283.

Reviewers: pcc

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258383 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRename MCLineEntry to MCDwarfLineEntry
David Majnemer [Thu, 21 Jan 2016 01:59:03 +0000 (01:59 +0000)]
Rename MCLineEntry to MCDwarfLineEntry

MCLineEntry gives the impression that it is generic MC machinery.
However, it is specific to DWARF.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258381 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[libFuzzer] don't use std::vector in one more hot path
Kostya Serebryany [Thu, 21 Jan 2016 01:52:14 +0000 (01:52 +0000)]
[libFuzzer] don't use std::vector in one more hot path

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258380 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[GlobalISel] make library an optional component
Andrew Wilkins [Thu, 21 Jan 2016 01:41:03 +0000 (01:41 +0000)]
[GlobalISel] make library an optional component

Summary:
Mark the LLVMGlobalISel library as optional in
LLVMBuild.txt, since the library is only built
if LLVM_BUILD_GLOBAL_ISEL is set. Without doing
this, llvm-config includes the library in the
list of components regardless of whether it's
built, and then will error out when asked for
the library names/paths.

Reviewers: qcolombet

Subscribers: joker.eph, llvm-commits, vkalintiris

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258379 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[GlobalISel] Move generic opcodes description to their own file.
Quentin Colombet [Thu, 21 Jan 2016 01:37:18 +0000 (01:37 +0000)]
[GlobalISel] Move generic opcodes description to their own file.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258378 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert 258376 -- wrong version
Xinliang David Li [Thu, 21 Jan 2016 01:21:00 +0000 (01:21 +0000)]
Revert 258376 -- wrong version

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258377 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Coverage] Add a test case for comdat
Xinliang David Li [Thu, 21 Jan 2016 00:57:42 +0000 (00:57 +0000)]
[Coverage] Add a test case for comdat

The binary contains two (merged) covmap sections which
have duplicate CovMapRecords from comdat (template instantation).
This test makes sure the reader reads it properly. It also
tests that the coverage data from different instantiations
of the same template function are properly merged in show
output.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258376 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[libfuzzer] use %p for printing addresses
Mike Aizatsky [Thu, 21 Jan 2016 00:02:09 +0000 (00:02 +0000)]
[libfuzzer] use %p for printing addresses

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258370 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRemove redundant argument.
Rafael Espindola [Thu, 21 Jan 2016 00:00:53 +0000 (00:00 +0000)]
Remove redundant argument.

It is already a member variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258369 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[readobj] Print CodeOffset first, it's easier to read
Reid Kleckner [Wed, 20 Jan 2016 23:21:14 +0000 (23:21 +0000)]
[readobj] Print CodeOffset first, it's easier to read

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258368 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[SelectionDAG] Fix constant offset folding to avoid commuting non-commutative operators.
Dan Gohman [Wed, 20 Jan 2016 23:16:59 +0000 (23:16 +0000)]
[SelectionDAG] Fix constant offset folding to avoid commuting non-commutative operators.

This fixes a miscompile in MultiSource/Benchmarks/MiBench/consumer-lame
introduced in r258296.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258366 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMachineScheduler: Add a command line option to disable post scheduler.
Chad Rosier [Wed, 20 Jan 2016 23:08:32 +0000 (23:08 +0000)]
MachineScheduler: Add a command line option to disable post scheduler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258364 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMachineScheduler: Honor optnone functions in the pre-ra scheduler.
Chad Rosier [Wed, 20 Jan 2016 22:38:25 +0000 (22:38 +0000)]
MachineScheduler: Honor optnone functions in the pre-ra scheduler.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258363 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoSimplify the logic. NFC.
Rafael Espindola [Wed, 20 Jan 2016 22:38:23 +0000 (22:38 +0000)]
Simplify the logic. NFC.

Found while reviewing the change for PR26152.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258362 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRun clang-format over ConstantFolding.h, fixing inconsistent indentation. NFC.
Manuel Jacob [Wed, 20 Jan 2016 22:27:06 +0000 (22:27 +0000)]
Run clang-format over ConstantFolding.h, fixing inconsistent indentation.  NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258361 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agodon't repeat function names in comments; NFC
Sanjay Patel [Wed, 20 Jan 2016 22:24:38 +0000 (22:24 +0000)]
don't repeat function names in comments; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258360 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoOrc: Simplify lambda by using std::set's initializer_list ctor
David Blaikie [Wed, 20 Jan 2016 22:24:26 +0000 (22:24 +0000)]
Orc: Simplify lambda by using std::set's initializer_list ctor

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258359 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Orc] Try to turn Orc execution unit tests back on for Linux.
Lang Hames [Wed, 20 Jan 2016 22:16:14 +0000 (22:16 +0000)]
[Orc] Try to turn Orc execution unit tests back on for Linux.

The fix in r258324 (plus r258354) should allow Orc execution tests to run on
Linux.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258358 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix typo in an error string. NFC.
George Burgess IV [Wed, 20 Jan 2016 22:15:23 +0000 (22:15 +0000)]
Fix typo in an error string. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258357 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix PR26152.
Evgeniy Stepanov [Wed, 20 Jan 2016 22:05:50 +0000 (22:05 +0000)]
Fix PR26152.

Fix the condition for when the new global takes over the name of
the existing one to be the negation of the condition for the new
global to get internal linkage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258355 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix build warning.
Evgeniy Stepanov [Wed, 20 Jan 2016 22:02:07 +0000 (22:02 +0000)]
Fix build warning.

 error: field 'CCMgr' will be initialized after field 'IndirectStubsMgr' [-Werror,-Wreorder]
    : DL(TM.createDataLayout()), CCMgr(std::move(CCMgr)),

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258354 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU/SI: Promote i1 SETCC operations
Tom Stellard [Wed, 20 Jan 2016 21:48:24 +0000 (21:48 +0000)]
AMDGPU/SI: Promote i1 SETCC operations

Summary:
While working on uniform branching, I've hit a few cases where we emit
i1 SETCC operations.

Reviewers: arsenm

Subscribers: arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258352 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Fix old comments that mention AMDIL
Matt Arsenault [Wed, 20 Jan 2016 21:22:21 +0000 (21:22 +0000)]
AMDGPU: Fix old comments that mention AMDIL

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258350 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Remove AMDGPU.trunc intrinsic
Matt Arsenault [Wed, 20 Jan 2016 21:05:53 +0000 (21:05 +0000)]
AMDGPU: Remove AMDGPU.trunc intrinsic

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258348 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Remove AMDIL.fraction intrinsic
Matt Arsenault [Wed, 20 Jan 2016 21:05:49 +0000 (21:05 +0000)]
AMDGPU: Remove AMDIL.fraction intrinsic

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258347 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Remove AMDIL.round.nearest intrinsic
Matt Arsenault [Wed, 20 Jan 2016 21:05:40 +0000 (21:05 +0000)]
AMDGPU: Remove AMDIL.round.nearest intrinsic

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258346 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[GlobalISel] Add the proper cmake plumbing.
Quentin Colombet [Wed, 20 Jan 2016 20:58:56 +0000 (20:58 +0000)]
[GlobalISel] Add the proper cmake plumbing.

This patch adds the necessary plumbing to cmake to build the sources related to
GlobalISel.

To build the sources related to GlobalISel, we need to add -DBUILD_GLOBAL_ISEL=ON.
By default, this is OFF, thus GlobalISel sources will not impact people that do
not explicitly opt-in.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258344 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Remove abs intrinsic
Matt Arsenault [Wed, 20 Jan 2016 20:58:29 +0000 (20:58 +0000)]
AMDGPU: Remove abs intrinsic

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258343 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Remove min/max intrinsics
Matt Arsenault [Wed, 20 Jan 2016 20:50:19 +0000 (20:50 +0000)]
AMDGPU: Remove min/max intrinsics

This removes support for mesa 11.0.x

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258342 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd a "gc-transition" operand bundle
Sanjoy Das [Wed, 20 Jan 2016 19:50:25 +0000 (19:50 +0000)]
Add a "gc-transition" operand bundle

Summary:
This adds a new kind of operand bundle to LLVM denoted by the
`"gc-transition"` tag.  Inputs to `"gc-transition"` operand bundle are
lowered into the "transition args" section of `gc.statepoint` by
`RewriteStatepointsForGC`.

This removes the last bit of functionality that was unsupported in the
deopt bundle based code path in `RewriteStatepointsForGC`.

Reviewers: pgavlin, JosephTremoulet, reames

Subscribers: sanjoy, mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258338 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-readobj][ELF] Teach llvm-readobj to show arch specific ELF section's flags
Simon Atanasyan [Wed, 20 Jan 2016 19:15:18 +0000 (19:15 +0000)]
[llvm-readobj][ELF] Teach llvm-readobj to show arch specific ELF section's flags

Some architecture specific ELF section flags might have the same value
(for example SHF_X86_64_LARGE and SHF_HEX_GPREL) and we have to check
machine architectures to select an appropriate set of possible flags.

The patch selects architecture specific flags into separate arrays
`ElfxxxSectionFlags` and combines `ElfSectionFlags` and `ElfxxxSectionFlags`
before pass to the `StreamWriter::printFlags()` method.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258334 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[GlobalISel] Add a generic machine opcode for ADD.
Quentin Colombet [Wed, 20 Jan 2016 19:14:55 +0000 (19:14 +0000)]
[GlobalISel] Add a generic machine opcode for ADD.
The selection process being split into separate passes, we need generic opcodes
to translate the LLVM IR to target independent code.

This patch adds an opcode for addition: G_ADD.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258333 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agofix typo; NFC
Sanjay Patel [Wed, 20 Jan 2016 18:59:48 +0000 (18:59 +0000)]
fix typo; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258332 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agofix formatting; NFC
Sanjay Patel [Wed, 20 Jan 2016 18:59:16 +0000 (18:59 +0000)]
fix formatting; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258330 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAccept subtractions involving a weak symbol.
Rafael Espindola [Wed, 20 Jan 2016 18:57:48 +0000 (18:57 +0000)]
Accept subtractions involving a weak symbol.

When a symbol S shows up in an expression in assembly there are two
possible interpretations
* The expression is referring to the value of S in this file.
* The expression is referring to the value after symbol resolution.

In the first case the assembler can reason about the value and try to
produce a relocation.
In the second case, that is only possible if the symbol cannot be
preempted.

Assemblers are not very consistent about which interpretation gets used.
This changes MC to agree with GAS in the case of an expression of the
form "Sym - WeakSym".

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258329 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LibCallSimplifier] don't get fooled by a fake sqrt()
Sanjay Patel [Wed, 20 Jan 2016 17:41:14 +0000 (17:41 +0000)]
[LibCallSimplifier] don't get fooled by a fake sqrt()

The test case will crash without this patch because the subsequent call to
hasUnsafeAlgebra() assumes that the call instruction is an FPMathOperator
(ie, returns an FP type).

This part of the function signature check was omitted for the sqrt() case,
but seems to be in place for all other transforms.

Before:
http://reviews.llvm.org/rL257400
...we would have needlessly continued execution in optimizeSqrt(), but the
bug was harmless because we'd eventually fail some other check and return
without damage.

This should fix:
https://llvm.org/bugs/show_bug.cgi?id=26211

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258325 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Orc] Fix a use-after-move bug in the Orc C-bindings stack.
Lang Hames [Wed, 20 Jan 2016 17:39:52 +0000 (17:39 +0000)]
[Orc] Fix a use-after-move bug in the Orc C-bindings stack.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258324 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago80-cols; NFC
Sanjay Patel [Wed, 20 Jan 2016 16:41:43 +0000 (16:41 +0000)]
80-cols; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258323 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoWrite AArch64 big endian data fixup entries as BE.
Keith Walker [Wed, 20 Jan 2016 15:59:14 +0000 (15:59 +0000)]
Write AArch64 big endian data fixup entries as BE.

There was support for writing the AArch64 big endian data fixup entries in
the .eh_frame section in BE.    This is changed to write all such fixup
entries in BE with no restriction on the section.  This is similar to
the existing support for fixup entries for ARM.

A test is added to check the length field in the .debug_line section as
this is an example of where such a fixup occurs.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258320 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoCorrectly initialize SIAnnotateControlFlow
Tom Stellard [Wed, 20 Jan 2016 15:48:27 +0000 (15:48 +0000)]
Correctly initialize SIAnnotateControlFlow

Reviewers: arsenm

Subscribers: arsenm, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258319 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Adding VPERMB Intrinsics
Michael Zuckerman [Wed, 20 Jan 2016 15:24:56 +0000 (15:24 +0000)]
[AVX512] Adding VPERMB Intrinsics

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258316 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFixing bug in rL258132: [X86] Adding support for missing variations of X86 string...
Marina Yatsina [Wed, 20 Jan 2016 14:03:47 +0000 (14:03 +0000)]
Fixing bug in rL258132: [X86] Adding support for missing variations of X86 string related instructions

There was a bug in my rL258132 because there's an overloading of the "movsd" and "cmpsd" instructions, e.g. movsd can be either "Move Data from String to String" (the case I wanted to handle) or "Move or Merge Scalar Double-Precision Floating-Point Value" (the case that causes the asserts).
Added  code for escaping the unfamiliar scenarios and falling back to old behviour.
Also changed the asserts to llvm_unreachable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258312 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoProper handling of diamond-like cases in if-conversion
Krzysztof Parzyszek [Wed, 20 Jan 2016 13:14:52 +0000 (13:14 +0000)]
Proper handling of diamond-like cases in if-conversion

If converter was somewhat careless about "diamond" cases, where there
was no join block, or in other words, where the true/false blocks did
not have analyzable branches. In such cases, it was possible for it to
remove (needed) branches, resulting in a loss of entire basic blocks.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258310 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAVX512: Store (MOVNTPD, MOVNTPS, MOVNTDQ) using non-temporal hint intrinsic implement...
Igor Breger [Wed, 20 Jan 2016 13:11:47 +0000 (13:11 +0000)]
AVX512: Store (MOVNTPD, MOVNTPS, MOVNTDQ) using non-temporal hint intrinsic implementation.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258309 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AArch64] Fix two bugs in the .inst directive
Oliver Stannard [Wed, 20 Jan 2016 12:54:31 +0000 (12:54 +0000)]
[AArch64] Fix two bugs in the .inst directive

The AArch64 .inst directive was implemented using EmitIntValue, which resulted
in both $x and $d (code and data) mapping symbols being emitted at the same
address. This fixes it to only emit the $x mapping symbol.

EmitIntValue also emits the value in big-endian order when targeting big-endian
systems, but instructions are always emitted in little-endian order for
AArch64.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258308 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVR] Defnined calling conventions. NFC.
Dylan McKay [Wed, 20 Jan 2016 09:30:01 +0000 (09:30 +0000)]
[AVR] Defnined calling conventions. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258300 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LTO] Fix error reporting when a file passed to libLTO is invalid or non-existent
Petr Pavlu [Wed, 20 Jan 2016 09:03:42 +0000 (09:03 +0000)]
[LTO] Fix error reporting when a file passed to libLTO is invalid or non-existent

This addresses PR26060 where function lto_module_create() could return nullptr
but lto_get_error_message() returned an empty string.

The error() call after LTOModule::createFromFile() in llvm-lto is then removed
because any error from this function should go through the diagnostic handler in
llvm-lto which will exit the program. The error() call was added because this
previously did not happen when the file was non-existent. This is fixed by the
patch. (The situation that llvm-lto reports an error when the input file does
not exist is tested by llvm/tools/llvm-lto/error.ll).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258298 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Verifier] Fix performance regression for LTO builds
Ivan Krasin [Wed, 20 Jan 2016 08:41:22 +0000 (08:41 +0000)]
[Verifier] Fix performance regression for LTO builds

Summary:
Fix a significant performance regression by introducing GlobalValueVisited field and reusing the map.
This is a follow up to r257823 that slowed down linking Chrome with LTO by 2.5x.

If you revert this commit, please, also revert r257823.

BUG=https://llvm.org/bugs/show_bug.cgi?id=26214

Reviewers: pcc, loladiro, joker.eph

Subscribers: krasin1, joker.eph, loladiro, pcc

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258297 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[SelectionDAG] Fold more offsets into GlobalAddresses
Dan Gohman [Wed, 20 Jan 2016 07:03:08 +0000 (07:03 +0000)]
[SelectionDAG] Fold more offsets into GlobalAddresses

SelectionDAG previously missed opportunities to fold constants into
GlobalAddresses in several areas. For example, given `(add (add GA, c1), y)`, it
would often reassociate to `(add (add GA, y), c1)`, missing the opportunity to
create `(add GA+c, y)`. This isn't often visible on targets such as X86 which
effectively reassociate adds in their complex address-mode folding logic,
however it is currently visible on WebAssembly since it currently has very
simple address mode folding code that doesn't reassociate anything.

This patch fixes this by making SelectionDAG fold offsets into GlobalAddresses
at the same times that it folds constants together, so that it doesn't miss any
opportunities to perform such folding.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258296 91177308-0d34-0410-b5e6-96231b3b80d8