oota-llvm.git
10 years agoAdd fake use to suppress defined-but-unused warnings
Jingyue Wu [Sat, 4 Oct 2014 03:50:10 +0000 (03:50 +0000)]
Add fake use to suppress defined-but-unused warnings

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

10 years ago[x86] Fix a bug in the VZEXT DAG combine that I just made more powerful.
Chandler Carruth [Sat, 4 Oct 2014 02:51:03 +0000 (02:51 +0000)]
[x86] Fix a bug in the VZEXT DAG combine that I just made more powerful.

It turns out this combine was always somewhat flawed -- there are cases
where nested VZEXT nodes *can't* be combined: if their types have
a mismatch that can be observed in the result. While none of these show
up in currently, once I switch to the new vector shuffle lowering a few
test cases actually form such nested VZEXT nodes. I've not come up with
any IR pattern that I can sensible write to exercise this, but it will
be covered by tests once I flip the switch.

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

10 years ago[x86] Sink a generic combine of VZEXT nodes from the lowering to VZEXT
Chandler Carruth [Sat, 4 Oct 2014 01:05:48 +0000 (01:05 +0000)]
[x86] Sink a generic combine of VZEXT nodes from the lowering to VZEXT
nodes to the DAG combining of them.

This will allow the combine to fire on both old vector shuffle lowering
and the new vector shuffle lowering and generally seems like a cleaner
design. I've trimmed down the code a bit and tried to make it and the
surrounding combine fairly clean while moving it around.

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

10 years agoR600/SI: Custom lower f64 -> i64 conversions
Matt Arsenault [Fri, 3 Oct 2014 23:54:56 +0000 (23:54 +0000)]
R600/SI: Custom lower f64 -> i64 conversions

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

10 years agoR600: Custom lower [s|u]int_to_fp for i64 -> f64
Matt Arsenault [Fri, 3 Oct 2014 23:54:41 +0000 (23:54 +0000)]
R600: Custom lower [s|u]int_to_fp for i64 -> f64

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

10 years agoR600/SI: Fix ftrunc f64 conformance failures.
Matt Arsenault [Fri, 3 Oct 2014 23:54:27 +0000 (23:54 +0000)]
R600/SI: Fix ftrunc f64 conformance failures.

Re-add the tests since they were deleted at some point

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

10 years agoRemove unused ALL_BINDINGS configuration variable.
Peter Collingbourne [Fri, 3 Oct 2014 23:03:01 +0000 (23:03 +0000)]
Remove unused ALL_BINDINGS configuration variable.

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

10 years ago[x86] Add a really preposterous number of patterns for matching all of
Chandler Carruth [Fri, 3 Oct 2014 22:43:17 +0000 (22:43 +0000)]
[x86] Add a really preposterous number of patterns for matching all of
the various ways in which blends can be used to do vector element
insertion for lowering with the scalar math instruction forms that
effectively re-blend with the high elements after performing the
operation.

