157747 Commits

Author SHA1 Message Date
Craig Topper
aa18cf610f [ValueTracking] Pass only a single lambda to computeKnownBitsFromShiftOperator by using KnownBits struct instead of separate APInts. NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319624 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-02 23:42:17 +00:00
Yaxun Liu
dcc00b1fac CodeGen: Fix pointer info in SplitVecOp_EXTRACT_VECTOR_ELT/SplitVecRes_INSERT_VECTOR_ELT
Two issues found when doing codegen for splitting vector with non-zero alloca addr space:

DAGTypeLegalizer::SplitVecRes_INSERT_VECTOR_ELT/SplitVecOp_EXTRACT_VECTOR_ELT uses dummy pointer info for creating
SDStore. Since one pointer operand contains multiply and add, InferPointerInfo is unable to
infer the correct pointer info, which ends up with a dummy pointer info for the target to lower
store and results in isel failure. The fix is to introduce MachinePointerInfo::getUnknownStack to
represent MachinePointerInfo which is known in alloca address space but without other information.

TargetLowering::getVectorElementPointer uses value type of pointer in addr space 0 for
multiplication of index and then add it to the pointer. However the pointer may be in an addr
space which has different size than addr space 0. The fix is to use the pointer value type for
index multiplication.

Differential Revision: https://reviews.llvm.org/D39758


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319622 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-02 22:13:22 +00:00
Don Hinton
f4f388171b [cmake] Re-commit: Remove redundant call to cmake when building host tools.
Also pass CMAKE_(C|CXX)_COMPILER to add_custom_command.

Summary:
Remove the redundant, config-time call to cmake when
building host tools for cross compiles or optimized tablegen..

The config-time call to cmake is redundant because it will always get
called again when the CONFIGURE_LLVM_${target_name} target fires at
build-time.  This speeds up initial configuration, but has no affect
on build behavior.

Differential Revision: https://reviews.llvm.org/D40229

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319620 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-02 19:12:38 +00:00
Simon Atanasyan
649eb90a70 [llvm-readobj] Remove redundant local variables to reduce the code. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319617 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-02 13:06:40 +00:00
Simon Atanasyan
0eba9bcf82 [llvm-readobj] Print static MIPS GOT
If a linked binary file contains a dynamic section, the GOT layout
defined by the dynamic section entries. In a statically linked file
the GOT is just a series of entries. This change teaches `llvm-readobj`
to print the GOT in that case. That provides a feature parity with GNU
`readelf`.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319616 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-02 13:06:35 +00:00
Simon Atanasyan
2a502f2ce1 [llvm-readobj] Delete unused method argument. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319615 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-02 13:06:27 +00:00
Simon Pilgrim
72e0a2708d [X86][SSE] Cleanup float/int conversion scheduler itinerary classes
Makes it easier to grok where each is supposed to be used, mainly useful for adding to the AVX512 instructions but hopefully can be used more in SSE/AVX as well.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319614 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-02 12:27:44 +00:00
Craig Topper
212549ca81 [X86] Fix copy paste mistake in test case for r319612.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319613 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-02 08:39:02 +00:00
Craig Topper
6d12eb2d5b [X86] Teach the assembler to support %db8-%db15 as aliases for %dr8-%dr15.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319612 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-02 08:27:46 +00:00
Craig Topper
9f0c43a804 [X86] Support %dr8-%dr15 in the assembler.
Apparently I failed to make this work when I fixed it in the disassembler way back in r224862.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319611 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-02 08:27:45 +00:00
Martell Malone
abd7f8c4bd CMAKE: help CheckAtomic find check_library_exists
lldb fails to build standalone on x86

-- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB - Failed
CMake Error at CheckAtomic.cmake:66 (check_library_exists):
  Unknown CMake command "check_library_exists".
Call Stack (most recent call first):
  LLDBStandalone.cmake:90 (include)
CMakeLists.txt:3 (include)

Reviewed By: rnk

Differential Revision: https://reviews.llvm.org/D40220

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319610 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-02 07:17:01 +00:00
Tatyana Krasnukha
4ab42623aa [ARC] Add instruction subset for the ARC backend.
Reviewers: petecoup, kparzysz

Reviewed By: petecoup

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D37983

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319609 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-02 05:25:17 +00:00
Nirav Dave
deae672db6 [DAG][AArch64] Disable post-legalization store
Disable post-legalization store for AArch64 backend which is causing
errors out-of-tree.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319607 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-02 04:01:26 +00:00
Heejin Ahn
527f9bdad5 [WebAssembly] Revert r319488 "Add visibility flag to Wasm symbol flags"
This patch reportedly broke one of LLVM bots (ubuntu-gcc7.1-werror).

