Juergen Ributzka [Sat, 21 Sep 2013 04:55:18 +0000 (04:55 +0000)]
SelectionDAG: Teach the legalizer to split SETCC if VSELECT needs splitting too.
The Type Legalizer recognizes that VSELECT needs to be split, because the type
is to wide for the given target. The same does not always apply to SETCC,
because less space is required to encode the result of a comparison. As a result
VSELECT is split and SETCC is unrolled into scalar comparisons.
This commit fixes the issue by checking for VSELECT-SETCC patterns in the DAG
Combiner. If a matching pattern is found, then the result mask of SETCC is
promoted to the expected vector mask for the given target. This mask has usually
te same size as the VSELECT return type (except for Intel KNL). Now the type
legalizer will split both VSELECT and SETCC.
This allows the following X86 DAG Combine code to sucessfully detect the MIN/MAX
pattern. This fixes PR16695, PR17002, and <rdar://problem/
14594431>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191130
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Sat, 21 Sep 2013 02:34:45 +0000 (02:34 +0000)]
Initialize BSSSection explicitly in InitMachOMCObjectFileInfo() to appease msvc.
This can revert r191087.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191128
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Sat, 21 Sep 2013 01:37:52 +0000 (01:37 +0000)]
Set .reorder for the stub so that gas takes care of delay slot processing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191125
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Sat, 21 Sep 2013 01:06:00 +0000 (01:06 +0000)]
Reapply "SLPVectorizer: Handle more horizontal reductions (disabled)""
Reapply r191108 with a fix for a memory corruption error I introduced. Of
course, we can't reference the scalars that we replace by vectorizing and then
call their eraseFromParent method. I only 'needed' the scalars to get the
DebugLoc. Just store the DebugLoc before actually vectorizing instead. As a nice
side effect, this also simplifies the interface between BoUpSLP and the
HorizontalReduction class to returning a value pointer (the vectorized tree
root).
radar://
14607682
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191123
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sat, 21 Sep 2013 00:27:05 +0000 (00:27 +0000)]
LoopVectorizer: Only allow vectorization of intrinsics. We can't know for sure that the functions 'abs' or 'round' are the functions from libm.
rdar://
15012650
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191122
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Sat, 21 Sep 2013 00:06:20 +0000 (00:06 +0000)]
Revert "SLPVectorizer: Handle more horizontal reductions (disabled)"
This reverts commit r191108.
The horizontal.ll test case fails under libgmalloc. Thanks Shuxin for pointing
this out to me.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191121
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 20 Sep 2013 23:22:52 +0000 (23:22 +0000)]
Move emission of the debug string table to early in the debug
info finalization to greatly reduce the number of fixups that the
assembler has to handle in order to improve compile time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191119
91177308-0d34-0410-b5e6-
96231b3b80d8
Shuxin Yang [Fri, 20 Sep 2013 23:12:57 +0000 (23:12 +0000)]
Resurrect r191017 " GVN proceeds in the presence of dead code" plus a fix to PR17307 & 17308.
The problem of r191017 is that when GVN fabricate a val-number for a dead instruction (in order
to make following expr-PRE happy), it forget to fabricate a leader-table entry for it as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191118
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Fri, 20 Sep 2013 23:08:21 +0000 (23:08 +0000)]
MC: Tidy up.
Clean up some simple code quality issues. Bring internal naming
conventions up to current standard, fix inconsistent formatting, and
tidy up a couple of odd contructs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191117
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 20 Sep 2013 22:20:55 +0000 (22:20 +0000)]
Migrate addGlobalName to the .cpp file as an intermediate step
to further work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191113
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 20 Sep 2013 22:12:42 +0000 (22:12 +0000)]
InstCombine: Remove unused argument. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191112
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Fri, 20 Sep 2013 22:12:03 +0000 (22:12 +0000)]
Fix some more MCJIT PIC test XFAILs (for i386)
Patch by Dimitry Andric
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191111
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 20 Sep 2013 21:22:28 +0000 (21:22 +0000)]
[mips] MUL should clobber HI0 and LO0.
I cannot think of a test case that reliably triggers this bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191109
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Fri, 20 Sep 2013 21:18:20 +0000 (21:18 +0000)]
SLPVectorizer: Handle more horizontal reductions (disabled)
Match reductions starting at binary operation feeding into a phi. The code
handles trees like
r += v1 + v2 + v3 ...
and
r += v1
r += v2
...
and
r *= v1 + v2 + ...
We currently only handle associative operations (add, fadd fast).
The code can now also handle reductions feeding into stores.
a[i] = v1 + v2 + v3 + ...
The code is currently disabled behind the flag "-slp-vectorize-hor". The cost
model for most architectures is not there yet.
I found one opportunity of a horizontal reduction feeding a phi in TSVC
(LoopRerolling-flt) and there are several opportunities where reductions feed
into stores.
radar://
14607682
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191108
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Fri, 20 Sep 2013 20:40:22 +0000 (20:40 +0000)]
Delete empty files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191105
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Fri, 20 Sep 2013 20:33:57 +0000 (20:33 +0000)]
Revert r191017, it results in segmentation faults in Qt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191104
91177308-0d34-0410-b5e6-
96231b3b80d8
Tareq A. Siraj [Fri, 20 Sep 2013 18:21:59 +0000 (18:21 +0000)]
Fixed typo in CreateProcessTrailingSlash test
--gtest_filter was filtering an invalid name for the test.
Differential Revision: http://llvm-reviews.chandlerc.com/D1733
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191100
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 20 Sep 2013 14:38:44 +0000 (14:38 +0000)]
InstCombine: Canonicalize (gep i8* X, -(ptrtoint Y)) to (sub (ptrtoint X), (ptrtoint Y))
The GEP pattern is what SCEV expander emits for "ugly geps". The latter is what
you get for pointer subtraction in C code. The rest of instcombine already
knows how to deal with that so just canonicalize on that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191090
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 20 Sep 2013 13:12:24 +0000 (13:12 +0000)]
llvm/tools/Makefile: Suppress building llvm-lto on cygming, for now, probably due to LTO.dll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191088
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 20 Sep 2013 12:57:34 +0000 (12:57 +0000)]
llvm/test: Mark 3 tests as XFAIL:msvc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191087
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Fri, 20 Sep 2013 12:57:25 +0000 (12:57 +0000)]
test/tools/lto/lit.local.cfg: Suppress llvm-lto test on Cygwin and Win32, for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191086
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 20 Sep 2013 10:56:40 +0000 (10:56 +0000)]
Move x86-dependent tests into the right directory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191082
91177308-0d34-0410-b5e6-
96231b3b80d8
Anders Waldenborg [Fri, 20 Sep 2013 07:00:36 +0000 (07:00 +0000)]
Revert "llvm-c: Add LLVMGetPointerToFunction"
This reverts r191030
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191075
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 20 Sep 2013 05:37:49 +0000 (05:37 +0000)]
Lift alignment restrictions on load/store folding of VEXTRACTI128/VINSERTI128.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191073
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Fri, 20 Sep 2013 05:14:41 +0000 (05:14 +0000)]
Allow subtarget selection of the default MachineScheduler and document the interface.
The global registry is used to allow command line override of the
scheduler selection, but does not work well as the normal selection
API. For example, the same LLVM process should be able to target
multiple targets or subtargets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191071
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Fri, 20 Sep 2013 01:24:10 +0000 (01:24 +0000)]
Revert r191062; the build break was also fixed in a different (incompatible) way in r191060.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191065
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Fri, 20 Sep 2013 00:38:18 +0000 (00:38 +0000)]
Unbreak Clang build after r191050: don't pass a StringRef to snprintf.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191062
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 20 Sep 2013 00:33:15 +0000 (00:33 +0000)]
DebugInfo: GDBIndexEntry*String conversion functions now return const char* for easy llvm::formating
This was previously invoking UB by passing a user-defined type to
format. Thanks to Jordan Rose for pointing this out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191060
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Fri, 20 Sep 2013 00:33:11 +0000 (00:33 +0000)]
Add braces to suppress Clang's dangling-else warning.
These violations were introduced in r191049
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191059
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 19 Sep 2013 23:43:46 +0000 (23:43 +0000)]
DebugInfo: constrain gnu pubnames test further
Ensures that the pubnames entries actually refer to the intended
entities. This test could be more flexible if there was a way to do
multiline FileCheck matches with captures (in that way the test wouldn't
need to have hardcoded offset values and would thus be resilient to
changes in the layout of the DIEs in this CU).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191055
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Mitton [Thu, 19 Sep 2013 23:21:07 +0000 (23:21 +0000)]
Fixed warning
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191053
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Mitton [Thu, 19 Sep 2013 23:21:01 +0000 (23:21 +0000)]
Added support for generate DWARF .debug_aranges sections automatically.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191052
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Thu, 19 Sep 2013 23:10:59 +0000 (23:10 +0000)]
Rename ConvergingScheduler to GenericScheduler.
This was an experimental scheduler a year ago. It's now used by
several subtargets, both in-order and out-of-order, and it
is about to be enabled by default for x86 and armv7. It will be the
new GenericScheduler for subtargets that don't provide their own
SchedulingStrategy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191051
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 19 Sep 2013 23:01:29 +0000 (23:01 +0000)]
DebugInfo: llvm-dwarfdump support for gnu_pubnames section
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191050
91177308-0d34-0410-b5e6-
96231b3b80d8
Kai Nacke [Thu, 19 Sep 2013 23:00:28 +0000 (23:00 +0000)]
PR16726: extend rol/ror matching
C-like languages promote types like unsigned short to unsigned int before
performing an arithmetic operation. Currently the rotate matcher in the
DAGCombiner does not consider this situation.
This commit extends the DAGCombiner in the way that the pattern
(or (shl ([az]ext x), (*ext y)), (srl ([az]ext x), (*ext (sub 32, y))))
is folded into
([az]ext (rotl x, y))
The matching is restricted to aext and zext because in this cases the upper
bits are either undefined or known. Test case is included.
This fixes PR16726.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191049
91177308-0d34-0410-b5e6-
96231b3b80d8
Kai Nacke [Thu, 19 Sep 2013 22:53:36 +0000 (22:53 +0000)]
Revert PR16726: extend rol/ror matching
There is a buildbot failure. Need to investigate this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191048
91177308-0d34-0410-b5e6-
96231b3b80d8
Kai Nacke [Thu, 19 Sep 2013 22:36:39 +0000 (22:36 +0000)]
PR16726: extend rol/ror matching
C-like languages promote types like unsigned short to unsigned int before
performing an arithmetic operation. Currently the rotate matcher in the
DAGCombiner does not consider this situation.
This commit extends the DAGCombiner in the way that the pattern
(or (shl ([az]ext x), (*ext y)), (srl ([az]ext x), (*ext (sub 32, y))))
is folded into
([az]ext (rotl x, y))
The matching is restricted to aext and zext because in this cases the upper
bits are either undefined or known. Test case is included.
This fixes PR16726.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191045
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 19 Sep 2013 22:19:37 +0000 (22:19 +0000)]
DebugInfo: Improve IR annotation comments for GNU pubthings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191043
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Thu, 19 Sep 2013 22:15:52 +0000 (22:15 +0000)]
Fix LTO handling of module-level assembly (PR14152).
Patch by Tom Roeder!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191042
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Thu, 19 Sep 2013 21:58:20 +0000 (21:58 +0000)]
Add testcase to make sure we don't generate too many jumps for a une compare.
<rdar://problem/
7859988>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191040
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 19 Sep 2013 21:30:00 +0000 (21:30 +0000)]
Unbreak C++03 build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191039
91177308-0d34-0410-b5e6-
96231b3b80d8
Shuxin Yang [Thu, 19 Sep 2013 21:13:46 +0000 (21:13 +0000)]
[Fast-math] Disable "(C1/X)*C2 => (C1*C2)/X" if C1/X has multiple uses.
If "C1/X" were having multiple uses, the only benefit of this
transformation is to potentially shorten critical path. But it is at the
cost of instroducing additional div.
The additional div may or may not incur cost depending on how div is
implemented. If it is implemented using Newton–Raphson iteration, it dosen't
seem to incur any cost (FIXME). However, if the div blocks the entire
pipeline, that sounds to be pretty expensive. Let CodeGen to take care
this transformation.
This patch sees 6% on a benchmark.
rdar://
15032743
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191037
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 19 Sep 2013 20:59:04 +0000 (20:59 +0000)]
InstCombine: Don't allow turning vector-of-pointer loads into vector-of-integer.
The code below can't handle any pointers. PR17293.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191036
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 19 Sep 2013 20:40:26 +0000 (20:40 +0000)]
Unshift the GDB index/GNU pubnames constants modified in r191025
Based on code review feedback from Eric Christopher, unshifting these
constants as they can appear in the gdb_index itself, shifted a further
24 bits. This means that keeping them preshifted is a bit inflexible, so
let's not do that.
Given the motivation, wrap up some nicer enums, more type safety, and
some utility functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191035
91177308-0d34-0410-b5e6-
96231b3b80d8
Anders Waldenborg [Thu, 19 Sep 2013 19:55:06 +0000 (19:55 +0000)]
llvm-c: Add LLVMGetPointerToFunction
Differential Revision: http://llvm-reviews.chandlerc.com/D1715
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191030
91177308-0d34-0410-b5e6-
96231b3b80d8
Anders Waldenborg [Thu, 19 Sep 2013 19:43:55 +0000 (19:43 +0000)]
llvm-c: Make LLVMGetFirstTarget a proper prototype
This avoids warnings when included in a application that
uses -Wstrict-prototypes.
Differential Revision: http://llvm-reviews.chandlerc.com/D1713
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191029
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 19 Sep 2013 18:41:40 +0000 (18:41 +0000)]
Remove extraneous space, the asm printing infrastructure adds a space
in normally.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191026
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 19 Sep 2013 18:39:59 +0000 (18:39 +0000)]
DebugInfo: Simplify gnu_pubnames index computation.
Names open to bikeshedding. Could switch back to the constants being
unshifted, but this way seems a bit easier to work with.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191025
91177308-0d34-0410-b5e6-
96231b3b80d8
Yi Jiang [Thu, 19 Sep 2013 17:48:48 +0000 (17:48 +0000)]
X86 horizontal vector reduction cost model
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191021
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 19 Sep 2013 17:33:35 +0000 (17:33 +0000)]
Remove unnecessary conditional operators performing bool->bool conversion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191020
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 19 Sep 2013 17:27:48 +0000 (17:27 +0000)]
Fix a typo and simplify a boolean expression.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191018
91177308-0d34-0410-b5e6-
96231b3b80d8
Shuxin Yang [Thu, 19 Sep 2013 17:22:51 +0000 (17:22 +0000)]
GVN proceeds in the presence of dead code.
This is how it ignores the dead code:
1) When a dead branch target, say block B, is identified, all the
blocks dominated by B is dead as well.
2) The PHIs of those blocks in dominance-frontier(B) is updated such
that the operands corresponding to dead predecessors are replaced
by "UndefVal".
Using lattice's jargon, the "UndefVal" is the "Top" in essence.
Phi node like this "phi(v1 bb1, undef xx)" will be optimized into
"v1" if v1 is constant, or v1 is an instruction which dominate this
PHI node.
3) When analyzing the availability of a load L, all dead mem-ops which
L depends on disguise as a load which evaluate exactly same value as L.
4) The dead mem-ops will be materialized as "UndefVal" during code motion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191017
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 19 Sep 2013 17:18:35 +0000 (17:18 +0000)]
msbuild: Set _MSC_VER to match the CRT we're using
Various Windows SDK headers use _MSC_VER values to figure out what
version of the VC++ headers they're using, in particular for SAL macros.
Patch by Paul Hampson!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191015
91177308-0d34-0410-b5e6-
96231b3b80d8
Shuxin Yang [Thu, 19 Sep 2013 17:18:35 +0000 (17:18 +0000)]
Add function DominatorTree::getDescendants().
As its name suggests, this function will return all basic blocks
dominated by a given block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191014
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 19 Sep 2013 16:50:40 +0000 (16:50 +0000)]
Include an LLVM-vs2012_xp toolset in the MSBuild integration
Patch by Paul Hampson!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191010
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Thu, 19 Sep 2013 15:22:35 +0000 (15:22 +0000)]
[msan] Wrap indirect functions.
Adds a flag to the MemorySanitizer pass that enables runtime rewriting of
indirect calls. This is part of MSanDR implementation and is needed to return
control to the DynamiRio-based helper tool on transition between instrumented
and non-instrumented modules. Disabled by default.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191006
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Thu, 19 Sep 2013 13:28:20 +0000 (13:28 +0000)]
DAGCombiner: Don't fold vector muls with constants that look like a splat of a power of 2 but differ in bit width.
PR17283.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191000
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Thu, 19 Sep 2013 13:14:44 +0000 (13:14 +0000)]
[NVPTX] Make constant vector test case endian-independent
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190998
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Holewinski [Thu, 19 Sep 2013 12:51:46 +0000 (12:51 +0000)]
[NVPTX] Support constant vector globals
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190997
91177308-0d34-0410-b5e6-
96231b3b80d8
Amara Emerson [Thu, 19 Sep 2013 11:59:01 +0000 (11:59 +0000)]
[ARMv8] Add support for the v8 cryptography extensions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190996
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Thu, 19 Sep 2013 11:33:53 +0000 (11:33 +0000)]
X86: FrameIndex addressing modes do have a base register.
When selecting the DAG (add (WrapperRIP ...), (FrameIndex ...)), X86 code had
spotted the FrameIndex possibility and was working out whether it could fold
the WrapperRIP into this.
The test for forming a %rip version is notionally whether we already have a
base or index register (%rip precludes both), but we were forgetting to account
for the register that would be inserted later to access the frame.
rdar://problem/
15024520
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190995
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Thu, 19 Sep 2013 06:02:43 +0000 (06:02 +0000)]
Revert "Encapsulate PassManager debug flags to avoid static init and cxa_exit."
Working on a better solution to this.
This reverts commit
7d4e9934e7ca83094c5cf41346966c8350179ff2.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190990
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 18 Sep 2013 23:31:16 +0000 (23:31 +0000)]
Encapsulate PassManager debug flags to avoid static init and cxa_exit.
This puts all the global PassManager debugging flags, like
-print-after-all and -time-passes, behind a managed static. This
eliminates their static initializers and, more importantly, exit-time
destructors.
The only behavioral change I anticipate is that tools need to
initialize the PassManager before parsing the command line in order to
export these options, which makes sense. Tools that already initialize
the standard passes (opt/llc) don't need to do anything new.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190974
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Wed, 18 Sep 2013 23:31:10 +0000 (23:31 +0000)]
whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190973
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Wed, 18 Sep 2013 22:46:09 +0000 (22:46 +0000)]
Fix two issues regarding Got pointer (GP) setup.
1) make sure that the first two instructions of the sequence cannot
separate from each other. The linker requires that they be sequential.
If they get separated, it can still work but it will not work in all
cases because the first of the instructions mostly involves the hi part
of the pc relative offset and that part changes slowly. You would have
to be at the right boundary for this to matter.
2) make sure that this sequence begins on a longword boundary.
There appears to be a bug in binutils which makes some of these calculations
get messed up if the instruction sequence does not begin on a longword
boundary. This is being investigated with the appropriate binutils folks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190966
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Wed, 18 Sep 2013 22:08:59 +0000 (22:08 +0000)]
Debug info: Get rid of the VLA indirection hack in FastISel.
Use the DIVariable::isIndirect() flag set by the frontend instead of
guessing whether to set the machine location's indirection bit.
Paired commit with CFE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190961
91177308-0d34-0410-b5e6-
96231b3b80d8
Preston Gurd [Wed, 18 Sep 2013 21:39:33 +0000 (21:39 +0000)]
Attempt to fix llvm-ppc64-linux2 buildbot failure by adding
-march=x86 to SLM test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190958
91177308-0d34-0410-b5e6-
96231b3b80d8
Preston Gurd [Wed, 18 Sep 2013 21:08:09 +0000 (21:08 +0000)]
Verify that llvm can generate the prefetchw instruction when the CPU is
Atom Silvermont.
Patch by Sriram Murali.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190957
91177308-0d34-0410-b5e6-
96231b3b80d8
Galina Kistanova [Wed, 18 Sep 2013 18:39:38 +0000 (18:39 +0000)]
Remove empty dir.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190952
91177308-0d34-0410-b5e6-
96231b3b80d8
Galina Kistanova [Wed, 18 Sep 2013 17:58:41 +0000 (17:58 +0000)]
Remove empty dir.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190948
91177308-0d34-0410-b5e6-
96231b3b80d8
Filip Pizlo [Wed, 18 Sep 2013 16:40:14 +0000 (16:40 +0000)]
Make DynamicLibrary use ManagedStatic. This is pretty simple and should just work as
advertised - but it does have the caveat that calls to DynamicLibrary::AddSymbol will
"reset" if you shutdown llvm and try to come back for seconds. This is a subtle
behavior change, but I'm assuming that nobody is affected by it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190946
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 18 Sep 2013 14:11:11 +0000 (14:11 +0000)]
More XCore TTI cleanup -- remove an unused private field flagged by
-Wunused-private-field with Clang.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190941
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 18 Sep 2013 14:08:30 +0000 (14:08 +0000)]
Name the XCore target-specific subdirectories canonically.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190940
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 18 Sep 2013 14:07:14 +0000 (14:07 +0000)]
[asan] call __asan_stack_malloc_N only if use-after-return detection is enabled with the run-time option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190939
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 18 Sep 2013 13:56:16 +0000 (13:56 +0000)]
A couple of tests, in llvm/test/Transforms/*/xcore, are XCore-specific. They should be excluded when XCore is not built.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190938
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 18 Sep 2013 12:59:41 +0000 (12:59 +0000)]
Target/XCore/CMakeLists.txt: Add XCoreTargetTransformInfo.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190937
91177308-0d34-0410-b5e6-
96231b3b80d8
Robert Lytton [Wed, 18 Sep 2013 12:43:35 +0000 (12:43 +0000)]
Prevent LoopVectorizer and SLPVectorizer running if the target has no vector registers.
XCore target: Add XCoreTargetTransformInfo
This is where getNumberOfRegisters() resides, which in turn returns the
number of vector registers (=0).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190936
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Wed, 18 Sep 2013 12:06:59 +0000 (12:06 +0000)]
Re-add tests from r179291 which were accidentally removed by r181177.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190934
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Sandiford [Wed, 18 Sep 2013 09:56:40 +0000 (09:56 +0000)]
[SystemZ] Add unsigned compare-and-branch instructions
For some reason I never got around to adding these at the same time as
the signed versions. No idea why.
I'm not sure whether this SystemZII::BranchC* stuff is useful, or whether
it should just be replaced with an "is normal" flag. I'll leave that
for later though.
There are some boundary conditions that can be tweaked, such as preferring
unsigned comparisons for equality with [128, 256), and "<= 255" over "< 256",
but again I'll leave those for a separate patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190930
91177308-0d34-0410-b5e6-
96231b3b80d8
Joey Gouly [Wed, 18 Sep 2013 09:46:49 +0000 (09:46 +0000)]
'svn add' the test cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190929
91177308-0d34-0410-b5e6-
96231b3b80d8
Joey Gouly [Wed, 18 Sep 2013 09:45:55 +0000 (09:45 +0000)]
[ARMv8] Add CRC instructions.
Patch by Bradley Smith!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190928
91177308-0d34-0410-b5e6-
96231b3b80d8
Filip Pizlo [Wed, 18 Sep 2013 06:37:55 +0000 (06:37 +0000)]
Revert r190921. It broke Windows.
I'll roll it back in when I have a chance to look at it in detail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190923
91177308-0d34-0410-b5e6-
96231b3b80d8
Filip Pizlo [Wed, 18 Sep 2013 06:03:27 +0000 (06:03 +0000)]
Make DynamicLibrary use ManagedStatic. This is pretty simple and should just work as
advertised - but it does have the caveat that calls to DynamicLibrary::AddSymbol will
"reset" if you shutdown llvm and try to come back for seconds. This is a subtle
behavior change, but I'm assuming that nobody is affected by it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190921
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 18 Sep 2013 06:01:53 +0000 (06:01 +0000)]
Prevent extra calls to ToggleFeature for Feature64Bit and FeatureCMOV if they've already been enabled. The extra call ends up clearing the bit in FeatureBits since its a 'toggle'. Can't prove that anything was broken because of this since I don't think the FeatureBits for these are used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190920
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 18 Sep 2013 05:54:09 +0000 (05:54 +0000)]
Fix X86 subtarget to not overwrite the autodetected features by calling InitMCProcessorInfo right after detecting them. Instead add a new function that only updates the scheduling model and call that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190919
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 18 Sep 2013 04:10:17 +0000 (04:10 +0000)]
Revert accidental commit I had to make to get the test case in PR17268 to still work correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190917
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Wed, 18 Sep 2013 03:55:53 +0000 (03:55 +0000)]
Lift alignment restrictions for load/store folding on VINSERTF128/VEXTRACTF128. Fixes PR17268.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190916
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 18 Sep 2013 00:11:27 +0000 (00:11 +0000)]
ifndef NDEBUG-out an asserts-only constant committed in r190863
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190905
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 17 Sep 2013 23:23:16 +0000 (23:23 +0000)]
Fix a constant folding address space place I missed.
If address space 0 was smaller than the address space
in a constant inttoptr/ptrtoint pair, the wrong mask size
would be used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190899
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 17 Sep 2013 23:18:05 +0000 (23:18 +0000)]
COFF: Ensure that objects produced by LLVM link with /safeseh
Summary:
We indicate that the object files are safe by emitting a @feat.00
absolute address symbol. The address is presumably interpreted as a
bitfield of features that the compiler would like to enable. Bit 0 is
documented in the PE COFF spec to opt in to "registered SEH", which is
what /safeseh enables.
LLVM's object files are safe by default because LLVM doesn't know how to
produce SEH handlers.
Reviewers: Bigcheese
CC: llvm-commits
Differential Revision: http://llvm-reviews.chandlerc.com/D1691
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190898
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 17 Sep 2013 23:15:35 +0000 (23:15 +0000)]
Missed using check type enum in one place
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190897
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 17 Sep 2013 22:45:57 +0000 (22:45 +0000)]
Use function's argument instead of the global flag.
For now it happens the argument is always the same.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190896
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 17 Sep 2013 22:30:02 +0000 (22:30 +0000)]
FileCheck refactor: use enum instead of bunch of bools
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190893
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Tue, 17 Sep 2013 22:01:26 +0000 (22:01 +0000)]
Revert the load slicing done in r190870.
To avoid regressions with bitfield optimizations, this slicing should take place
later, like ISel time.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190891
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 17 Sep 2013 21:24:44 +0000 (21:24 +0000)]
COFF: Emit all MCSymbols rather than filtering out some of them
In particular, this means we emit non-external symbols defined to
variables, such as aliases or absolute addresses.
This is needed to implement /safeseh, and it appears there was some
confusion about what symbols to emit previously.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190888
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 17 Sep 2013 21:24:02 +0000 (21:24 +0000)]
COFF: Remove ExportSection, which has been dead since r114823
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190887
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 17 Sep 2013 21:13:57 +0000 (21:13 +0000)]
Move variable into assert to avoid unused variable warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190886
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 17 Sep 2013 21:10:14 +0000 (21:10 +0000)]
Cleanup handling of constant function casts.
Some of this code is no longer necessary since int<->ptr casts are no
longer occur as of r187444.
This also fixes handling vectors of pointers, and adds a bunch of new
testcases for vectors and address spaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190885
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Tue, 17 Sep 2013 20:22:05 +0000 (20:22 +0000)]
[PowerPC] Add a FIXME.
Documenting a design choice to generate only medium model sequences for TLS
addresses at this time. Small and large code models could be supported if
necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190883
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Tue, 17 Sep 2013 20:03:25 +0000 (20:03 +0000)]
[PowerPC] Fix problems with large code model (PR17169).
Large code model on PPC64 requires creating and referencing TOC entries when
using the addis/ld form of addressing. This was not being done in all cases.
The changes in this patch to PPCAsmPrinter::EmitInstruction() fix this. Two
test cases are also modified to reflect this requirement.
Fast-isel was not creating correct code for loading floating-point constants
using large code model. This also requires the addis/ld form of addressing.
Previously we were using the addis/lfd shortcut which is only applicable to
medium code model. One test case is modified to reflect this requirement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190882
91177308-0d34-0410-b5e6-
96231b3b80d8