88961 Commits

Author SHA1 Message Date
Matthew Simpson
09e9ded8a1 [LoopUtils, LV] Fix PR27246 (first-order recurrences)
This patch ensures that when we detect first-order recurrences, we reject a phi
node if its previous value is also a phi node. During vectorization the initial
and previous values of the recurrence are shuffled together to create the value
for the current iteration. However, phi nodes are not widened like other
instructions. This fixes PR27246.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265983 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-11 19:48:18 +00:00
Sriraman Tallam
0fd07efa78 Test commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265976 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-11 18:40:50 +00:00
Lang Hames
90ae214a17 [Object] Make .alt_entry directive parsing MachO specific.
ELF and COFF will now treat .alt_entry like any other unrecognized directive.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265975 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-11 18:33:45 +00:00
Reid Kleckner
67e74634d3 Combine redundant stack realignment booleans in MachineFrameInfo
MachineFrameInfo does not need to be able to distinguish between the
user asking us not to realign the stack and the target telling us it
doesn't support stack realignment. Either way, fixed stack objects have
their alignment clamped.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265971 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-11 17:54:03 +00:00
Sanjay Patel
a05380c564 add FIXME comment; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265970 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-11 17:35:57 +00:00
Sanjay Patel
c19ec77e20 add an assert for safety; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265969 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-11 17:27:44 +00:00
Sanjay Patel
38d4f53fc1 variable names start with a capital letter; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265968 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-11 17:25:23 +00:00
Xinliang David Li
6a7ae27ea4 Add code comment/NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265966 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-11 17:13:08 +00:00
Sanjay Patel
09a3a210e0 [InstCombine] use canEvaluateShiftedShift() to handle the lshr case (NFCI)
We need just a couple of logic tweaks to consolidate the shl and lshr cases.

This is step 5 of refactoring to solve PR26760:
https://llvm.org/bugs/show_bug.cgi?id=26760



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265965 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-11 17:11:55 +00:00
Sanjay Patel
5740d620f3 [InstCombine] don't try to shift an illegal amount (PR26760)
This is the straightforward fix for PR26760:
https://llvm.org/bugs/show_bug.cgi?id=26760

But we still need to make some changes to generalize this helper function
and then send the lshr case into here.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265960 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-11 16:50:32 +00:00
Tom Stellard
94eb1d993e TargetRegisterInfo: Add getRegAsmName()
Summary:
The motivation for this new function is to move an invalid assumption
about the relationship between the names of register definitions in
tablegen files and their assembly names into TargetRegisterInfo, so that
we can begin working on fixing this assumption.

The current problem is that if you have a register definition in
TableGen like:

def MYReg0 : Register<"r0", 0>;

