119579 Commits

Author SHA1 Message Date
Daniel Sanders
ce13b919e6 Merging r243745:
------------------------------------------------------------------------
r243745 | dsanders | 2015-07-31 13:58:55 +0100 (Fri, 31 Jul 2015) | 17 lines

[regalloc] Make RegMask clobbers prevent merging vreg's into PhysRegs when hoisting def's upwards.

Summary:
This prevents vreg260 and D7 from being merged in:
  %vreg260<def> = LDC1 ...
  JAL <ga:@sin>, <regmask ... list not containing D7 ...>
  %D7<def> = COPY %vreg260; ...
Doing so is not valid because the JAL clobbers the D7.

This fixes the almabench regression in the LLVM 3.7.0 release branch.

Reviewers: MatzeB

Subscribers: MatzeB, qcolombet, hans, llvm-commits

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

------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@243834 91177308-0d34-0410-b5e6-96231b3b80d8
2015-08-01 14:01:00 +00:00
Daniel Sanders
179f1e76c8 [mips] Add Fast ISel support to the release notes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@243742 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-31 10:48:19 +00:00
Hans Wennborg
ce540c1084 Merging r243057:
------------------------------------------------------------------------
r243057 | spatel | 2015-07-23 15:56:53 -0700 (Thu, 23 Jul 2015) | 16 lines

fix crash in machine trace metrics due to processing dbg_value instructions (PR24199)

