149764 Commits

Author SHA1 Message Date
Bob Haarman
ecda7b1922 [llvm-pdbdump] [yaml2pdb] always include object file name in module info
Summary:
Previously, the yaml2pdb subcommand of llvm-pdbdump only
included object file names in module info if a module info stream was
present. This change makes it so that we include the object file name
even if there is no module info stream for the module. As a result,
running
llvm-pdbdump pdb2yaml -dbi-module-info original.pdb > original.yaml &&
llvm-pdbdump yaml2pdb -pdb=new.pdb original.yaml && llvm-pdbdump
pdb2yaml -dbi-module-info new.pdb > new.yaml now produces identical
original.yaml and new.yaml files.

Reviewers: amccarth, zturner

Reviewed By: zturner

Subscribers: fhahn, llvm-commits

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303891 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-25 18:04:17 +00:00
Daniel Berlin
4133415c70 NewGVN: Fix PR 33119, PR 33129, due to regressed undef handling
Fix PR33120 and others by eliminating self-cycles a different way.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303875 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-25 15:44:20 +00:00
Artur Pilipenko
81a4c4fa69 [InstCombine] Teach isAllocSiteRemovable to look through addrspacecasts
Reviewed By: reames

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303870 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-25 15:14:48 +00:00
Sanjay Patel
6680feb0be [InstCombine] make icmp-mul fold more efficient
There's probably a lot more like this (see also comments in D33338 about responsibility), 
but I suspect we don't usually get a visible manifestation.

Given the recent interest in improving InstCombine efficiency, another potential micro-opt
that could be repeated several times in this function: morph the existing icmp pred/operands
instead of creating a new instruction.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303860 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-25 14:13:57 +00:00
Tim Corringham
b88c01b1f7 [AMDGPU] add intrinsic for s_getpc
Summary: The s_getpc instruction is exposed as intrinsic llvm.amdgcn.s.getpc.

Reviewers: arsenm

Reviewed By: arsenm

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303859 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-25 14:04:14 +00:00
Oren Ben Simhon
f3cb5d6f7f [X86] Adding vpopcntd and vpopcntq instructions
AVX512_VPOPCNTDQ is a new feature set that was published by Intel.
The patch represents the LLVM side of the addition of two new intrinsic based instructions (vpopcntd and vpopcntq).

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303858 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-25 13:45:23 +00:00
James Molloy
ac73777f2e [GVNSink] Pacify MSVC
Don't convert an unsigned to a pointer for a sentinel, use a size_t instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303855 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-25 13:14:10 +00:00
James Molloy
bb5d60d753 [GVNSink] Don't define operator<< in NDEBUG
Without debug macros enabled, the raw_ostream operator<< overload
is unused.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303852 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-25 13:11:18 +00:00
James Molloy
9693a6db68 [GVNSink] GVNSink pass
This patch provides an initial prototype for a pass that sinks instructions based on GVN information, similar to GVNHoist. It is not yet ready for commiting but I've uploaded it to gather some initial thoughts.

This pass attempts to sink instructions into successors, reducing static
instruction count and enabling if-conversion.
We use a variant of global value numbering to decide what can be sunk.
Consider:

[ %a1 = add i32 %b, 1  ]   [ %c1 = add i32 %d, 1  ]
[ %a2 = xor i32 %a1, 1 ]   [ %c2 = xor i32 %c1, 1 ]
                 \           /
           [ %e = phi i32 %a2, %c2 ]
           [ add i32 %e, 4         ]

GVN would number %a1 and %c1 differently because they compute different
results - the VN of an instruction is a function of its opcode and the
transitive closure of its operands. This is the key property for hoisting
and CSE.

What we want when sinking however is for a numbering that is a function of
the *uses* of an instruction, which allows us to answer the question "if I
replace %a1 with %c1, will it contribute in an equivalent way to all
successive instructions?". The (new) PostValueTable class in GVN provides this
mapping.

This pass has some shown really impressive improvements especially for codesize already on internal benchmarks, so I have high hopes it can replace all the sinking logic in SimplifyCFG.

Differential revision: https://reviews.llvm.org/D24805

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303850 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-25 12:51:11 +00:00
Chandler Carruth
4fde77f8f1 [PM] Teach the PGO instrumentation pasess to run GlobalDCE before
instrumenting code.

This is important in the new pass manager. The old pass manager's
inliner has a small DCE routine embedded within it. The new pass manager
relies on the actual GlobalDCE pass for this.