This then allows me to bail on the element insertion lowering path when
we have SSE4.1 and are going to be doing a normal blend, which in turn
restores the last of the blends lost from the new vector shuffle
lowering when I got it to prioritize insertion in other cases (for
example when we don't *have* a blend instruction).

Without the patterns, using blends here would have regressed
sse-scalar-fp-arith.ll *completely* with the new vector shuffle
lowering. For completeness, I've added RUN-lines with the new lowering
here. This is somewhat superfluous as I'm about to flip the default, but
hey, it shows that this actually significantly changed behavior.

The patterns I've added are just ridiculously repetative. Suggestions on
making them better very much welcome. In particular, handling the
commuted form of the v2f64 patterns is somewhat obnoxious.

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

10 years agoConverting the ErrorHandlerMutex to a ManagedStatic to avoid the static constructor...
Chris Bieneman [Fri, 3 Oct 2014 22:03:12 +0000 (22:03 +0000)]
Converting the ErrorHandlerMutex to a ManagedStatic to avoid the static constructor and destructor.

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

10 years ago[x86] Adjust the patterns for lowering X86vzmovl nodes which don't
Chandler Carruth [Fri, 3 Oct 2014 21:38:49 +0000 (21:38 +0000)]
[x86] Adjust the patterns for lowering X86vzmovl nodes which don't
perform a load to use blendps rather than movss when it is available.

For non-loads, blendps is *much* faster. It can execute on two ports in
Sandy Bridge and Ivy Bridge, and *three* ports on Haswell. This fixes
one of the "regressions" from aggressively taking the "insertion" path
in the new vector shuffle lowering.

This does highlight one problem with blendps -- it isn't commuted as
heavily as it should be. That's future work though.

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

10 years agoFix typo in TableGen documentation
Jonathan Roelofs [Fri, 3 Oct 2014 20:46:05 +0000 (20:46 +0000)]
Fix typo in TableGen documentation

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

10 years agoAdd unit tests to verify Hexagon emission.
Sid Manning [Fri, 3 Oct 2014 20:33:03 +0000 (20:33 +0000)]
Add unit tests to verify Hexagon emission.

Add the test cases I overlooked, part of the original commit,
http://reviews.llvm.org/D5523

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

10 years agoAdd a reference to Phabricator.rst to docs/index.rst.
Adrian Prantl [Fri, 3 Oct 2014 20:17:32 +0000 (20:17 +0000)]
Add a reference to Phabricator.rst to docs/index.rst.

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

10 years agoPR21145: Teach LLVM about C++14 sized deallocation functions.
Richard Smith [Fri, 3 Oct 2014 20:17:06 +0000 (20:17 +0000)]
PR21145: Teach LLVM about C++14 sized deallocation functions.

C++14 adds new builtin signatures for 'operator delete'. This change allows
new/delete pairs to be removed in C++14 onwards, as they were in C++11 and
before.

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

10 years agoRevert "Revert "DI: Fold constant arguments into a single MDString""
Duncan P. N. Exon Smith [Fri, 3 Oct 2014 20:01:09 +0000 (20:01 +0000)]
Revert "Revert "DI: Fold constant arguments into a single MDString""

This reverts commit r218918, effectively reapplying r218914 after fixing
an Ocaml bindings test and an Asan crash.  The root cause of the latter
was a tightened-up check in `DILexicalBlock::Verify()`, so I'll file a
PR to investigate who requires the loose check (and why).

Original commit message follows.

--

This patch addresses the first stage of PR17891 by folding constant
arguments together into a single MDString.  Integers are stringified and
a `\0` character is used as a separator.

Part of PR17891.

Note: I've attached my testcases upgrade scripts to the PR.  If I've
just broken your out-of-tree testcases, they might help.

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

10 years ago[ISel] Keep matching state consistent when folding during X86 address match
Adam Nemet [Fri, 3 Oct 2014 20:00:34 +0000 (20:00 +0000)]
[ISel] Keep matching state consistent when folding during X86 address match

In the X86 backend, matching an address is initiated by the 'addr' complex
pattern and its friends.  During this process we may reassociate and-of-shift
into shift-of-and (FoldMaskedShiftToScaledMask) to allow folding of the
shift into the scale of the address.

However as demonstrated by the testcase, this can trigger CSE of not only the
shift and the AND which the code is prepared for but also the underlying load
node.  In the testcase this node is sitting in the RecordedNode and MatchScope
data structures of the matcher and becomes a deleted node upon CSE.  Returning
from the complex pattern function, we try to access it again hitting an assert
because the node is no longer a load even though this was checked before.

Now obviously changing the DAG this late is bending the rules but I think it
makes sense somewhat.  Outside of addresses we prefer and-of-shift because it
may lead to smaller immediates (FoldMaskAndShiftToScale is an even better
example because it create a non-canonical node).  We currently don't recognize
addresses during DAGCombiner where arguably this canonicalization should be
performed.  On the other hand, having this in the matcher allows us to cover
all the cases where an address can be used in an instruction.

I've also talked a little bit to Dan Gohman on llvm-dev who added the RAUW for
the new shift node in FoldMaskedShiftToScaledMask.  This RAUW is responsible
for initiating the recursive CSE on users
(http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-September/076903.html) but it
is not strictly necessary since the shift is hooked into the visited user.  Of
course it's safer to keep the DAG consistent at all times (e.g. for accurate
number of uses, etc.).