See http://lab.llvm.org:8011/builders/ubuntu-gcc7.1-werror/builds/3369 for
details.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319602 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-02 02:05:06 +00:00
Matt Morehouse
79f1f0032c Revert "[X86] Improvement in CodeGen instruction selection for LEAs."
This reverts r319543, due to ASan bot breakage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319591 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 22:20:26 +00:00
Kostya Serebryany
1fe1bd128c [libFuzzer] add a flag -malloc_limit_mb
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319590 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 22:12:04 +00:00
Jessica Paquette
55c1b415d4 [MachineOutliner] NFC: Throw out self-intersections on candidates early
Currently, the outliner considers candidates that intersect with themselves in
the candidate pruning step. That is, candidates of the form "AA" in ranges like
"AAAAAA". In that range, it looks like there are 5 instances of "AA" that could
possibly be outlined, and that's considered in the benefit calculation.

However, only at most 3 instances of "AA" could ever be outlined in "AAAAAA".
Thus, it's possible to pass through "AA" to the candidate selection step even
though it's *never* the case that "AA" could be outlined. This makes it so that
when we find candidates, we consider only non-overlapping occurrences of that
candidate.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319588 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 21:56:56 +00:00
Nirav Dave
ea21b4dca9 [DAG][ARM] Revert "Reenable post-legalize store merge"
due to failures in AArch and ARM code gen.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319587 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 21:55:47 +00:00
Jake Ehrlich
977b537d0f [MC] Handle unknown literal register numbers in .cfi_* directives
r230670 introduced a step to map EH register numbers to standard
DWARF register numbers. This failed to consider the case when a
user .cfi_* directive uses an integer literal rather than a
register name, to specify a DWARF register number that has no
corresponding LLVM register number (e.g. a special register that
the compiler and assembler have no name for).

Fixes PR34028.

Patch by Roland McGrath

Differential Revision: https://reviews.llvm.org/D36493

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319586 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 21:44:27 +00:00
Philip Reames
0fed3ad4cb [IndVars] Fix a bug introduced in r317012
Turns out we can have comparisons which are indirect users of the induction variable that we can make invariant.  In this case, there is no loop invariant value contributing and we'd fail an assert.

The test case was found by a java fuzzer and reduced.  It's a real cornercase.  You have to have a static loop which we've already proven only executes once, but haven't broken the backedge on, and an inner phi whose result can be constant folded by SCEV using exit count reasoning but not proven by isKnownPredicate.  To my knowledge, only the fuzzer has hit this case.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319583 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 20:57:19 +00:00
Don Hinton
8ad3e8644f [cmake] Revert (rL319574): Resubmit Remove redundant call to cmake when building host tools.
Still fails for some bots.

Differential Revision: https://reviews.llvm.org/D40229

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319582 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 20:46:45 +00:00
Adam Nemet
c4f204db88 [opt-remarks] If hotness threshold is set, ignore remarks without hotness
These are blocks that haven't not been executed during training.  For large
projects this could make a significant difference.  For the project, I was
looking at, I got an order of magnitude decrease in the size of the total YAML
files with this and r319235.

Differential Revision: https://reviews.llvm.org/D40678

Re-commit after fixing the failing testcase in rL319576, rL319577 and
rL319578.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319581 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 20:41:38 +00:00
Don Hinton
4b50cdffe5 [cmake] Resubmit Remove redundant call to cmake when building host tools.
Only pass Native to LLVM_TARGETS_TO_BUILD.

Summary:
Remove the redundant, config-time call to cmake when
building host tools for cross compiles or optimized tablegen..

The config-time call to cmake is redundant because it will always get
called again when the CONFIGURE_LLVM_${target_name} target fires at
build-time.  This speeds up initial configuration, but has no affect
on build behavior.

Differential Revision: https://reviews.llvm.org/D40229

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319574 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 19:35:56 +00:00
Eli Friedman
52eba828c1 [DAGCombine] Simplify ISD::AND handling in ReduceLoadWidth
Followup to D39595. Removes a bunch of redundant checks.

Differential Revision: https://reviews.llvm.org/D40667



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319573 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 19:33:56 +00:00
Simon Pilgrim
bfae8814e3 [X86][AVX512] Tag subvector extract/insert instructions scheduler classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319568 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 18:40:32 +00:00
Benjamin Kramer
79df7dff38 [IR] Avoid dangling else warning. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319567 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 18:39:58 +00:00
Fedor Sergeev
5608259c99 IR printing improvement for loop passes - handle -print-module-scope
Summary:
Adding support for -print-module-scope similar to how it is
being done for function passes. This option causes loop-pass printer
to emit a whole-module IR instead of just a loop itself.

Reviewers: sanjoy, silvas, weimingz

Reviewed By: sanjoy

Subscribers: apilipenko, skatkov, llvm-commits