Without this patch, instrumentation profiling with the new PM results in
massive code bloat in the object files because the instrumentation
itself ends up preventing DCE from working to remove the code.

We should probably change the instrumentation (and/or DCE) so that we
can eliminate dead code even if instrumented, but we shouldn't even
spend the time generating instrumentation for that code so this still
seems like a good patch.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303845 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-25 07:15:09 +00:00
Chandler Carruth
2dcd120478 [PM/Unswitch] Fix a bug in the domtree update logic for the new unswitch
pass.

The original logic only considered direct successors of the hoisted
domtree nodes, but that isn't really enough. If there are other basic
blocks that are completely within the subtree, their successors could
just as easily be impacted by the hoisting.

The more I think about it, the more I think the correct update here is
to hoist every block on the dominance frontier which has an idom in the
chain we hoist across. However, this is subtle enough that I'd
definitely appreciate some more eyes on it.

Sadly, if this is the correct algorithm, it requires computing a (highly
localized) dominance frontier. I've done this in the simplest (IE, least
code) way I could come up with, but that may be too naive. Suggestions
welcome here, dominance update algorithms are not an area I've studied
much, so I don't have strong opinions.

In good news, with this patch, turning on simple unswitch passes the
LLVM test suite for me with asserts enabled.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303843 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-25 06:33:36 +00:00
Craig Topper
ba01932aa0 [MVT] Fix the identation of the start of the MVT class. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303841 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-25 06:15:05 +00:00
Craig Topper
5198106235 [SelectionDAG] Fix off by one in a compare in getOperationAction.
If Op is equal to array_lengthof, the lookup would be out of bounds, but we were only checking for greater than. I suspect nothing ever passes in the equal value because its a sentinel to mark the end of the builtin opcodes and not a real opcode.

So really this fix is just so that the code looks right and makes sense.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303840 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-25 05:38:40 +00:00
Chandler Carruth
9f6280a85b [LegacyPM] Make the 'addLoop' method accept a loop to add rather than
having it internally allocate the loop.

This is a much more flexible API and necessary in the new loop unswitch
to reasonably support both new and old PMs in common code. It also just
seems like a cleaner separation of concerns.

NFC, this should just be a pure refactoring.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303834 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-25 03:01:31 +00:00
Galina Kistanova
ebc10e3a25 Fixed nondeterminism in RuleMatcher::emit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303829 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-25 01:51:53 +00:00
Vitaly Buka
c62411d859 [libFuzzer] Don't replace custom signal handlers.
Summary:
This allows to keep handlers installed by sanitizers.
In other cases third-party code can replace handlers after libFuzzer
initialization anyway.