So rather than changing the fundamentals, I've decided to continue along the
previous patches and detect the CSE.  This patch installs a very targeted
DAGUpdateListener for the duration of a complex-pattern match and updates the
matching state accordingly.  (Previous patches used HandleSDNode to detect the
CSE but that's not practical here).  The listener is only installed on X86.

I tested that there is no measurable overhead due to this while running
through the spec2k BC files with llc.  The only thing we pay for is the
creation of the listener.  The callback never ever triggers in spec2k since
this is a corner case.

Fixes rdar://problem/18206171

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

10 years agoR600: Align functions to 256 bytes
Tom Stellard [Fri, 3 Oct 2014 19:02:02 +0000 (19:02 +0000)]
R600: Align functions to 256 bytes

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

10 years agoEliminate some deep std::vector copies. NFC.
Benjamin Kramer [Fri, 3 Oct 2014 18:33:16 +0000 (18:33 +0000)]
Eliminate some deep std::vector copies. NFC.

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

10 years agoMCParser: Modernize memory handling.
Benjamin Kramer [Fri, 3 Oct 2014 18:32:55 +0000 (18:32 +0000)]
MCParser: Modernize memory handling.

NFC.

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

10 years ago[Power] Delete redundant test Atomics-32.ll
Robin Morisset [Fri, 3 Oct 2014 18:10:07 +0000 (18:10 +0000)]
[Power] Delete redundant test Atomics-32.ll

The test Atomics-32.ll was both redundant (all operations are also checked by
atomics.ll at least) and not actually checking correctness (it was not using
FileCheck, just verifying that the compiler does not crash).

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

10 years agollvm-readobj: print out the fields of the COFF delay-import table
Rui Ueyama [Fri, 3 Oct 2014 18:07:18 +0000 (18:07 +0000)]
llvm-readobj: print out the fields of the COFF delay-import table

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

10 years ago[Power] Use lwsync for non-seq_cst fences
Robin Morisset [Fri, 3 Oct 2014 18:04:36 +0000 (18:04 +0000)]
[Power] Use lwsync for non-seq_cst fences

Summary:
hwsync is only required for seq_cst fences, acquire and release one can use
the cheaper lwsync.

Test Plan: Added some cases to atomics.ll + make check-all

Reviewers: jfb, wschmidt

Subscribers: llvm-commits

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

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

10 years agoMipsAsmParser.cpp: fix VS2012 build
Hans Wennborg [Fri, 3 Oct 2014 17:16:24 +0000 (17:16 +0000)]
MipsAsmParser.cpp: fix VS2012 build

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

10 years agoHexagonMCCodeEmitter.h: deleted member functions are not supported in VS2012
Hans Wennborg [Fri, 3 Oct 2014 17:02:28 +0000 (17:02 +0000)]
HexagonMCCodeEmitter.h: deleted member functions are not supported in VS2012

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

10 years ago[mips] Print warning when using register names not available in N32/64
Daniel Sanders [Fri, 3 Oct 2014 15:37:37 +0000 (15:37 +0000)]
[mips] Print warning when using register names not available in N32/64

Summary:
The register names t4-t7 are not available in the N32 and N64 ABIs.
This patch prints a warning, when those names are used in N32/64,
along with a fix-it with the correct register names.

Patch by Vasileios Kalintiris

Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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

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

10 years agoFix build break on Hexagon
Sid Manning [Fri, 3 Oct 2014 13:59:01 +0000 (13:59 +0000)]
Fix build break on Hexagon

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

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

10 years agoAdding skeleton for unit testing Hexagon Code Emission
Sid Manning [Fri, 3 Oct 2014 13:18:11 +0000 (13:18 +0000)]
Adding skeleton for unit testing Hexagon Code Emission

Adding and modifying CMakeLists.txt files to run unit tests under
unittests/Target/* if the directory exists.  Adding basic unit test to check
that code emitter object can be retrieved.

Differential Revision: http://reviews.llvm.org/D5523
Change by: Colin LeMahieu

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

10 years ago[x86] Teach the new vector shuffle lowering to aggressively form MOVSS
Chandler Carruth [Fri, 3 Oct 2014 13:11:13 +0000 (13:11 +0000)]
[x86] Teach the new vector shuffle lowering to aggressively form MOVSS
and MOVSD nodes for single element vector inserts.

This is particularly important because a number of patterns in the
backend detect these patterns and leverage them to simplify things. It
also fixes quite a few of the insertion bad code examples. However, it
regresses a specific area: when available, blendps and blendpd are
*dramatically* faster than movss and movsd respectively. But it doesn't
really work to form the blend logic first because the blends *aren't* as
crazy efficient when the data is coming from memory anyways, and thus
will have a movss or movsd regardless. Also, doing that would block
a bunch of the patterns that this is designed to hit.

So my plan is to go into the patterns for lowering MOVSS and MOVSD and
lower them via blends when available. However that's a pretty invasive
restructuring so it will need to be a follow-up patch.

I have already gone into the patterns to lower MOVSS and MOVSD from
memory using MOVLPD, etc. Without that, several of the test cases
I already have regress.

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

10 years ago[sphinx cleanup] Fix unexpected indentation warning introduced by r218937
Dan Liew [Fri, 3 Oct 2014 12:28:48 +0000 (12:28 +0000)]
[sphinx cleanup] Fix unexpected indentation warning introduced by r218937

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

10 years agoRevert 202433 - Provide a target override for the latest regalloc heuristic
Renato Golin [Fri, 3 Oct 2014 12:20:53 +0000 (12:20 +0000)]
Revert 202433 - Provide a target override for the latest regalloc heuristic

That commit was introduced in order to help investigate a problem in ARM
codegen breaking from commit 202304 (Add a limit to the heuristic that register
allocates instructions in local order). Recent analisys indicated that the
problem no longer exists, so I'm reverting this change.

See PR18996.

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

10 years ago[x86] Refactor the element insertion logic in the new vector shuffle
Chandler Carruth [Fri, 3 Oct 2014 12:01:55 +0000 (12:01 +0000)]
[x86] Refactor the element insertion logic in the new vector shuffle
lowering to handle the potential mirroring of 2-element vectors (because
we can't reliably sort them one way) in the caller rather than in the
insertion logic.

This will simplify things considerably as more ways to fail to match the
insertion are added because now we have a nice try and retry point.

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

10 years agoFix typo in comment
Alexander Musman [Fri, 3 Oct 2014 11:55:31 +0000 (11:55 +0000)]
Fix typo in comment

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

10 years ago[x86] Fix the RUN-lines of this test to make sense.
Chandler Carruth [Fri, 3 Oct 2014 11:30:02 +0000 (11:30 +0000)]
[x86] Fix the RUN-lines of this test to make sense.

I got them quite wrong when updating it and had the SSE4.1 run checked
for SSE2 and the SSE2 run checked for SSE4.1. I think everything was
actually generic SSE, but this still seems good to fix. While here,
hoist the triple into the IR and make the flag set a bit more direct in
what it is trying to test.

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

10 years ago[x86] Significantly improve the ability of the new vector shuffle
Chandler Carruth [Fri, 3 Oct 2014 11:25:58 +0000 (11:25 +0000)]
[x86] Significantly improve the ability of the new vector shuffle
lowering to match VZEXT_MOVL patterns.

I hadn't realized that these had sufficient pattern smarts in the
backend to lower zext-ing from the low element of a vector without it
being a scalar_to_vector node. They do, and this is how to match a bunch
of patterns for movq, movss, etc.

There is a weird propensity to end up using pshufd to place the element
afterward even though it means domain crossing (or rather, to use
xorps+movss to zext the element rather than movq) but that's an
orthogonal problem with VZEXT_MOVL that someone should probably look at.

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

10 years ago[x86] Add some important, missing test coverage for blending from one
Chandler Carruth [Fri, 3 Oct 2014 11:16:45 +0000 (11:16 +0000)]
[x86] Add some important, missing test coverage for blending from one
vector to a zero vector for the v2 cases and fix the v4 integer cases to
actually blend from a vector.

There are already seprate tests for the case of inserting from a scalar.

These cases cover a lot of the regressions I've seen in the regression
test suite for the new vector shuffle lowering and specifically cover
the reported lack of using various zext-ing instruction patterns. My
next patch should fix a big chunk of this, but wanted to get a nice
baseline for these patterns in the test cases first.

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

10 years ago[x86] Unbreak SSE1 with the new vector shuffle lowering. We can't widen
Chandler Carruth [Fri, 3 Oct 2014 10:11:39 +0000 (10:11 +0000)]
[x86] Unbreak SSE1 with the new vector shuffle lowering. We can't widen
element types to form illegal vector types.

I've added a special SSE1 test case here that makes sure we don't break
this going forward.

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

10 years ago[x86] Add two more triples to stabilize the precise assembly syntax
Chandler Carruth [Fri, 3 Oct 2014 09:43:23 +0000 (09:43 +0000)]
[x86] Add two more triples to stabilize the precise assembly syntax
across platforms.

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

10 years ago[x86] Remove a couple of fairly pointless tests. These were merely
Chandler Carruth [Fri, 3 Oct 2014 09:43:19 +0000 (09:43 +0000)]
[x86] Remove a couple of fairly pointless tests. These were merely
testing that we generated divps and divss but not in a very systematic
way. There are other tests for widening binary operations already that
make these unnecessary.

The second one seems mostly about testing Atom as well as normal X86,
but despite the comment claiming it is testing a different instruction
sequence, it then tests for exactly the same div instruction sequence!
(The sequence of instructions is actually quite different on Atom, but
not the sequence of div instructions....)

And then it has an "execution" test that simply isn't run? Very strange.
Anyways, none of this is really needed so clean this up.

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

10 years agoRevert r215343.
James Molloy [Fri, 3 Oct 2014 09:29:24 +0000 (09:29 +0000)]
Revert r215343.

This was contentious and needs invesigation.

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

10 years ago[mips] Remove XFAIL from two XPASS'ing tests on the llvm-mips-linux builder
Daniel Sanders [Fri, 3 Oct 2014 08:49:44 +0000 (08:49 +0000)]
[mips] Remove XFAIL from two XPASS'ing tests on the llvm-mips-linux builder

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

10 years ago[x86] Add another triple to a test to make the comment syntax stable.
Chandler Carruth [Fri, 3 Oct 2014 02:06:28 +0000 (02:06 +0000)]
[x86] Add another triple to a test to make the comment syntax stable.
Should fix darwin builders.

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

10 years ago[x86] Add triples to these tests so that we see fewer calling convention
Chandler Carruth [Fri, 3 Oct 2014 02:00:09 +0000 (02:00 +0000)]
[x86] Add triples to these tests so that we see fewer calling convention
differences and they're a bit easier to maintain. This should fix the
tests on cygwin bots, etc.

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

10 years ago[x86] Regenerate precise FileCheck lines for the lats batch of test
Chandler Carruth [Fri, 3 Oct 2014 01:57:38 +0000 (01:57 +0000)]
[x86] Regenerate precise FileCheck lines for the lats batch of test
cases.

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

10 years ago[x86] Remove another low-value test still written using grep. We have
Chandler Carruth [Fri, 3 Oct 2014 01:57:35 +0000 (01:57 +0000)]
[x86] Remove another low-value test still written using grep. We have
many tests for movss and friends.

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

10 years ago[x86] Regenerate precise checks for a couple of test cases and remove
Chandler Carruth [Fri, 3 Oct 2014 01:50:08 +0000 (01:50 +0000)]
[x86] Regenerate precise checks for a couple of test cases and remove
a test case that was just grepping the debug stats output rather than
actually checking the generated code for anything useful.

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

10 years ago[x86] Remove an over-reduced test case. This would need to be
Chandler Carruth [Fri, 3 Oct 2014 01:50:06 +0000 (01:50 +0000)]
[x86] Remove an over-reduced test case. This would need to be
intergrated much more fully into some logical part of the backend to
really understand what it is trying to accomplish and how to update it.
I suspect it no longer holds enough value to be worth having.

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

10 years ago[x86] Regenerate and clean up more tests is preparation for vector
Chandler Carruth [Fri, 3 Oct 2014 01:44:04 +0000 (01:44 +0000)]
[x86] Regenerate and clean up more tests is preparation for vector
shufle switch.

I nuked a win64 config from one test as it doesn't really make sense to
cover that ABI specially for generic v2f32 tests...

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

10 years ago[x86] Cleanup and generate precise FileCheck assertions for a bunch of
Chandler Carruth [Fri, 3 Oct 2014 01:37:58 +0000 (01:37 +0000)]
[x86] Cleanup and generate precise FileCheck assertions for a bunch of
SSE tests.

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

10 years ago[x86] This is a terrible SSE1 test, but we should keep it. I've deleted
Chandler Carruth [Fri, 3 Oct 2014 01:37:56 +0000 (01:37 +0000)]
[x86] This is a terrible SSE1 test, but we should keep it. I've deleted
two functions that really didn't have any interesting assertions, and
generated more precise tests for one of the others.

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

10 years ago[x86] Merge two very similar tests and regenerate FileCheck lines for
Chandler Carruth [Fri, 3 Oct 2014 01:37:53 +0000 (01:37 +0000)]
[x86] Merge two very similar tests and regenerate FileCheck lines for
them.

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

10 years ago[BasicAA] Revert r218714 - Make better use of zext and sign information.
Lang Hames [Fri, 3 Oct 2014 01:33:47 +0000 (01:33 +0000)]
[BasicAA] Revert r218714 - Make better use of zext and sign information.

This patch broke 447.dealII on Darwin. I'm currently working on a reduced
test-case, but reverting for now to keep the bots happy.

<rdar://problem/18530107>

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

10 years ago[x86] Regenerate a number of FileCheck assertions with my script for
Chandler Carruth [Fri, 3 Oct 2014 01:06:32 +0000 (01:06 +0000)]
[x86] Regenerate a number of FileCheck assertions with my script for
test cases that will change with the new vector shuffle lowering. This
gives us a nice baseline for deltas against. I've checked and removed
the cases where there were weird register usage being pinned down, and
all of these are extremely pin-pointed tests so fully checking them
seems very appropriate.

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

10 years ago[x86] Remove a couple of other overly isolated tests that are low-value
Chandler Carruth [Fri, 3 Oct 2014 01:06:30 +0000 (01:06 +0000)]
[x86] Remove a couple of other overly isolated tests that are low-value
at this point. We have lots of tests of peephole optimizations with
insert and extract on vectors.

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

10 years ago[x86] Remove a test that provides little value. There are plenty of
Chandler Carruth [Fri, 3 Oct 2014 01:06:27 +0000 (01:06 +0000)]
[x86] Remove a test that provides little value. There are plenty of
tests for zext of a vector.

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

10 years agoUpdate Atomics.rst
Robin Morisset [Fri, 3 Oct 2014 01:04:20 +0000 (01:04 +0000)]
Update Atomics.rst

Summary:
I changed various bits of the compilation of atomics recently, and forgot
updating the documentation. This patch just brings it up to date.

Test Plan: no change to the code

Reviewers: jfb

Subscribers: llvm-commits

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

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

10 years ago[x86] Regenerate a bunch more avx512 test cases using my script to have
Chandler Carruth [Fri, 3 Oct 2014 00:50:03 +0000 (00:50 +0000)]
[x86] Regenerate a bunch more avx512 test cases using my script to have
tighter, more strict FileCheck assertions. Some of these I really like
as they show case exactly what instruction sequences come out of these
microscopic functionality tests.

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

10 years ago[x86] Regenerate an avx512 test with my script to provide a nice
Chandler Carruth [Fri, 3 Oct 2014 00:44:46 +0000 (00:44 +0000)]
[x86] Regenerate an avx512 test with my script to provide a nice
baseline for updates from the new vector shuffle lowering.

I've inspected the results here, and I couldn't find any register
allocation decisions where there should be any realistic way to register
allocate things differently. The closest was the imul test case. If you
see something here you'd like register number variables on, just shout
and I'll add them.

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

10 years agoconstify TargetMachine parameter.
Eric Christopher [Fri, 3 Oct 2014 00:42:41 +0000 (00:42 +0000)]
constify TargetMachine parameter.

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

10 years agollvm-readobj: print COFF delay-load import table
Rui Ueyama [Fri, 3 Oct 2014 00:41:58 +0000 (00:41 +0000)]
llvm-readobj: print COFF delay-load import table

This patch adds another iterator to access the delay-load import table
and use it from llvm-readobj.

http://reviews.llvm.org/D5594

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

10 years ago[x86] Remove some of the --show-mc-encoding flags from avx512 tests that
Chandler Carruth [Fri, 3 Oct 2014 00:36:29 +0000 (00:36 +0000)]
[x86] Remove some of the --show-mc-encoding flags from avx512 tests that
need to be updated for the new vector shuffle lowering.

After talking to Adam Nemet, Tim Northover, etc., it seems that testing
MC encodings in the same suite as the basic codegen isn't the right
approach. Instead, we're going to want dedicated MC tests for the
encodings. These encodings are starting to get in my way so I wanted to
cut them out early. The total set of instructions that should have
encoding tests added is:

  vpaddd
  vsqrtss
  vsqrtsd
  vmovlhps
  vmovhlps
  valignq
  vbroadcastss

Not too many parts of these tests were even using this. =]

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

10 years agoconstify TargetMachine argument.
Eric Christopher [Fri, 3 Oct 2014 00:17:59 +0000 (00:17 +0000)]
constify TargetMachine argument.

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

10 years agoWe can grab the options struct from the TargetMachine, no need to
Eric Christopher [Fri, 3 Oct 2014 00:10:03 +0000 (00:10 +0000)]
We can grab the options struct from the TargetMachine, no need to
pass it down in the constructor.

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

10 years ago[AVX512] Pull pattern for subvector insert into the instruction definition
Adam Nemet [Thu, 2 Oct 2014 23:18:30 +0000 (23:18 +0000)]
[AVX512] Pull pattern for subvector insert into the instruction definition

No functional change intended.

Very similar to the change I made for subvector extract in r218480.

test/CodeGen/X86/avx512-insert-extract.ll covers this.

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

10 years ago[AVX512] Refactor subvector inserts
Adam Nemet [Thu, 2 Oct 2014 23:18:28 +0000 (23:18 +0000)]
[AVX512] Refactor subvector inserts

No functional change.

Very similar to the extract refactoring I did in r218478.

Compared X86.td.expanded before and after.

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

10 years ago[AVX512] Fix i256mem->f256mem typo in VINSERTF64x4rm
Adam Nemet [Thu, 2 Oct 2014 23:18:26 +0000 (23:18 +0000)]
[AVX512] Fix i256mem->f256mem typo in VINSERTF64x4rm

Just like in the case of extracts, the refactoring is uncovering some typos in
the code.

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

10 years agollvm-readobj: add a test for COFF import-by-ordinal symbols
Rui Ueyama [Thu, 2 Oct 2014 22:40:55 +0000 (22:40 +0000)]
llvm-readobj: add a test for COFF import-by-ordinal symbols

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

10 years ago[PowerPC] Modern Book-E cores support sync
Hal Finkel [Thu, 2 Oct 2014 22:34:22 +0000 (22:34 +0000)]
[PowerPC] Modern Book-E cores support sync

Older Book-E cores, such as the PPC 440, support only msync (which has the same
encoding as sync 0), but not any of the other sync forms. Newer Book-E cores,
however, do support sync, and for performance reasons we should allow the use
of the more-general form.

This refactors msync use into its own feature group so that it applies by
default only to older Book-E cores (of the relevant cores, we only have
definitions for the PPC440/450 currently).

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

10 years ago[Power] Improve the expansion of atomic loads/stores
Robin Morisset [Thu, 2 Oct 2014 22:27:07 +0000 (22:27 +0000)]
[Power] Improve the expansion of atomic loads/stores

Summary:
Atomic loads and store of up to the native size (32 bits, or 64 for PPC64)
can be lowered to a simple load or store instruction (as the synchronization
is already handled by AtomicExpand, and the atomicity is guaranteed thanks to
the alignment requirements of atomic accesses). This is exactly what this patch
does. Previously, these were implemented by complex
load-linked/store-conditional loops.. an obvious performance problem.

For example, this patch turns
```
define void @store_i8_unordered(i8* %mem) {
  store atomic i8 42, i8* %mem unordered, align 1
  ret void
}
```
from
```
_store_i8_unordered:                    ; @store_i8_unordered
; BB#0:
    rlwinm r2, r3, 3, 27, 28
    li r4, 42
    xori r5, r2, 24
    rlwinm r2, r3, 0, 0, 29
    li r3, 255
    slw r4, r4, r5
    slw r3, r3, r5
    and r4, r4, r3
LBB4_1:                                 ; =>This Inner Loop Header: Depth=1
    lwarx r5, 0, r2
    andc r5, r5, r3
    or r5, r4, r5
    stwcx. r5, 0, r2
    bne cr0, LBB4_1
; BB#2:
    blr
```
into
```
_store_i8_unordered:                    ; @store_i8_unordered
; BB#0:
    li r2, 42
    stb r2, 0(r3)
    blr

```
which looks like a pretty clear win to me.

Test Plan:
fixed the tests + new test for indexed accesses + make check-all

Reviewers: jfb, wschmidt, hfinkel

Subscribers: llvm-commits

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

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

10 years agoFix the threshold added in r186434 (a re-apply of r185393) and updaated
Chandler Carruth [Thu, 2 Oct 2014 22:23:14 +0000 (22:23 +0000)]
Fix the threshold added in r186434 (a re-apply of r185393) and updaated
to be a ManagedStatic in r218163 to not be a global variable written and
read to from within the innards of SpillPlacement.

This will fix a really scary race condition for anyone that has two
copies of LLVM running spill placement concurrently. Yikes!

This will also fix a really significant compile time hit that r218163
caused because the spill placement threshold read is actually in the
*very* hot path of this code. The memory fence on each read was showing
up as huge compile time regressions when spilling is responsible for
most of the compile time. For example, optimizing sanitized code showed
over 50% compile time regressions here. =/

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

10 years ago[Stackmaps] Make ithe frame-pointer required for stackmaps.
Juergen Ributzka [Thu, 2 Oct 2014 22:21:49 +0000 (22:21 +0000)]
[Stackmaps] Make ithe frame-pointer required for stackmaps.

Do not eliminate the frame pointer if there is a stackmap or patchpoint in the
function. All stackmap references should be FP relative.

This fixes PR21107.

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

10 years agoRevert "DI: Fold constant arguments into a single MDString"
Duncan P. N. Exon Smith [Thu, 2 Oct 2014 22:15:31 +0000 (22:15 +0000)]
Revert "DI: Fold constant arguments into a single MDString"

This reverts commit r218914 while I investigate some bots.

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

10 years agoRename data -> Data
Rui Ueyama [Thu, 2 Oct 2014 22:13:44 +0000 (22:13 +0000)]
Rename data -> Data

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

10 years agollvm-readobj: print COFF imported symbols
Rui Ueyama [Thu, 2 Oct 2014 22:05:29 +0000 (22:05 +0000)]
llvm-readobj: print COFF imported symbols

This patch defines a new iterator for the imported symbols.
Make a change to COFFDumper to use that iterator to print
out imported symbols and its ordinals.

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

10 years agoDI: Fold constant arguments into a single MDString
Duncan P. N. Exon Smith [Thu, 2 Oct 2014 21:56:57 +0000 (21:56 +0000)]
DI: Fold constant arguments into a single MDString

This patch addresses the first stage of PR17891 by folding constant
arguments together into a single MDString.  Integers are stringified and
a `\0` character is used as a separator.

Part of PR17891.

Note: I've attached my testcases upgrade scripts to the PR.  If I've
just broken your out-of-tree testcases, they might help.

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

10 years ago[x86] Teach the new vector shuffle lowering to widen floating point
Chandler Carruth [Thu, 2 Oct 2014 21:37:14 +0000 (21:37 +0000)]
[x86] Teach the new vector shuffle lowering to widen floating point
elements as well as integer elements in order to form simpler shuffle
patterns.

This is the primary reason why we were failing to match some of the
2-and-2 floating point shuffles such as PR21140. Even after fixing this
we need to support some extra patterns in the backend in order to match
the resulting X86ISD::UNPCKL nodes into the correct instructions. This
commit should fix PR21140 and includes more comprehensive testing of
insertion patterns in v4 shuffles.

Not all of the added tests are beautiful. For example, we don't have
clever instructions to insert-via-load in the integer domain. There are
also some places where we aren't sufficiently cunning with our use of
movq and movd, but that's future work.

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

10 years agoRemove unused function attribute params.
Sanjay Patel [Thu, 2 Oct 2014 21:12:04 +0000 (21:12 +0000)]
Remove unused function attribute params.

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

10 years agoLTO: Document the Boolean argument from r218784
Duncan P. N. Exon Smith [Thu, 2 Oct 2014 21:11:04 +0000 (21:11 +0000)]
LTO: Document the Boolean argument from r218784

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

10 years agoOptimize square root squared (PR21126).
Sanjay Patel [Thu, 2 Oct 2014 21:10:54 +0000 (21:10 +0000)]
Optimize square root squared (PR21126).

When unsafe-fp-math is enabled, we can turn sqrt(X) * sqrt(X) into X.

This can happen in the real world when calculating x ** 3/2. This occurs
in test-suite/SingleSource/Benchmarks/BenchmarkGame/n-body.c.

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

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

10 years ago[x86] Move the vperm2f128 test to be vperm2x128 and test both the
Chandler Carruth [Thu, 2 Oct 2014 20:11:11 +0000 (20:11 +0000)]
[x86] Move the vperm2f128 test to be vperm2x128 and test both the
floating point and integer domains.

Merge the AVX2 test into it and add an extra RUN line. Generate clean
FileCheck statements with my script. Remove the now merged AVX2 tests.

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

10 years agoInstrProf: Avoid linear search in a hot loop
Justin Bogner [Thu, 2 Oct 2014 17:14:18 +0000 (17:14 +0000)]
InstrProf: Avoid linear search in a hot loop

Every time we were adding or removing an expression when generating a
coverage mapping we were doing a linear search to try and deduplicate
the list. The indices in the list are important, so we can't just
replace it by a DenseMap entirely, but an auxilliary DenseMap for fast
lookup massively improves the performance issues I was seeing here.

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

10 years agoThis patch adds a new flag "-coff-imports" to llvm-readobj.
Rui Ueyama [Thu, 2 Oct 2014 17:02:18 +0000 (17:02 +0000)]
This patch adds a new flag "-coff-imports" to llvm-readobj.
When the flag is given, the command prints out the COFF import table.

Currently only the import table directory will be printed.
I'm going to make another patch to print out the imported symbols.

The implementation of import directory entry iterator in
COFFObjectFile.cpp was buggy. This patch fixes that too.

http://reviews.llvm.org/D5569

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

10 years agoReapply "InstrProf: Don't keep a large sparse list around just to zero it"
Justin Bogner [Thu, 2 Oct 2014 16:43:31 +0000 (16:43 +0000)]
Reapply "InstrProf: Don't keep a large sparse list around just to zero it"

When I was preparing r218879 for commit, I removed an early return
that I decided was just noise. It wasn't. This is r218879 no-crash
edition.

This reverts commit r218881, reapplying r218879.

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

10 years agoRemove an extra whitespace.
Adrian Prantl [Thu, 2 Oct 2014 16:42:15 +0000 (16:42 +0000)]
Remove an extra whitespace.

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

10 years agoPretty-printer: Paper over an ambiguity between line table entries
Adrian Prantl [Thu, 2 Oct 2014 16:42:13 +0000 (16:42 +0000)]
Pretty-printer: Paper over an ambiguity between line table entries
and tagged mdnodes.

fixes http://llvm.org/bugs/show_bug.cgi?id=21131

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

10 years agoRevert "InstrProf: Don't keep a large sparse list around just to zero it"
Justin Bogner [Thu, 2 Oct 2014 16:15:27 +0000 (16:15 +0000)]
Revert "InstrProf: Don't keep a large sparse list around just to zero it"

This seems to be crashing on some buildbots. Reverting to investigate.

This reverts commit r218879.

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

10 years agoInstrProf: Don't keep a large sparse list around just to zero it
Justin Bogner [Thu, 2 Oct 2014 16:04:03 +0000 (16:04 +0000)]
InstrProf: Don't keep a large sparse list around just to zero it

The Terms vector here represented a polynomial of of all possible
counters, and is used to simplify expressions when generating coverage
mapping. There are a few problems with this:

1. Keeping the vector as a member is wasteful, since we clear it every
   time we use it.
2. Most expressions refer to a subset of the counters, so we end up
   iterating over a large number of zeros doing nothing a lot of the
   time.

This updates the user of the vector to store the terms locally, and
uses a sort and combine approach so that we only operate on counters
that are actually used in a given expression. For small cases this
makes very little difference, but in cases with a very large number of
counted regions this is a significant performance fix.

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

10 years agoUse the local variable that other clauses around here are already using.
Sanjay Patel [Thu, 2 Oct 2014 15:20:45 +0000 (15:20 +0000)]
Use the local variable that other clauses around here are already using.

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

10 years agoRemove duplicate function names from comments. NFC.
Sanjay Patel [Thu, 2 Oct 2014 15:13:22 +0000 (15:13 +0000)]
Remove duplicate function names from comments. NFC.

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

10 years ago[NVPTX] Remove dead code.
Tilmann Scheller [Thu, 2 Oct 2014 15:12:48 +0000 (15:12 +0000)]
[NVPTX] Remove dead code.

Found by the Clang static analyzer.

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

10 years agoSupport padding unaligned data in .text.
Joerg Sonnenberger [Thu, 2 Oct 2014 13:41:42 +0000 (13:41 +0000)]
Support padding unaligned data in .text.

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

10 years agoSilence a -Wsign-compare warning. NFC.
Aaron Ballman [Thu, 2 Oct 2014 13:17:11 +0000 (13:17 +0000)]
Silence a -Wsign-compare warning. NFC.

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

10 years ago[BUG][INDVAR] Fix for PR21014: wrong SCEV operands commuting for non-commutative...
Zinovy Nis [Thu, 2 Oct 2014 13:01:15 +0000 (13:01 +0000)]
[BUG][INDVAR] Fix for PR21014: wrong SCEV operands commuting for non-commutative instructions

My commit rL216160 introduced a bug PR21014: IndVars widens code 'for (i = ; i < ...; i++) arr[ CONST - i]' into 'for (i = ; i < ...; i++) arr[ i - CONST]'
thus inverting index expression. This patch fixes it.
Thanks to Jörg Sonnenberger for pointing.

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

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

10 years ago[x86] Just delete the last combine test file.
Chandler Carruth [Thu, 2 Oct 2014 08:05:57 +0000 (08:05 +0000)]
[x86] Just delete the last combine test file.

This file isn't really doing anything useful. Many of the tests that
seem to be combined are also repeats from other test files. Many of the
other tests, despite the comment that they should be combined into
a single shuffle... well... aren't combined into a single shuffle.
=/

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

10 years ago[x86] Merge still more combine tests into the common file. These at
Chandler Carruth [Thu, 2 Oct 2014 08:02:34 +0000 (08:02 +0000)]
[x86] Merge still more combine tests into the common file. These at
least seem *slightly* more interesting test wise, although given how
spotily we actually combine anything, I remain somewhat suspicious.

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

10 years ago[x86] Merge the third combining test into the generic one and add proper
Chandler Carruth [Thu, 2 Oct 2014 07:56:47 +0000 (07:56 +0000)]
[x86] Merge the third combining test into the generic one and add proper
checks for all the ISA variants.

If the SSE2 checks here terrify you, good. This is (in large part) the
kind of amazingly bad code that is holding LLVM back when vectorizing on
older ISAs.

At the same time, these tests seem increasingly dubious to me. There are
a very large number of tests and it isn't clear that they are
systematically covering a specific set of functionality. Anyways,
I don't want to reduce testing during the transition, I just want to
consolidate it to where it is easier to manage.

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

10 years ago[x86] Merge the second set of vector combining tests into a common test
Chandler Carruth [Thu, 2 Oct 2014 07:42:58 +0000 (07:42 +0000)]
[x86] Merge the second set of vector combining tests into a common test
file.

Some of these really don't make sense to test -- we're testing for the
*lack* of combining two shuffles into one, presumably because the two
would generate better shuffles in the end. But if you look at the
generated code shown here, in many cases the generated code is, frankly,
terrible. Or we combine any two generated shuffles back into a single
instruction! I've left a FIXME to revisit these decisions.

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

10 years ago[x86] Merge the bitwise operation shuffle combining into the common test
Chandler Carruth [Thu, 2 Oct 2014 07:30:24 +0000 (07:30 +0000)]
[x86] Merge the bitwise operation shuffle combining into the common test
file, adding assertions across the ISA variants for it.

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

10 years ago[x86] Update this test to run a full complement of the ISA extensions,
Chandler Carruth [Thu, 2 Oct 2014 07:22:26 +0000 (07:22 +0000)]
[x86] Update this test to run a full complement of the ISA extensions,
and use the new grouped FileCheck patterns to match them.

No interesting changes yet, but this test is now in proper form to have
the other shuffle combining tests merged into it.

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

10 years ago[x86] Minimize the parameters to this test for clarity.
Chandler Carruth [Thu, 2 Oct 2014 07:17:15 +0000 (07:17 +0000)]
[x86] Minimize the parameters to this test for clarity.

The test has to do with DAG combines, and so it doesn't need the new
vector shuffle lowering to be effective. Also, it has a nice in-IR
triple string which we should really be using rather than command line
flags (unless it varies form RUN-line to RUN-line). Finally, I much
prefer letting LLVM synthesize the correct datalayout string from the
triple rather than baking one in here that will just become stale.

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

10 years ago[x86] Add a comment clarifying that this test should span all manners of
Chandler Carruth [Thu, 2 Oct 2014 07:13:25 +0000 (07:13 +0000)]
[x86] Add a comment clarifying that this test should span all manners of
generic DAG combining of shuffles relevant to x86.

My plan is to fold a bunch of the other DAG combining test cases into
this one, while converting them to use the nice new FileCheck assertion
syntax.

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