Differential Revision: https://reviews.llvm.org/D40247

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319566 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 18:33:58 +00:00
Paul Robinson
89e6e15552 [DebugInfo] Bail out if making no progress dumping line tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319564 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 18:25:30 +00:00
Adam Nemet
53cc245050 Revert "[opt-remarks] If hotness threshold is set, ignore remarks without hotness"
This reverts commit r319556.

Something is not working with this when used with sample-based profiling.
Investigating...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319562 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 18:12:29 +00:00
Fedor Sergeev
7d160f7143 IR printing improvement for function passes - introducing -print-module-scope
Summary:
When debugging function passes it happens to be rather useful to dump
the whole module before the transformation and then use this dump
to analyze this single transformation by running it separately
on that particular module state.

Introducing
    -print-module-scope
debugging option that forces all the function-level IR dumps
to become whole-module dumps.

This option builds on top of normal dumping controls like
   -print-before/after
   -filter-print-funcs

The plan is to eventually extend this option to cover other local passes
(at least loop passes) but that should go as a separate change.

Reviewers: sanjoy, weimingz, silvas, fedor.sergeev

Reviewed By: weimingz

Subscribers: apilipenko, skatkov, llvm-commits, mehdi_amini

Differential Revision: https://reviews.llvm.org/D40245

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319561 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 17:42:46 +00:00
Simon Pilgrim
31eff6b5ee Fix line endings. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319559 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 17:24:15 +00:00
Simon Pilgrim
53305ce424 [X86][AVX512] Tag VPERM2I/VPERM2T instructions scheduler class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319558 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 17:23:06 +00:00
Adam Nemet
7cb910a453 [opt-remarks] If hotness threshold is set, ignore remarks without hotness
These are blocks that haven't not been executed during training.  For large
projects this could make a significant difference.  For the project, I was
looking at, I got an order of magnitude decrease in the size of the total YAML
files with this and r319235.

Differential Revision: https://reviews.llvm.org/D40678

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319556 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 17:02:04 +00:00
Simon Pilgrim
54b4cc42db [X86][AVX512] Tag VFPCLASS instructions scheduler class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319554 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 16:51:48 +00:00
Simon Pilgrim
7feb598d4f [X86][AVX512] Tag VPSHUFBITQMB instructions scheduler class
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319553 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 16:35:57 +00:00
Simon Pilgrim
0577bf3294 [X86][AVX512] Tag VPCOMRESS/VPEXPAND instructions scheduler classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319551 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 16:20:03 +00:00
Hans Wennborg
faed772a25 Revert r319531 "[SLPVectorizer] Failure to beneficially vectorize 'copyable' elements in integer binary ops."
It causes builds to fail with "Instruction does not dominate all uses" (PR35497).

> Patch tries to improve vectorization of the following code:
>
> void add1(int * __restrict dst, const int * __restrict src) {
>   *dst++ = *src++;
>   *dst++ = *src++ + 1;
>   *dst++ = *src++ + 2;
>   *dst++ = *src++ + 3;
> }
> Allows to vectorize even if the very first operation is not a binary add, but just a load.
>
> Fixed issues related to previous commit.
>
> Reviewers: spatel, mzolotukhin, mkuper, hfinkel, RKSimon, filcab, ABataev
>
> Reviewed By: ABataev, RKSimon
>
> Subscribers: llvm-commits, RKSimon
>
> Differential Revision: https://reviews.llvm.org/D28907

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319550 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 16:17:24 +00:00
Sam Parker
4d8809ff53 [ARM] and + load combine tests
Add a few more tests cases.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319548 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 15:31:41 +00:00
Nirav Dave
5e0d780951 [ARM][DAG] Reenable post-legalize store merge
Summary: Reenable post-legalize stores with constant merging computation and cofrresponding test case.

Reviewers: eastig, efriedma

Subscribers: aemerson, javed.absar, kristof.beyls, hiraditya, llvm-commits

Differential Revision: https://reviews.llvm.org/D40701

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319547 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 14:49:26 +00:00
Sam Parker
41631b9a76 Add more triples to llc_test_checks.py
Added some commonly used Arm triples to the script, with and without
the -eabi suffix.

Differential Revision: https://reviews.llvm.org/D40708


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319545 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 14:27:11 +00:00
Jatin Bhateja
f5040aa4c6 [X86] Improvement in CodeGen instruction selection for LEAs.
Summary:
1/  Operand folding during complex pattern matching for LEAs has been extended, such that it promotes Scale to
     accommodate similar operand appearing in the DAG  e.g.
                 T1 = A + B
                 T2 = T1 + 10
                 T3 = T2 + A
    For above DAG rooted at T3, X86AddressMode will now look like
                Base = B , Index = A , Scale = 2 , Disp = 10