The test in PR24199 ( https://llvm.org/bugs/show_bug.cgi?id=24199 ) crashes because machine
trace metrics was not ignoring dbg_value instructions when calculating data dependencies.

The machine-combiner pass asks machine trace metrics to calculate an instruction trace, 
does some reassociations, and calls MachineInstr::eraseFromParentAndMarkDBGValuesForRemoval()
along with MachineTraceMetrics::invalidate(). The dbg_value instructions have their operands
invalidated, but the instructions are not expected to be deleted.

On a subsequent loop iteration of the machine-combiner pass, machine trace metrics would be
called again and die while accessing the invalid debug instructions.

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


------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@243662 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-30 17:17:47 +00:00
Hans Wennborg
0a50900919 Merging r243589 and r243609:
------------------------------------------------------------------------
r243589 | lhames | 2015-07-29 16:12:33 -0700 (Wed, 29 Jul 2015) | 6 lines

[MCJIT] Fix PR20656 by teaching MCJIT to honor ExecutionEngine's global mapping.

This is important for users of the C API who can't supply custom symbol
resolvers yet.
------------------------------------------------------------------------

------------------------------------------------------------------------
r243609 | lhames | 2015-07-29 19:05:37 -0700 (Wed, 29 Jul 2015) | 2 lines

[MCJIT] Fix a memory leak in a unit test that was introduced in r243589.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@243655 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-30 16:31:16 +00:00
Hans Wennborg
d0702afadf Merging r243638 and r243640:
------------------------------------------------------------------------
r243638 | vkalintiris | 2015-07-30 05:39:33 -0700 (Thu, 30 Jul 2015) | 12 lines

[mips][FastISel] Remove hidden mips-fast-isel option.

Summary:
This hidden option would disable code generation through FastISel by
default. It was removed from the available options and from the
Fast-ISel tests that required it in order to run the tests.

Reviewers: dsanders

Subscribers: qcolombet, llvm-commits

Differential Revision: http://reviews.llvm.org/D11610
------------------------------------------------------------------------

------------------------------------------------------------------------
r243640 | vkalintiris | 2015-07-30 06:13:09 -0700 (Thu, 30 Jul 2015) | 5 lines

[mips] Fix out-of-date debug information in test file.

Update the debug info in the check-lines because the change in r243638
introduced a constant initialization before the prologue's end as part
of a register spill.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@243650 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-30 16:18:53 +00:00
Hans Wennborg
6055b680c7 Merging r243636:
------------------------------------------------------------------------
r243636 | vkalintiris | 2015-07-30 04:51:44 -0700 (Thu, 30 Jul 2015) | 34 lines

[mips][FastISel] Apply only zero-extension to constants prior to their materialization.

Summary:
Previously, we would sign-extend non-boolean negative constants and
zero-extend otherwise. This was problematic for PHI instructions with
negative values that had a type with bitwidth less than that of the
register used for materialization.

More specifically, ComputePHILiveOutRegInfo() assumes the constants
present in a PHI node are zero extended in their container and
afterwards deduces the known bits.

For example, previously we would materialize an i16 -4 with the
following instruction:

  addiu $r, $zero, -4

The register would end-up with the 32-bit 2's complement representation
of -4. However, ComputePHILiveOutRegInfo() would generate a constant
with the upper 16-bits set to zero. The SelectionDAG builder would use
that information to generate an AssertZero node that would remove any
subsequent trunc & zero_extend nodes.

In theory, we should modify ComputePHILiveOutRegInfo() to consult
target-specific hooks about the way they prefer to materialize the
given constants. However, git-blame reports that this specific code
has not been touched since 2011 and it seems to be working well for every
target so far.

Reviewers: dsanders

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D11592
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@243648 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-30 16:16:42 +00:00
Hans Wennborg
dc99a4f513 Merging r243485:
------------------------------------------------------------------------
r243485 | vkalintiris | 2015-07-28 14:43:31 -0700 (Tue, 28 Jul 2015) | 12 lines

[mips][FastISel] Fix call lowering by bailing out on "fastcc" calls.

Summary:
Currently, we support only the MIPS O32 ABI calling convention for call
lowering. With this change we avoid using the O32 calling convetion for
lowering calls marked as using the fast calling convention.

Reviewers: dsanders

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D11515
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@243647 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-30 16:15:22 +00:00
Hans Wennborg
53a63a9874 Merging r243469:
------------------------------------------------------------------------
r243469 | vkalintiris | 2015-07-28 12:57:25 -0700 (Tue, 28 Jul 2015) | 12 lines

[mips][FastISel] Fix generated code for IR's select instruction.

Summary:
Generate correct code for the select instruction by zero-extending
it's boolean/condition operand to GPR-width. This is necessary because
the conditional-move instructions operate on the whole register.

Reviewers: dsanders

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D11506
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@243646 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-30 16:14:05 +00:00
Daniel Sanders
1166c1fefd Merging r243633:
------------------------------------------------------------------------
r243633 | dsanders | 2015-07-30 11:14:57 +0100 (Thu, 30 Jul 2015) | 11 lines

[test-release.sh] Add -no-libunwind to disable it on targets that don't support it.

Summary:
Mips doesn't implement unw_getcontext() or libunwind::Registers_*::jumpto() yet
so we must disable libunwind for this release.

Reviewers: hans

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D11563
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@243634 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-30 10:17:28 +00:00
Daniel Sanders
d90468b814 [mips] Remove libunwind from the list of new features.
The context save and restore functions have not yet been implemented for MIPS
so it will be disabled for this release.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@243631 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-30 10:10:42 +00:00
Hans Wennborg
37d060437b Merging r243531:
------------------------------------------------------------------------
r243531 | hans | 2015-07-29 09:29:06 -0700 (Wed, 29 Jul 2015) | 7 lines

test-release.sh: Add option for building the OpenMP run-time

This isn't part of the official release process, but provides a convenient way
to build binaries for those who want to experiment with it. Hopefully the run-
time can be part of the regular build and release process for 3.8.

Differential Revision: http://reviews.llvm.org/D11494
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@243537 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-29 16:41:50 +00:00
Hans Wennborg
61c6f9e581 Merging r243519:
------------------------------------------------------------------------
r243519 | wschmidt | 2015-07-29 07:31:57 -0700 (Wed, 29 Jul 2015) | 14 lines

[PPC] Fix PR24216: Don't generate splat for misaligned shuffle mask

Given certain shuffle-vector masks, LLVM emits splat instructions
which splat the wrong bytes from the source register.  The issue is
that the function PPC::isSplatShuffleMask() in PPCISelLowering.cpp
does not ensure that the splat pattern found is requesting bytes that
are aligned on an EltSize boundary.  This patch detects this situation
as not a valid splat mask, resulting in a permute being generated
instead of a splat.

Patch and test case by Tyler Kenney, cleaned up a bit by me.

This is a simple bug fix that would be good to incorporate into 3.7.

------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@243528 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-29 15:58:34 +00:00
Hans Wennborg
1008467523 Merging r243500: (conflicts resolved manually since the branch doesn't have r243293)
------------------------------------------------------------------------
r243500 | spatel | 2015-07-28 16:28:22 -0700 (Tue, 28 Jul 2015) | 16 lines

ignore duplicate divisor uses when transforming into reciprocal multiplies (PR24141)

PR24141: https://llvm.org/bugs/show_bug.cgi?id=24141
contains a test case where we have duplicate entries in a node's uses() list.

After r241826, we use CombineTo() to delete dead nodes when combining the uses into
reciprocal multiplies, but this fails if we encounter the just-deleted node again in
the list.

The solution in this patch is to not add duplicate entries to the list of users that
we will subsequently iterate over. For the test case, this avoids triggering the
combine divisors logic entirely because there really is only one user of the divisor.

Differential Revision: http://reviews.llvm.org/D11345
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@243524 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-29 15:38:37 +00:00
Hans Wennborg
d6482ace16 Merging r243361:
------------------------------------------------------------------------
r243361 | spatel | 2015-07-27 17:48:32 -0700 (Mon, 27 Jul 2015) | 17 lines

fix invalid load folding with SSE/AVX FP logical instructions (PR22371)

This is a follow-up to the FIXME that was added with D7474 ( http://reviews.llvm.org/rL229531 ).
I thought this load folding bug had been made hard-to-hit, but it turns out to be very easy
when targeting 32-bit x86 and causes a miscompile/crash in Wine:
https://bugs.winehq.org/show_bug.cgi?id=38826
https://llvm.org/bugs/show_bug.cgi?id=22371#c25

The quick fix is to simply remove the scalar FP logical instructions from the load folding table
in X86InstrInfo, but that causes us to miss load folds that should be possible when lowering fabs,
fneg, fcopysign. So the majority of this patch is altering those lowerings to use *vector* FP
logical instructions (because that's all x86 gives us anyway). That lets us do the load folding 
legally.

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


------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@243435 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-28 16:20:00 +00:00
Daniel Sanders
8e267d85ff [mips] Update release notes for 3.7.0 release.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@243404 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-28 10:40:37 +00:00
Hans Wennborg
f09b9c933a Merging r243294:
------------------------------------------------------------------------
r243294 | mareko | 2015-07-27 11:16:08 -0700 (Mon, 27 Jul 2015) | 9 lines

AMDGPU: don't match vgpr loads for constant loads

Author: Dave Airlie <airlied@redhat.com>

In order to implement indirect sampler loads, we don't
want to match on a VGPR load but an SGPR one for constants,
as we cannot feed VGPRs to the sampler only SGPRs.

this should be applicable for llvm 3.7 as well.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@243317 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-27 20:19:04 +00:00
Hans Wennborg
f4c16a9237 Merging r243263:
------------------------------------------------------------------------
r243263 | mareko | 2015-07-27 04:37:42 -0700 (Mon, 27 Jul 2015) | 3 lines

AMDGPU/SI: Fix the V_FRACT_F64 SI bug workaround

This is a candidate for 3.7.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@243316 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-27 20:17:19 +00:00
Hans Wennborg
e30be6c5d5 Merging r243116:
------------------------------------------------------------------------
r243116 | hans | 2015-07-24 09:16:09 -0700 (Fri, 24 Jul 2015) | 10 lines

test-release.sh: Defer test errors until the end

This makes the script run to the end and produce tarballs even on test
failures, and then highlights any errors afterwards.

(I first tried just storing the errors in a global variable, but that
didn't work as the "test_llvmCore" function invocation is actually
running as a sub-shell.)

Differential Revision: http://reviews.llvm.org/D11478
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@243117 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-24 16:19:43 +00:00
Hans Wennborg
9dd0401722 Merging r243001:
------------------------------------------------------------------------
r243001 | mkuper | 2015-07-23 03:23:48 -0700 (Thu, 23 Jul 2015) | 4 lines

[X86] Fix order of operands for ins and outs instructions when parsing intel syntax

Patch by: marina.yatsina@intel.com
Differential Revision: http://reviews.llvm.org/D11337
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@243027 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-23 17:50:15 +00:00
Hans Wennborg
c25b016342 Merging r242993:
------------------------------------------------------------------------
r242993 | yrnkrn | 2015-07-23 01:06:12 -0700 (Thu, 23 Jul 2015) | 11 lines

Avoid using -Wl,-z,defs on Cygwin.

Prior to CMAKE 2.8.4 that was covered by the WIN32 conditional but
from 2.8.4 CMAKE no longer defined WIN32 when running under Cygwin
and it needs its own test.

Patch by Martell Malone!

http://reviews.llvm.org/D11347


------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@243023 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-23 16:14:09 +00:00
Hans Wennborg
752c93d644 Add a few items to the 3.7 release note, from Rafael
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@242962 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-22 23:15:32 +00:00
Hans Wennborg
b82e29643e Merging r242919:
------------------------------------------------------------------------
r242919 | rengolin | 2015-07-22 11:21:39 -0700 (Wed, 22 Jul 2015) | 8 lines

[Release] Allow release testers to disable certain components

Not all components build correctly on all targets and the release
script had no way to disable them other than editing the script locally.

This change provides a way to disable the test-suite, compiler-rt and
the libraries, as well as allowing you to re-run on the same directory
without checking out all sources again.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@242937 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-22 21:11:41 +00:00
Hans Wennborg
da703df511 Merging r242869:
------------------------------------------------------------------------
r242869 | chandlerc | 2015-07-21 20:32:42 -0700 (Tue, 21 Jul 2015) | 60 lines

[SROA] Fix a nasty pile of bugs to do with big-endian, different alloca
types and loads, loads or stores widened past the size of an alloca,
etc.

This started off with a bug report about big-endian behavior with
bitfields and loads and stores to a { i32, i24 } struct. An initial
attempt to fix this was sent for review in D10357, but that didn't
really get to the root of the problem.

The core issue was that canConvertValue and convertValue in SROA were
handling different bitwidth integers by doing a zext of the integer. It
wouldn't do a trunc though, only a zext! This would in turn lead SROA to
form an i24 load from an i24 alloca, zext it to i32, and then use it.
This would at least produce the wrong value for big-endian systems.

One of my many false starts here was to correct the computation for
big-endian systems by shifting. But this doesn't actually work because
the original code has a 64-bit store to the entire 8 bytes, and a 32-bit
load of the last 4 bytes, and because the alloc size is 8 bytes, we
can't lose that last (least significant if bigendian) byte! The real
problem here is that we're forming an i24 load in SROA which is actually
not sufficiently wide to load all of the necessary bits here. The source
has an i32 load, and SROA needs to form that as well.

The straightforward way to do this is to disable the zext logic in
canConvertValue and convertValue, forcing us to actually load all
32-bits. This seems like a really good change, but it in turn breaks
several other parts of SROA.

First in the chain of knock-on failures, we had places where we were
doing integer-widening promotion even though some of the integer loads
or stores extended *past the end* of the alloca's memory! There was even
a comment about preventing this, but it only prevented the case where
the type had a different bit size from its store size. So I added checks
to handle the cases where we actually have a widened load or store and
to avoid trying to special integer widening promotion in those cases.

Second, we actually rely on the ability to promote in the face of loads
past the end of an alloca! This is important so that we can (for
example) speculate loads around PHI nodes to do more promotion. The bits
loaded are garbage, but as long as they aren't used and the alignment is
suitable high (which it wasn't in the test case!) this is "fine". And we
can't stop promoting here, lots of things stop working well if we do. So
we need to add specific logic to handle the extension (and truncation)
case, but *only* where that extension or truncation are over bytes that
*are outside the alloca's allocated storage* and thus totally bogus to
load or store.

And of course, once we add back this correct handling of extension or
truncation, we need to correctly handle bigendian systems to avoid
re-introducing the exact bug that started us off on this chain of misery
in the first place, but this time even more subtle as it only happens
along speculated loads atop a PHI node.

I've ported an existing test for PHI speculation to the big-endian test
file and checked that we get that part correct, and I've added several
more interesting big-endian test cases that should help check that we're
getting this correct.

Fun times.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@242924 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-22 18:50:31 +00:00
Hans Wennborg
ab8b2f1f64 Merge r242733, r242734, r242735 and r242742
(r242742 is the interesting patch here, but I picked the others too to get a clean
 merge since there's been some back-and-forth on this file.)


------------------------------------------------------------------------
r242733 | matze | 2015-07-20 16:17:14 -0700 (Mon, 20 Jul 2015) | 3 lines

Revert "ARM: Use SpecificBumpPtrAllocator to fix leak introduced in r241920"

This reverts commit r241951. It caused http://llvm.org/PR24190
------------------------------------------------------------------------

------------------------------------------------------------------------
r242734 | matze | 2015-07-20 16:17:16 -0700 (Mon, 20 Jul 2015) | 3 lines

Revert "ARMLoadStoreOpt: Merge subs/adds into LDRD/STRD; Factor out common code"

This reverts commit r241928. This caused http://llvm.org/PR24190
------------------------------------------------------------------------

------------------------------------------------------------------------
r242735 | matze | 2015-07-20 16:17:20 -0700 (Mon, 20 Jul 2015) | 3 lines

Revert "ARMLoadStoreOptimizer: Create LDRD/STRD on thumb2"

This reverts commit r241926. This caused http://llvm.org/PR24190
------------------------------------------------------------------------

------------------------------------------------------------------------
r242742 | matze | 2015-07-20 17:18:59 -0700 (Mon, 20 Jul 2015) | 7 lines

ARMLoadStoreOptimizer: Create LDRD/STRD on thumb2

Re-apply r241926 with an additional check that r13 and r15 are not used
for LDRD/STRD. See http://llvm.org/PR24190. This also already includes
the fix from r241951.

Differential Revision: http://reviews.llvm.org/D10623
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@242907 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-22 16:13:29 +00:00
Hans Wennborg
1761bba3dc Merging r242722:
------------------------------------------------------------------------
r242722 | dim | 2015-07-20 15:24:40 -0700 (Mon, 20 Jul 2015) | 6 lines

Avoid early pipefail exits due to grep failures in stage comparisons.

If objects or executables did not contain any RPATH, grep would return
nonzero, and the whole stage comparison loop would unexpectedly exit.
Fix this by checking the grep result explicitly.

------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@242861 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-22 00:48:46 +00:00
Hans Wennborg
8715f45dbc Merging r242721:
------------------------------------------------------------------------
r242721 | dim | 2015-07-20 15:07:27 -0700 (Mon, 20 Jul 2015) | 4 lines

Since BSD cmp(1) does not support the --ignore-initial option, use the
more portable 3rd and 4th arguments to skip the first 16 bytes during
the comparison of Phase2 and Phase3 objects.

------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@242860 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-22 00:48:18 +00:00
Hans Wennborg
4c2521f815 Merging r242706:
------------------------------------------------------------------------
r242706 | hans | 2015-07-20 13:36:21 -0700 (Mon, 20 Jul 2015) | 1 line

test-release.sh: don't include /usr/local prefix in the tarball
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@242859 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-22 00:47:53 +00:00
Hans Wennborg
db5f467332 Merging r242680:
------------------------------------------------------------------------
r242680 | wschmidt | 2015-07-20 08:43:21 -0700 (Mon, 20 Jul 2015) | 1 line

Add missing test for r242296 (vec_sld)
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@242686 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-20 16:47:36 +00:00
Hans Wennborg
b26a5f5b1e Merging r242673:
------------------------------------------------------------------------
r242673 | tstellar | 2015-07-20 07:28:41 -0700 (Mon, 20 Jul 2015) | 11 lines

AMDGPU/SI: Add VI patterns to select FLAT instructions for global memory ops

Summary:
The MUBUF addr64 bit has been removed on VI, so we must use FLAT
instructions when the pointer is stored in VGPRs.

Reviewers: arsenm

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D11067
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@242685 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-20 16:46:01 +00:00
Hans Wennborg
dffc572cbe Merging r242434:
------------------------------------------------------------------------
r242434 | tstellar | 2015-07-16 12:40:09 -0700 (Thu, 16 Jul 2015) | 7 lines

AMDPGU/SI: Negative offsets aren't allowed in MUBUF's vaddr operand

Reviewers: arsenm

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D11226
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@242684 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-20 16:43:33 +00:00
Hans Wennborg
233a49cc75 Merging r242433:
------------------------------------------------------------------------
r242433 | tstellar | 2015-07-16 12:40:07 -0700 (Thu, 16 Jul 2015) | 11 lines

AMDPGU/SI: Use AssertZext node to mask high bit for scratch offsets

Summary:
We can safely assume that the high bit of scratch offsets will never
be set, because this would require at least 128 GB of GPU memory.

Reviewers: arsenm

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D11225
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@242683 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-20 16:41:33 +00:00
Hans Wennborg
84e40c817b Merging r242281:
------------------------------------------------------------------------
r242281 | chandlerc | 2015-07-15 01:53:29 -0700 (Wed, 15 Jul 2015) | 21 lines

[PM/AA] Fix *numerous* serious bugs in GlobalsModRef found by
inspection.

While we want to handle calls specially in this code because they should
have been modeled by the call graph analysis that precedes it, we should
*not* be re-implementing the predicates for whether an instruction reads
or writes memory. Those are well defined already. Notably, at least the
following issues seem to be clearly missed before:
- Ordered atomic loads can "write" to memory by causing writes from other
  threads to become visible. Similarly for ordered atomic stores.
- AtomicRMW instructions quite obviously both read and write to memory.
- AtomicCmpXchg instructions also read and write to memory.
- Fences read and write to memory.
- Invokes of intrinsics or memory allocation functions.

I don't have any test cases, and I suspect this has never really come up
in the real world. But there is no reason why it wouldn't, and it makes
the code simpler to do this the right way.

While here, I've tried to make the loops significantly simpler as well
and added helpful comments as to what is going on.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@242570 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-17 20:36:58 +00:00
Hans Wennborg
6884a72b55 Merging r242543:
------------------------------------------------------------------------
r242543 | hans | 2015-07-17 09:49:59 -0700 (Fri, 17 Jul 2015) | 1 line

Add libunwind to the release scripts
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@242544 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-17 16:50:50 +00:00
Hans Wennborg
4d4bc2be01 Merging r242296:
------------------------------------------------------------------------
r242296 | wschmidt | 2015-07-15 08:45:30 -0700 (Wed, 15 Jul 2015) | 37 lines

[PPC64LE] Fix vec_sld semantics for little endian

The vec_sld interface provides access to the vsldoi instruction.
Unlike most of the vec_* interfaces, we do not attempt to change the
generated code for vec_sld based on the endian mode.  It is too
difficult to correctly infer the desired semantics because of
different element types, and the corrected instruction sequence is
expensive, involving loading a permute control vector and performing a
generalized permute.

For GCC, this was implemented as "Don't touch the vec_sld"
implementation.  When it came time for the LLVM implementation, I did
the same thing.  However, this was hasty and incorrect.  In LLVM's
version of altivec.h, vec_sld was previously defined in terms of the
vec_perm interface.  Because vec_perm semantics are adjusted for
little endian, this means that leaving vec_sld untouched causes it to
generate something different for LE than for BE.  Not good.

This back-end patch accompanies the changes to altivec.h that change
vec_sld's behavior for little endian.  Those changes mean that we see
slightly different code in the back end when trying to recognize a
VSLDOI instruction in isVSLDOIShuffleMask.  In particular, a
ShuffleKind of 1 (where the two inputs are identical) must now be
treated the same way as a ShuffleKind of 2 (little endian with
different inputs) when little endian mode is in force.  This is
because ShuffleKind of 1 is defined using big-endian numbering.

This has a ripple effect on LowerBUILD_VECTOR, where we create our own
internal VSLDOI instructions.  Because these are a ShuffleKind of 1,
they will now have their shift amounts subtracted from 16 when
recognizing the shuffle mask.  To avoid problems we have to subtract
them from 16 again before creating the VSLDOI instructions.

There are a couple of other uses of BuildVSLDOI, but these do not need
to be modified because the shift amount is 8, which is unchanged when
subtracted from 16.

------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@242530 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-17 15:57:16 +00:00
Hans Wennborg
352222f455 Merging r242236:
------------------------------------------------------------------------
r242236 | rafael | 2015-07-14 15:42:21 -0700 (Tue, 14 Jul 2015) | 1 line

Accept lower case to handle windows error messages.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@242527 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-17 15:41:11 +00:00
Hans Wennborg
62d7c49b50 Merging r242412:
------------------------------------------------------------------------
r242412 | tstellar | 2015-07-16 09:13:34 -0700 (Thu, 16 Jul 2015) | 3 lines

AMDGPU/R600: Remove unused variable

This fixes a warning introduced by r242410.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@242455 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-16 22:14:55 +00:00
Hans Wennborg
6e4912e118 Merging r242410:
------------------------------------------------------------------------
r242410 | tstellar | 2015-07-16 08:38:29 -0700 (Thu, 16 Jul 2015) | 13 lines

AMDPGU/R600: Replace llvm_unreachable() call with LLVMContext::emitError()

Summary:
This fixes an issue on MIPS where the infinite-loop-evergreen.ll test
was failing to terminate.

Fixes PR24147.

Reviewers: arsenm, dsanders

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D11260
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@242453 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-16 22:13:13 +00:00
Hans Wennborg
bd53caa737 Merging r242442:
------------------------------------------------------------------------
r242442 | wschmidt | 2015-07-16 14:14:07 -0700 (Thu, 16 Jul 2015) | 14 lines

[PowerPC] v4i32 is a VSRCRegClass

I was looking at some vector code generation and kept seeing
unnecessary vector copies into the Altivec half of the VSX registers.
I discovered that we overlooked v4i32 when adding the register classes
for VSX; we only added v4f32 and v2f64.  This means that anything that
canonicalizes into v4i32 (which is a LOT of stuff) ends up being
forced into VRRC on its way to VSRC.

The fix is one line.  The rest of the patch is fixing up some test
cases whose code generation has changed as a result.

This seems like it would be a good candidate for backport to 3.7.

------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@242447 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-16 21:41:21 +00:00
Bill Schmidt
4998fdb3fa Add some more PowerPC release notes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@242408 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-16 15:18:28 +00:00
Bill Schmidt
09eff6e2f0 Add PowerPC release notes for 3.7
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@242407 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-16 15:15:38 +00:00
Hans Wennborg
371e0062a4 Merging r242341:
------------------------------------------------------------------------
r242341 | hans | 2015-07-15 15:18:25 -0700 (Wed, 15 Jul 2015) | 7 lines

test-release.sh: Run both .o files through sed before comparing them

On some systems (e.g. Mac OS X), sed will add a newline to the end of
the output if there wasn't one already. This would cause false
cmp errors since the .o file from Phase 2 was passed through sed and
the one from Phase 3 wasn't. Work around this by passing both through
sed.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@242361 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-16 00:14:40 +00:00
Hans Wennborg
789b63a150 Merging r242331:
------------------------------------------------------------------------
r242331 | hans | 2015-07-15 14:06:16 -0700 (Wed, 15 Jul 2015) | 17 lines

Switch the release script to build with CMake by default (PR21561)

It retains the possibility to use the autoconf build with a
command-line option ('-use-autoconf'), and uses that by default on Darwin since
compiler-rt requires it on that platform.

This commit also removes the "Release-64" flavour and related logic. The script
would previously do two builds unless the '-no-64bit' flag was passed, but on
my machine and from those I asked this always ended up producing two 64-bit builds,
causing much confusion.

It also removes the -build-triple option, which caused the --build= flag to
get passed to ./configure. This was presumably intended for cross-compiling,
but none of the release testers use it. If someone does want to pass it,
they can use '-configure-flags --build=foo' instead.

Differential Revision: http://reviews.llvm.org/D10715
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@242360 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-16 00:14:12 +00:00
Hans Wennborg
befaca2f23 Merging r242288:
------------------------------------------------------------------------
r242288 | d0k | 2015-07-15 05:56:19 -0700 (Wed, 15 Jul 2015) | 3 lines

[PPC] Disassemble little endian ppc instructions in the right byte order

PR24122. The test is simply a byte swapped version of ppc64-encoding.txt.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@242327 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-15 20:35:58 +00:00
Hans Wennborg
445ea38ee9 Merging r242239:
------------------------------------------------------------------------
r242239 | hfinkel | 2015-07-14 15:53:11 -0700 (Tue, 14 Jul 2015) | 4 lines

[PowerPC] Support symbolic targets in patchpoints

Follow-up r235483, with the corresponding support in PPC. We use a regular call
for symbolic targets (because they're much cheaper than indirect calls).
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@242325 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-15 20:27:43 +00:00
Hans Wennborg
abdaa238fd Change version from '3.7.0svn' to '3.7.0'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@242251 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-14 23:54:34 +00:00
Hans Wennborg
66ec8af1a1 Creating release_37 branch off revision 242221
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@242224 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-14 22:37:21 +00:00
Adam Nemet
c2944f6690 [LAA] Turn RuntimePointerChecking into a class, start hiding things, NFC
The goal is to start hiding internal APIs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242220 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-14 22:32:52 +00:00
Adam Nemet
00b675df73 [LAA] Introduce RuntimePointerChecking::PointerInfo, NFC
Turn this structure-of-arrays (i.e. the various pointer attributes) into
array-of-structures.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242219 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-14 22:32:50 +00:00
Adam Nemet
944e082905 [LAA] Lift RuntimePointerCheck out of LoopAccessInfo, NFC
I am planning to add more nested classes inside RuntimePointerCheck so
all these triple-nesting would be hard to follow.

Also rename it to RuntimePointerChecking (i.e. append 'ing').

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242218 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-14 22:32:44 +00:00
Hal Finkel
a8eaf29f90 [PowerPC] Use the ABI indirect-call protocol for patchpoints
We used to take the address specified as the direct target of the patchpoint
and did no TOC-pointer handling.  This, however, as not all that useful,
because MCJIT tends to create a lot of modules, and they have their own TOC
sections. Thus, to call from the generated code to other generated code, you
really need to switch TOC pointers. Make this work as expected, and under
ELFv1, tread the address as the function descriptor address so that the correct
TOC pointer can be loaded.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242217 91177308-0d34-0410-b5e6-96231b3b80d8
2015-07-14 22:26:06 +00:00