The function TargetLowering::getRegForInlineAsmConstraint() derives the
assembly name from the tablegen name: "MyReg0" rather than the given
assembly name "r0".  This is working, because on most targets the
tablegen name and the assembly names are case insensitive matches for
each other (e.g. def EAX : X86Reg<"eax", ...>

getRegAsmName() will allow targets to override this default assumption and
return the correct assembly name.

Reviewers: echristo, hfinkel

Subscribers: SamWot, echristo, hfinkel, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265955 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-11 16:21:12 +00:00
Sanjay Patel
5d2dd715c5 [InstCombine] rename variables in shifted-shift helper function (NFCI)
This is step 3 of refactoring to solve PR26760:
https://llvm.org/bugs/show_bug.cgi?id=26760


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265954 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-11 16:11:07 +00:00
Sanjay Patel
98198fca40 [InstCombine] add helper function for shift-shift optimization (NFCI)
This is step 2 of refactoring to solve PR26760:
https://llvm.org/bugs/show_bug.cgi?id=26760


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265951 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-11 15:43:41 +00:00
Sanjoy Das
5e07ce6898 This reverts commit r265913 and r265912
See PR27315

r265913: "[IndVars] Eliminate op.with.overflow when possible"

r265912: "[SCEV] See through op.with.overflow intrinsics"

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265950 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-11 15:26:18 +00:00
Petar Jovanovic
d2c18d6b60 [mips] Make Static a default relocation model for MIPS codegen
This change follows up defaults for GCC and Clang, so LLVM does not differ
from them. While number of the test files are touched with this change, they
all keep the old (expected) behaviour with the explicit option:
"-relocation-model=pic"
The tests that have not been touched are insensitive to relocation model.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265949 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-11 15:24:23 +00:00
Daniel Sanders
e085c90647 [mips] Trivial corrections to range checked immediates.
Summary:
SYNC has a 5-bit unsigned immediate.
Move MIPS16-specific pcrel16 operand to Mips16 files.

Reviewers: vkalintiris

Subscribers: dsanders, sdardis, llvm-commits

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265947 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-11 15:20:40 +00:00
Teresa Johnson
c456a3626a [ThinLTO] BitcodeWriter still requires Analysis library
This should fix bot failure:
http://bb.pgr.jp/builders/i686-mingw32-RA-on-linux/builds/9873

The bitcode writer unfortunately still needs the Analysis library, as it
replaces old dependence on BFI etc with dependence on new
ModuleSummaryAnalysis pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265945 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-11 14:59:07 +00:00
Ulrich Weigand
db55668f49 [SystemZ] README: remove an implemented idea, add some new ones
The note about conditional returns can now be removed, as they are
implemented. Let's also add 2 new ones in exchange.

Author: koriakin
Differential Revision: http://reviews.llvm.org/D18962



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265944 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-11 14:38:47 +00:00
Ulrich Weigand
4901036a89 [SystemZ] Add SVC instruction
This is going to be useful for inline assembly only.

Author: koriakin
Differential Revision: http://reviews.llvm.org/D18952



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265943 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-11 14:35:39 +00:00
Teresa Johnson
7ca333b425 [ThinLTO] Move summary computation from BitcodeWriter to new pass
Summary:
This is the first step in also serializing the index out to LLVM
assembly.

The per-module summary written to bitcode is moved out of the bitcode
writer and to a new analysis pass (ModuleSummaryIndexWrapperPass).
The pass itself uses a new builder class to compute index, and the
builder class is used directly in places where we don't have a pass
manager (e.g. llvm-as).

Because we are computing summaries outside of the bitcode writer, we no
longer can use value ids created by the bitcode writer's
ValueEnumerator. This required changing the reference graph edge type
to use a new ValueInfo class holding a union between a GUID (combined
index) and Value* (permodule index). The Value* are converted to the
appropriate value ID during bitcode writing.

Also, this enables removal of the BitWriter library's dependence on the
Analysis library that was previously required for the summary computation.

Reviewers: joker.eph

Subscribers: joker.eph, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265941 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-11 13:58:45 +00:00
Oliver Stannard
db3389c0dd [ARM] Avoid switching ARM/Thumb mode on .arch/.cpu directive
When we see a .arch or .cpu directive, we should try to avoid switching
ARM/Thumb mode if possible.

If we do have to switch modes, we also need to emit the correct mapping
symbol for the new ISA. We did not do this previously, so could emit
ARM code with Thumb mapping symbols (or vice-versa).

The GAS behaviour is to always stay in the same mode, and to emit an
error on any instructions seen when the current mode is not available on
the current target. We can't represent that situation easily (we assume
that Thumb mode is available if ModeThumb is set), so we differ from the
GAS behaviour when switching to a target that can't support the old
mode. I've added a warning for when this implicit mode-switch occurs.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265936 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-11 13:06:28 +00:00
Ulrich Weigand
8b66c0a76a [SystemZ] Support conditional indirect sibling calls via BCR
This adds a conditional variant of CallBR instruction, CallBCR. Also,
it can be fused with integer comparisons, resulting in one of the new
C*BCall instructions.