2/  During OptimizeLEAPass down the pipeline factorization is now performed over LEAs so that if there is an opportunity
     then complex LEAs (having 3 operands) could be factored out  e.g.
                 leal 1(%rax,%rcx,1), %rdx
                 leal 1(%rax,%rcx,2), %rcx
     will be factored as following
                 leal 1(%rax,%rcx,1), %rdx
                 leal (%rdx,%rcx)   , %edx

3/ Aggressive operand folding for AM based selection for LEAs is sensitive to loops, thus avoiding creation of any complex LEAs within a loop.

4/ Simplify LEA converts (lea (BASE,1,INDEX,0)  --> add (BASE, INDEX) which offers better through put.

PR32755 will be taken care of by this pathc.

Previous patch revisions : r313343 , r314886

Reviewers: lsaba, RKSimon, craig.topper, qcolombet, jmolloy, jbhateja

Reviewed By: lsaba, RKSimon, jbhateja

Subscribers: jmolloy, spatel, igorb, llvm-commits

Differential Revision: https://reviews.llvm.org/D35014

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319543 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 14:07:38 +00:00
Sam Parker
05349f09db [ARM] and + load combine tests
Adding autogenerated tests for narrow load combines.

Differential Revision: https://reviews.llvm.org/D40709


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319542 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 13:42:39 +00:00
Simon Pilgrim
3c97b65dca [X86][AVX512] Tag vshift/vpermv/pshufd/pshufb instructions scheduler classes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319540 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 13:25:54 +00:00
Mikael Holmen
4ece91062b Revert r319537: Bail out of a SimplifyCFG switch table opt at undef values.
Broke build bots so reverting.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319539 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 13:11:39 +00:00
Florian Hahn
03c5509e66 [InstSimplify] More fcmp cases when comparing against negative constants.
Summary:
For known positive non-zero value X:
    fcmp uge X, -C => true
    fcmp ugt X, -C => true
    fcmp une X, -C => true
    fcmp oeq X, -C => false
    fcmp ole X, -C => false
    fcmp olt X, -C => false


Patch by Paul Walker.

Reviewers: majnemer, t.p.northover, spatel, RKSimon

Reviewed By: spatel

Subscribers: fhahn, llvm-commits

Differential Revision: https://reviews.llvm.org/D40012

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319538 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 12:34:16 +00:00
Mikael Holmen
8c4503a350 Bail out of a SimplifyCFG switch table opt at undef values.
Summary:
A true or false result is expected from a comparison, but it seems the possibility of undef was overlooked, which could lead to a failed assert. This is fixed by this patch by bailing out if we encounter undef.

The bug is old and the assert has been there since the end of 2014, so it seems this is unusual enough to forego optimization.

Patch by: JesperAntonsson

Reviewers: spatel, eeckstein, hans

Reviewed By: hans

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D40639

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319537 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 12:30:49 +00:00
Nemanja Ivanovic
a2040d55d7 Follow-up to r319434 to turn the pass on by default
Now that the patch has gone through the buildbot cycle,
turn it on by default.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319535 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 12:02:59 +00:00
Alexander Timofeev
b0efc4fd66 [AMDGPU] SiFixSGPRCopies should not modify non-divergent PHI
Differential revision: https://reviews.llvm.org/D40556

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319534 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 11:56:34 +00:00
Pavel Labath
2f1bcfe57e [cmake] Enable zlib support on windows
Summary:
zlib support was hard-wired to off for (non-cygwin) windows targets.
This disables some features, such as reading debug info from compressed
dwarf sections.

This has been this way since zlib support was added in 2013 (r180083),
but there is no obvious reason for that. Zlib is perfectly capable of
being compiled for windows (it even has a cmake file that works out of
the box).

This enables one to turn on zlib support on windows, if one has zlib
avaliable.

Reviewers: rnk, beanz

Subscribers: mgorny, aprantl, llvm-commits

Differential Revision: https://reviews.llvm.org/D40655

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319533 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 11:41:07 +00:00
Dinar Temirbulatov
8caaeced90 [SLPVectorizer] Failure to beneficially vectorize 'copyable' elements in integer binary ops.
Patch tries to improve vectorization of the following code:
    
            void add1(int * __restrict dst, const int * __restrict src) {
              *dst++ = *src++;
              *dst++ = *src++ + 1;
              *dst++ = *src++ + 2;
              *dst++ = *src++ + 3;
            }
            Allows to vectorize even if the very first operation is not a binary add, but just a load.
    
            Fixed issues related to previous commit.
    
            Reviewers: spatel, mzolotukhin, mkuper, hfinkel, RKSimon, filcab, ABataev
    
            Reviewed By: ABataev, RKSimon
    
            Subscribers: llvm-commits, RKSimon
    
            Differential Revision: https://reviews.llvm.org/D28907


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319531 91177308-0d34-0410-b5e6-96231b3b80d8
2017-12-01 11:10:47 +00:00