Reviewers: kcc

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303828 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-25 01:43:13 +00:00
George Karpenkov
f6cb509385 Fix coverage check for full post-dominator basic blocks.
Coverage instrumentation which does not instrument full post-dominators
and full-dominators may skip valid paths, as the reasoning for skipping
blocks may become circular.
This patch fixes that, by only skipping
full post-dominators with multiple predecessors, as such predecessors by
definition can not be full-dominators.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303827 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-25 01:41:46 +00:00
Gor Nishanov
fa4cbdddf8 [coroutines] CoroFrame.cpp conform to coding convention (s/repeat/Repeat) (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303826 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-25 01:07:10 +00:00
Gor Nishanov
5d2828c385 [coroutines] Relocate instructions that maybe spilled after coro.begin
Summary:
Frontend generates store instructions after allocas, for example:

```
define i8* @f(i64 %this) "coroutine.presplit"="1" personality i32 0 {
entry:
  %this.addr = alloca i64
  store i64 %this, i64* %this.addr
  ..
  %hdl = call i8* @llvm.coro.begin(token %id, i8* %alloc)

```
Such instructions may require spilling into coro.frame, but, coro-frame address is only available after coro.begin and thus needs to be moved after coro.begin.
The only instructions that should not be moved are the arguments of coro.begin and all of their operands.

Reviewers: GorNishanov, majnemer

Reviewed By: GorNishanov

Subscribers: llvm-commits, EricWF

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303825 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-25 00:46:20 +00:00
Tony Jiang
133fa95ca7 [PowerPC] Fix a performance bug for PPC::XXSLDWI.
There are some VectorShuffle Nodes in SDAG which can be selected to XXSLDWI
instruction, this patch recognizes them and does the selection to improve the
PPC performance.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303822 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 23:48:29 +00:00
Rafael Espindola
89995adbed Print symbols from COFF import libraries.
This change allows llvm-nm to print symbols found in import libraries,
in part by allowing COFFImportFiles to be casted to SymbolicFiles.

Patch by Dave Lee!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303821 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 23:40:36 +00:00
Eugene Zelenko
6463296227 [CodeGen] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303820 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 23:10:29 +00:00
Gor Nishanov
1c3064b7b3 [coroutines] Allow rematerialization upto 4 times. Remove incorrect assert
Reviewers: majnemer

Subscribers: EricWF, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303819 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 23:01:02 +00:00
Sanjay Patel
d47a423c5e [InstCombine] use m_APInt to allow icmp-mul-mul vector fold
The swapped operands in the first test is a manifestation of an 
inefficiency for vectors that doesn't exist for scalars because 
the IRBuilder checks for an all-ones mask for scalars, but not 
vectors.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303818 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 22:58:17 +00:00
Sanjay Patel
7941a52006 [InstCombine] add tests for icmp eq (mul X, C), (mul Y, C); NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303816 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 22:36:14 +00:00
Sanjay Patel
f717c76e13 [InstCombine] move tests and use FileCheck; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303808 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 21:48:25 +00:00
Nirav Dave
3e49889dd5 [DAG] Prevent crashes when merging constant stores with high-bit set. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303802 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 19:56:39 +00:00
Nirav Dave
ccbb5fab9c [AArch64] Prevent nested ADDs from address calc in splitStoreSplat. NFC
In preparation for late-stage store merging.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303800 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 19:55:49 +00:00
Vitaly Buka
fee7735cee Revert "Revert "Attempt to pacify ASan and UBSan reports in CrashRecovery tests""
This dependents on r303729 which was reverted.

This reverts commit r303783.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303796 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 19:11:12 +00:00
Craig Topper
35596590b5 [InstCombine] Merge together the SimplifyDemandedUseBits implementations for ZExt and Trunc. NFC
While there avoid resizing the DemandedMask twice. Make a copy into a separate variable instead. This potentially removes an allocation on large bit widths.

With the use of the zextOrTrunc methods on APInt and KnownBits these can be made almost source identical. The only difference is the zero of the upper bits for ZExt. This is similar to how its done in computeKnownBits in ValueTracking.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303791 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 18:40:25 +00:00
Vitaly Buka
f0fdd6463d Prevent UBSan report in CrashRecovery tests
Reverted by mistake with r303783.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303785 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 18:11:57 +00:00
Vitaly Buka
bd571bcd53 Revert "Attempt to pacify ASan and UBSan reports in CrashRecovery tests"
It's not needed after r303729.

This reverts commit r303311.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303783 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 17:58:09 +00:00
Teresa Johnson
4c833e2dc2 Fix a couple of typos in memory intrinsic optimization output (NFC)
s/instrinsic/intrinsic

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303782 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 17:55:25 +00:00
Zaara Syeda
8abe596788 P9: D-form vector load/store. Differential Revision: https://reviews.llvm.org/D33248
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303780 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 17:50:37 +00:00
Craig Topper
a9efa93362 [InstCombine] Use less bitwise operations to handle Instruction::SExt in SimplifyDemandedUseBits. Other improvements.
The current code created a NewBits mask and used it as a mask several times. One of them just before a call to trunc making it unnecessary. A call to getActiveBits can get us the same information for the case. We also ORed with this mask later when we should have just sign extended the known bits.

We also called trunc on the guaranteed to be zero KnownZeros/Ones masks entering this code. Creating appropriately sized temporary APInts is probably better.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303779 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 17:33:30 +00:00
Krzysztof Parzyszek
a1adbd39e9 Move machine-cse-physreg.mir to test/CodeGen/Thumb
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303778 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 17:20:47 +00:00
Craig Topper
f9152c247d [InstSimplify] Simplify uadd/sadd/umul/smul with overflow intrinsics when the Zero or Undef is on the LHS.
Summary: This code was migrated from InstCombine a few years ago. InstCombine had nearby code that would move Constants to the RHS for these, but InstSimplify doesn't have such code on this path.

Reviewers: spatel, majnemer, davide

Reviewed By: spatel

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303774 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 17:05:28 +00:00
Craig Topper
e3a1116322 [ValueTracking] Convert most of the calls to computeKnownBits to use the version that returns the KnownBits object.
This continues the changes started when computeSignBit was replaced with this new version of computeKnowBits.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303773 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 16:53:07 +00:00
Craig Topper
76ae125262 [ValueTracking] Add OptimizationRemarkEmitter to the other signature for commuteKnownBits.
This is needed for an upcoming patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303772 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 16:53:03 +00:00
Matthew Simpson
59a0e24a58 Revert r291254: [AArch64] Reduce vector insert/extract cost for Falkor
The default vector insert/extract cost is more profitable on Falkor than the
reduced cost.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303771 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 16:48:39 +00:00
Rafael Espindola
01c176bc59 Add some tips on benchmarking.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303769 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 16:39:12 +00:00
Nirav Dave
772effdbda [AMDGPU] Prevent too large store merges in AMDGPU Subtargets. NFCI.
Various address spaces on the SI and R600 subtargets have stricter
limits on memory access size that other address spaces. Use
canMergeStoresTo predicate to prevent the DAGCombiner from creating
these stores as they will be split up during legalization.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303767 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 15:59:09 +00:00
Matthew Simpson
9e8c6339d7 [LV] Update type in cost model for scalarization
For non-uniform instructions marked for scalarization, we should update
`VectorTy` when computing instruction costs to reflect the scalar type. In
addition to determining instruction costs, this type is also used to signal
that all instructions in the loop will be scalarized. This currently affects
memory instructions and non-pointer induction variables and their updates. (We
also mark GEPs scalar after vectorization, but their cost is computed together
with memory instructions.) For scalarized induction updates, this patch also
scales the scalar cost by the vectorization factor, corresponding to each
induction step.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303763 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 15:26:15 +00:00
Vadzim Dambrouski
6f94f45297 [MSP430] Fix PR33050: Don't use ADD16ri to lower FrameIndex.
Use ADDframe pseudo instruction instead.
This will fix machine verifier error, and will help to fix PR32146.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303758 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 15:08:30 +00:00
Sanjay Patel
577a993423 [InstCombine] add tests to show potential missing folds; NFC
As noted in https://bugs.llvm.org/show_bug.cgi?id=33138 and
the comments, there are multiple ways to view this. If we
choose not to solve this in InstCombine, these tests will
serve as documentation of that choice.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303755 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 14:56:51 +00:00
Marek Olsak
0a21c3c299 Revert "AMDGPU: Fold CI-specific complex SMRD patterns into existing complex patterns"
This reverts commit e065977c4b5f68ab845400b256f6a3822b1325fa.

It doesn't work. S_LOAD_DWORD_IMM_ci and friends aren't selected by any of
the patterns, so it was putting 32-bit literals into the 8-bit field.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303754 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 14:53:50 +00:00
Sanjay Patel
852ab094ff [InstCombine] add tests to document bitcast + bitwise-logic behavior; NFC
The solution for PR26702 ( https://bugs.llvm.org/show_bug.cgi?id=26702 )
added a canonicalization rule, but the minimal regression tests don't 
demonstrate how that rule interacts with other folds.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303750 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 14:21:31 +00:00
Diana Picus
70301d661a Revert "[SCEV] Do not fold dominated SCEVUnknown into AddRecExpr start"
This reverts commit r303730 because it broke all the buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303747 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 14:16:04 +00:00
Krzysztof Parzyszek
4338f39804 [Hexagon] Fix comment in HexagonPacketizer::runOnMachineFunction
Patch by Wei-Ren Chen.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303745 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 13:43:42 +00:00
Jonas Paulsson
a551a28baa [LoopVectorizer] Let target prefer scalar addressing computations.
The loop vectorizer usually vectorizes any instruction it can and then
extracts the elements for a scalarized use. On SystemZ, all elements
containing addresses must be extracted into address registers (GRs). Since
this extraction is not free, it is better to have the address in a suitable
register to begin with. By forcing address arithmetic instructions and loads
of addresses to be scalar after vectorization, two benefits result:

* No need to extract the register
* LSR optimizations trigger (LSR isn't handling vector addresses currently)

Benchmarking show improvements on SystemZ with this new behaviour.

Any other target could try this by returning false in the new hook
prefersVectorizedAddressing().

Review: Renato Golin, Elena Demikhovsky, Ulrich Weigand
https://reviews.llvm.org/D32422

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303744 91177308-0d34-0410-b5e6-96231b3b80d8
2017-05-24 13:42:56 +00:00