In addition to CallBRCL limitations, this has another one: it won't
trigger if the function to call isn't already in %r1 - see f22 in the
test for an example (it's also why the loads in tests are volatile).

Author: koriakin
Differential Revision: http://reviews.llvm.org/D18928



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265933 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-11 12:12:32 +00:00
Ulrich Weigand
65ca168806 [SystemZ] Remove incorrect CC use for C*BReturn instructions
These are fused compare-and-branches, so they obviously don't use CC.

Author: koriakin
Differential Revision: http://reviews.llvm.org/D18927



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265932 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-11 12:03:30 +00:00
Andrey Turetskiy
26a9873b72 [X86] Restrict max long nop length for Lakemont.
Restrict the max length of long nops for Lakemont to 7. Experiments on MCU
benchmarks (Dhrystone, Coremark) show that this is the most optimal length.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265924 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-11 10:07:36 +00:00
Sanjoy Das
0a4c40265b [IndVars] Eliminate op.with.overflow when possible
Summary:
If we can prove that an op.with.overflow intrinsic does not overflow, we
can get rid of the intrinsic, and replace it with non-wrapping
arithmetic.

Reviewers: atrick, regehr

Subscribers: sanjoy, mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265913 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-10 22:50:31 +00:00
Sanjoy Das
97ad447f43 [SCEV] See through op.with.overflow intrinsics
Summary:
This change teaches SCEV to see reduce `(extractvalue
0 (op.with.overflow X Y))` into `op X Y` (with a no-wrap tag if
possible).

Reviewers: atrick, regehr

Subscribers: mcrosier, mzolotukhin, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265912 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-10 22:50:26 +00:00
Mehdi Amini
2187597b34 Plumb the option to emit the ModuleHash in the bitcode through the bitcode writer APIs
From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265907 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-10 21:07:19 +00:00
Simon Pilgrim
51c5e3db07 [X86][AVX512BW] Add support for v64i8 multiplies
Extend the existing lowering of vXi8 multiplies to support v64i8 on avx512bw targets.

I added the Lower512IntArith helper function to help with this - not sure how often this could be used in the future, but it seemed better than putting all that logic inside LowerMUL.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265902 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-10 17:02:48 +00:00
Elena Demikhovsky
9f62954aaa Loop vectorization with uniform load
Vectorization cost of uniform load wasn't correctly calculated.
As a result, a simple loop that loads a uniform value wasn't vectorized.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265901 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-10 16:53:19 +00:00
Teresa Johnson
a6346264ce [ThinLTO] Remove unused parameter (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265900 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-10 15:17:26 +00:00
Craig Topper
e6319e78de [X86] Use for loops over types to reduce code for setting up operation actions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265893 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-10 05:39:32 +00:00
Craig Topper
efe8e4444a [X86] Remove unnecessary setOperationAction for SRA v2i64/v4i64 when VLX is suppored. This is already done for SSE2/AVX2 which VLX implies. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265892 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-10 05:39:28 +00:00
Xinliang David Li
6aa584fdaf [PGO] Fix deserialize bug
Raw function pointer collected by value
profile data may be from external functions
that are not instrumented. They won't have
mapping data to be used by the deserializer.
Force the value to be 0 in this case.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265890 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-10 03:32:02 +00:00
Charles Davis
c15a907754 [CodeGen] Don't assume that fixed stack objects are aligned in a stack-realigned function.
Summary:
After we make the adjustment, we can assume that for local allocas, but
not for stack parameters, the return address, or any other fixed stack
object (which has a negative offset and therefore lies prior to the
adjusted SP).

Fixes PR26662.

Reviewers: hfinkel, qcolombet, rnk

Subscribers: rnk, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265886 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-09 23:34:42 +00:00
Davide Italiano
7c0a10f790 [MC] support TLSDESC and TLSCALL / GNU2 tls dialect
Differential Revision:  http://reviews.llvm.org/D18885


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265881 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-09 20:32:33 +00:00
Adrian Prantl
030f43a4df Drop debug info for DISubprograms that are not referenced by anything
This patch drops the debug info for all DISubprograms that are
(a) not attached to an llvm::Function and
(b) not indirectly reachable via inline scopes from any surviving Function and
(c) not reachable from a type (i.e.: member functions).

Background: I'm currently working on a patch to reverse the pointers
between DICompileUnit and DISubprogram (for more info check Duncan's RFC
on lazy-loading of debug info metadata
http://lists.llvm.org/pipermail/llvm-dev/2016-March/097419.html).
The idea is to remove the list of subprograms from DICompileUnit and
instead point to the owning compile unit from each DISubprogram.
After doing this all DISubprograms fulfilling the above criteria will be
implicitly dropped unless we go through an extra effort to preserve them.

http://reviews.llvm.org/D18477
<rdar://problem/25256815>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265876 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-09 18:10:22 +00:00
Sanjay Patel
b58a4e226b [x86] use BMI 'andn' for logic + compare ops
With BMI, we can use 'andn' to save an instruction when the result is only used in a compare.
This is related to one of the potential sequences to check 'isfinite' in:
https://llvm.org/bugs/show_bug.cgi?id=27164

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265875 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-09 16:02:52 +00:00
Simon Pilgrim
c710179bcb [X86][XOP] Support for VPPERM 2-input shuffle mask decoding
This patch adds support for decoding XOP VPPERM instruction when it represents a basic shuffle.

The mask decoding required the existing MCInstrLowering code to be updated to support binary shuffles - the implementation now matches what is done in X86InstrComments.cpp.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265874 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-09 14:51:26 +00:00
Craig Topper
a70c9d2763 [X86] Use for loops over types to reduce code for setting up operation actions. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265871 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-09 06:31:02 +00:00
Craig Topper
799c5e4ce4 [X86] Remove calls to setOperationAction that set CTLZ_ZERO_UNDEF for some vector types to Expand. Expand is already set for all operations for all vector types earlier so this is redundant. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265870 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-09 05:53:48 +00:00
Sanjoy Das
5ff00d9679 Maintain calling convention when inling calls to llvm.deoptimize
The behavior here was buggy -- we'd forget the calling convention after
inlining a callsite calling llvm.deoptimize.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265867 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-09 00:22:59 +00:00
Mike Aizatsky
5bb9d06dac [libfuzzer] defensive assert
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265866 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-08 23:32:24 +00:00
Adrian Prantl
48bb8b44d7 Support the Nodebug emission kind for DICompileUnits.
Sample-based profiling and optimization remarks currently remove
DICompileUnits from llvm.dbg.cu to suppress the emission of debug info
from them. This is somewhat of a hack and only borderline legal IR.

This patch uses the recently introduced NoDebug emission kind in
DICompileUnit to achieve the same result without breaking the Verifier.
A nice side-effect of this change is that it is now possible to combine
NoDebug and regular compile units under LTO.

http://reviews.llvm.org/D18808
<rdar://problem/25427165>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265861 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-08 22:43:03 +00:00
Easwaran Raman
8a0abe782b Refactor Threshold computation. NFC.
This is part of changes reviewed in http://reviews.llvm.org/D17584.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265852 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-08 21:28:02 +00:00
Tim Shen
1a7750eecd [SSP] Remove llvm.stackprotectorcheck.
This is a cleanup patch for SSP support in LLVM. There is no functional change.
llvm.stackprotectorcheck is not needed, because SelectionDAG isn't
actually lowering it in SelectBasicBlock; rather, it adds check code in
FinishBasicBlock, ignoring the position where the intrinsic is inserted
(See FindSplitPointForStackProtector()).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265851 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-08 21:26:31 +00:00
Hans Wennborg
5451c707bc Rangeify a loop. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265846 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-08 20:46:09 +00:00
Hans Wennborg
7752b4e8a9 Remove some redundant variables from X86TargetLowering::LowerDYNAMIC_STACKALLOC
These are already defined, with the same values, a few lines up. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265845 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-08 20:46:00 +00:00
Kyle Butt
31fe4c9450 Codegen: Factor tail duplication into a utility class. NFC
This is in preparation for tail duplication during block placement. See D18226.
This needs to be a utility class for 2 reasons. No passes may run after block
placement, and also, tail-duplication affects subsequent layout decisions, so
it must be interleaved with placement, and can't be separated out into its own
pass. The original pass is still useful, and now runs by delegating to the
utility class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265842 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-08 20:35:01 +00:00
Evgeny Stupachenko
f9a07e70be test commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265840 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-08 20:20:38 +00:00
Nirav Dave
53a6bdc93c Fix Load Control Dependence in MemCpy Generation
In Memcpy lowering we had missed a dependence from the load of the
operation to successor operations. This causes us to potentially
construct an in initial DAG with a memory dependence not fully
represented in the chain sub-DAG but rather require looking at the
entire DAG breaking alias analysis by allowing incorrect repositioning
of memory operations.

To work around this, r200033 changed DAGCombiner::GatherAllAliases to be
conservative if any possible issues to happen. Unfortunately this check
forbade many non-problematic situations as well. For example, it's
common for incoming argument lowering to add a non-aliasing load hanging
off of EntryNode. Then, if GatherAllAliases visited EntryNode, it would
find that other (unvisited) use of the EntryNode chain, and just give up
entirely. Furthermore, the check was incomplete: it would not actually
detect all such potentially problematic DAG constructions, because
GatherAllAliases did not guarantee to visit all chain nodes going up to
the root EntryNode. This is in general fine -- giving up early will just
miss a potential optimization, not generate incorrect results. But, for
this non-chain dependency detection code, it's possible that you could
have a load attached to a higher-up chain node than any which were
visited. If that load aliases your store, but the only dependency is
through the value operand of a non-aliasing store, it would've been
missed by this code, and potentially reordered.

With the dependence added, this check can be removed and Alias Analysis
can be much more aggressive. This fixes code quality regression in the
Consecutive Store Merge cleanup (D14834).

Test Change:

ppc64-align-long-double.ll now may see multiple serializations
of its stores

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265836 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-08 19:44:40 +00:00