Commit Graph

112069 Commits

Author SHA1 Message Date
Daniel Sanders e2940c6516 Merging r227084:
------------------------------------------------------------------------
r227084 | vmedic | 2015-01-26 10:33:43 +0000 (Mon, 26 Jan 2015) | 1 line

When disassembler meets compact jump instructions for r6 it crashes as the access to operands array is out of range. This patch removes dedicated decoder method that wrongly handles decoding of these instructions.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235859 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-27 10:29:59 +00:00
Daniel Sanders 048ca53b9a Merging r227269:
------------------------------------------------------------------------
r227269 | petarj | 2015-01-27 23:30:18 +0000 (Tue, 27 Jan 2015) | 7 lines

[mips] Use __clear_cache builtin instead of cacheflush()

Use __clear_cache builtin instead of cacheflush() in
Unix Memory::InvalidateInstructionCache().

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

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235858 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-27 10:20:08 +00:00
Daniel Sanders fc85d2fe4b Merging r226905:
------------------------------------------------------------------------
r226905 | tomatabacu | 2015-01-23 10:40:19 +0000 (Fri, 23 Jan 2015) | 18 lines

[mips] Add new error message and improve testing for parsing the .module directive.

Summary:
We used to silently ignore any empty .module's and we used to give an error saying that we found
an "unexpected token at start of statement" when the value of the option wasn't an identifier (e.g. if it was a number).

We now give an error saying that we "expected .module option identifier" in both of those cases.

I also fixed the other tests in mips-abi-bad.s, which all seemed to be broken.


Reviewers: dsanders

Reviewed By: dsanders

Subscribers: llvm-commits

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235856 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-27 09:44:39 +00:00
Daniel Sanders b37cecaa03 Merging r226652:
------------------------------------------------------------------------
r226652 | vmedic | 2015-01-21 10:47:36 +0000 (Wed, 21 Jan 2015) | 1 line

[Mips][Disassembler]When disassembler meets load/store from coprocessor 2 instructions for mips r6 it crashes as the access to operands array is out of range. This patch adds dedicated decoder method that properly handles decoding of these instructions.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235855 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-27 09:42:44 +00:00
Daniel Sanders e4e9cd18c1 Merging r226409:
------------------------------------------------------------------------
r226409 | dsanders | 2015-01-18 18:43:10 +0000 (Sun, 18 Jan 2015) | 2 lines

[mips] 'CHECK :' is not a valid check directive. Fixed.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235850 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-27 08:55:45 +00:00
Daniel Sanders 51929672f6 Merging r226408:
------------------------------------------------------------------------
r226408 | dsanders | 2015-01-18 18:38:36 +0000 (Sun, 18 Jan 2015) | 9 lines

[mips] Make whitespace in disassembler tests more consistent. NFC.

The tests for the ISA's should now be approximately diffable. That is, the
output of 'diff valid-mips1.txt valid-mips2.txt' should be emit the lines
for instructions that were added/removed to/from MIPS-I by MIPS-II. This
doesn't work perfectly at the moment due to ordering differences but it
should be close.


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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235849 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-27 08:53:54 +00:00
Daniel Sanders efcab4fe15 Merging r226407:
------------------------------------------------------------------------
r226407 | dsanders | 2015-01-18 18:21:19 +0000 (Sun, 18 Jan 2015) | 3 lines

[mips] Make whitespace of disassembler tests more consistent by removing blank lines. NFC.


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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235848 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-27 08:52:15 +00:00
Daniel Sanders faed048669 Merging r226166:
------------------------------------------------------------------------
r226166 | vmedic | 2015-01-15 14:18:12 +0000 (Thu, 15 Jan 2015) | 1 line

Add disassembler tests for mips64r6 platform. There are no functional changes.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235847 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-27 08:51:28 +00:00
Daniel Sanders 907c754219 Merging r226165:
------------------------------------------------------------------------
r226165 | vmedic | 2015-01-15 14:11:38 +0000 (Thu, 15 Jan 2015) | 1 line

Add disassembler tests for mips32r6 platform. There are no functional changes.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235846 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-27 08:50:58 +00:00
Daniel Sanders 68bf170e1c Merging r226164:
------------------------------------------------------------------------
r226164 | vmedic | 2015-01-15 14:06:34 +0000 (Thu, 15 Jan 2015) | 1 line

Add disassembler tests for mips64r2 platform. There are no functional changes.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235845 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-27 08:50:30 +00:00
Daniel Sanders 51fbea9004 Merging r226151:
------------------------------------------------------------------------
r226151 | vmedic | 2015-01-15 08:50:20 +0000 (Thu, 15 Jan 2015) | 1 line

Add disassembler tests for mips64 platform. There are no functional changes.
------------------------------------------------------------------------


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235844 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-27 08:49:48 +00:00
Tom Stellard a764e2f2f8 Merging r229238:
------------------------------------------------------------------------
r229238 | Matthew.Arsenault | 2015-02-13 23:24:28 -0500 (Fri, 13 Feb 2015) | 2 lines

R600/SI: Use complex operand folding for div_scale

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235686 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-24 01:30:56 +00:00
Tom Stellard 3612e65ecc Merging r229236:
------------------------------------------------------------------------
r229236 | Matthew.Arsenault | 2015-02-13 23:22:00 -0500 (Fri, 13 Feb 2015) | 7 lines

R600/SI: Fix implicit vcc operand to v_div_fmas_*

This should allow finally fixing the f64 fdiv implementation.

Test is disabled for VI since there seems to be a problem with one
of the buffer load instructions on it.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235685 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-24 01:30:54 +00:00
Tom Stellard 4e7bf74e0a Merging r229235:
------------------------------------------------------------------------
r229235 | Matthew.Arsenault | 2015-02-13 23:03:18 -0500 (Fri, 13 Feb 2015) | 2 lines

R600/SI: Fix schedule model for v_div_scale_{f32|f64}

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235684 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-24 01:30:51 +00:00
Tom Stellard 405acde6c8 Merging r229234:
------------------------------------------------------------------------
r229234 | Matthew.Arsenault | 2015-02-13 22:54:32 -0500 (Fri, 13 Feb 2015) | 2 lines

R600/SI: Really fix size of VReg_1

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235683 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-24 01:30:49 +00:00
Tom Stellard 476cb40cfb Merging r229230:
------------------------------------------------------------------------
r229230 | Matthew.Arsenault | 2015-02-13 22:40:35 -0500 (Fri, 13 Feb 2015) | 4 lines

R600/SI: Fix not encoding src2 for v_div_scale_{f32|f64}

This apparently got lost in the VI changes.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235678 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-24 01:05:03 +00:00
Tom Stellard b8e0fb436d Merging r229228:
------------------------------------------------------------------------
r229228 | Matthew.Arsenault | 2015-02-13 22:02:23 -0500 (Fri, 13 Feb 2015) | 2 lines

R600/SI: Fix VOP3b encoding on VI

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235625 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-23 19:14:45 +00:00
Tom Stellard 49d6c13ea6 Merging r229227:
------------------------------------------------------------------------
r229227 | Matthew.Arsenault | 2015-02-13 21:55:57 -0500 (Fri, 13 Feb 2015) | 2 lines

R600/SI: Fix phys reg copies in SIFoldOperands

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235624 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-23 19:14:43 +00:00
Tom Stellard 08c90de1f3 Merging r229226:
------------------------------------------------------------------------
r229226 | Matthew.Arsenault | 2015-02-13 21:55:56 -0500 (Fri, 13 Feb 2015) | 5 lines

R600/SI: Fix copies from SGPR to VCC

This shows up without optimizations when vcc is required
to be used.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235623 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-23 19:14:42 +00:00
Tom Stellard 0f26277b54 Merging r229225:
------------------------------------------------------------------------
r229225 | Matthew.Arsenault | 2015-02-13 21:55:54 -0500 (Fri, 13 Feb 2015) | 4 lines

R600/SI: Add hack to copy from a VGPR to VCC

This hopefully should be fixed when VReg_1 is removed.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235622 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-23 19:14:40 +00:00
Tom Stellard 854b0aaa85 Merging r229223:
------------------------------------------------------------------------
r229223 | Matthew.Arsenault | 2015-02-13 21:51:44 -0500 (Fri, 13 Feb 2015) | 5 lines

R600/SI: Fix size of VReg_1

This is really a 32-bit register, if we try to check the size of it,
we want 32-bits.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235621 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-23 19:14:38 +00:00
Tom Stellard 8dff69720e Merging r228848:
------------------------------------------------------------------------
r228848 | thomas.stellard | 2015-02-11 12:11:48 -0500 (Wed, 11 Feb 2015) | 2 lines

R600/SI: Fix -march in test

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235550 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-22 21:13:11 +00:00
Tom Stellard 877a4624ba Merging r228374:
------------------------------------------------------------------------
r228374 | michel.daenzer | 2015-02-05 21:51:29 -0500 (Thu, 05 Feb 2015) | 4 lines

R600/SI: Amend a test to ensure WQM is enabled for LDS in pixel shaders

Reviewed-by: Tom Stellard <tom@stellard.net>

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235549 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-22 21:13:10 +00:00
Tom Stellard f500a3285f Merging r228373:
------------------------------------------------------------------------
r228373 | michel.daenzer | 2015-02-05 21:51:25 -0500 (Thu, 05 Feb 2015) | 8 lines

R600/SI: Don't enable WQM for V_INTERP_* instructions v2

Doesn't seem necessary anymore. I think this was mostly compensating for
not enabling WQM for texture sampling instructions.

v2: Add test coverage
Reviewed-by: Tom Stellard <tom@stellard.net>

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235548 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-22 21:13:09 +00:00
Tom Stellard 218380ac79 Merging r228372:
------------------------------------------------------------------------
r228372 | michel.daenzer | 2015-02-05 21:51:20 -0500 (Thu, 05 Feb 2015) | 12 lines

R600/SI: Also enable WQM for image opcodes which calculate LOD v3

If whole quad mode isn't enabled for these, the level of detail is
calculated incorrectly for pixels along diagonal triangle edges, causing
artifacts.

v2: Use a TSFlag instead of lots of switch cases
v3: Add test coverage

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88642
Reviewed-by: Tom Stellard <tom@stellard.net>

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235547 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-22 21:13:07 +00:00
Tom Stellard 3da607efde Merging r228273:
------------------------------------------------------------------------
r228273 | Matthew.Arsenault | 2015-02-05 01:05:13 -0500 (Thu, 05 Feb 2015) | 2 lines

R600/SI: Fix i64 truncate to i1

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235546 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-22 21:13:04 +00:00
Tom Stellard b9c1efd68c Merging r228190:
------------------------------------------------------------------------
r228190 | thomas.stellard | 2015-02-04 15:49:52 -0500 (Wed, 04 Feb 2015) | 2 lines

R600/SI: Expand misaligned 16-bit memory accesses

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235340 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-20 20:05:00 +00:00
Tom Stellard eb794a72ea Merging r228189:
------------------------------------------------------------------------
r228189 | thomas.stellard | 2015-02-04 15:49:51 -0500 (Wed, 04 Feb 2015) | 9 lines

R600/SI: Make more store operations legal

v2i32, i32, trunc i32 to i16, and truc i32 to i8 stores are legal for
all address spaces.  We had marked them as custom in order to lower
them for the private address space, but this is no longer necessary.

This enables lowering of misaligned stores of these types in the
DAGLegalizer.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235339 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-20 20:04:59 +00:00
Tom Stellard 15170d5820 Merging r228188:
------------------------------------------------------------------------
r228188 | thomas.stellard | 2015-02-04 15:49:49 -0500 (Wed, 04 Feb 2015) | 5 lines

R600: Don't promote i64 stores to v2i32 during DAG legalization

We take care of this during instruction selection now.  This
fixes a potential infinite loop when lowering misaligned stores.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235338 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-20 20:04:57 +00:00
Tom Stellard ed126f7a8f Merging r228040:
------------------------------------------------------------------------
r228040 | marek.olsak | 2015-02-03 16:53:27 -0500 (Tue, 03 Feb 2015) | 2 lines

R600/SI: Remove the -CHECK suffix from all FileCheck prefixes in LIT
tests

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235337 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-20 20:04:54 +00:00
Tom Stellard d5b664fac4 Merging r228039:
------------------------------------------------------------------------
r228039 | marek.olsak | 2015-02-03 16:53:08 -0500 (Tue, 03 Feb 2015) | 6 lines

R600/SI: Remove useless patterns in VALU which are already covered by SALU

Also remove hasPostISelHook=1 from V_LSHL_B32. It's defined by InstSI already.

Tested-by: Michel Dänzer <michel.daenzer@amd.com>

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235336 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-20 20:04:48 +00:00
Tom Stellard bb234bf351 Merging r228038:
------------------------------------------------------------------------
r228038 | marek.olsak | 2015-02-03 16:53:05 -0500 (Tue, 03 Feb 2015) | 10 lines

R600/SI: Rewrite VOP1InstSI to contain a pseudo and _si opcode

What this does is that if you accidentally select these instructions on VI,
the code generation will fail, because the pseudo -> _vi mapping will be
undefined.

The idea is to be able to catch possible future bugs easily.

Tested-by: Michel Dänzer <michel.daenzer@amd.com>

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235319 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-20 18:06:16 +00:00
Tom Stellard 6b940f2b53 Merging r228037:
------------------------------------------------------------------------
r228037 | marek.olsak | 2015-02-03 16:53:01 -0500 (Tue, 03 Feb 2015) | 6 lines

R600/SI: Fix B64 VALU shifts on VI

SI only has standard versions. VI only has REV versions.

Tested-by: Michel Dänzer <michel.daenzer@amd.com>

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235318 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-20 18:06:14 +00:00
Tom Stellard 1d44baacf1 Merging r227990:
------------------------------------------------------------------------
r227990 | marek.olsak | 2015-02-03 12:38:12 -0500 (Tue, 03 Feb 2015) | 14 lines

R600/SI: Don't generate non-existent LSHL, LSHR, ASHR B32 variants on VI

This can happen when a REV instruction is commuted.

The trick is not to define the _vi versions of instructions, which has these
consequences:
- code generation will always fail if a pseudo cannot be lowered
  (very useful to catch bugs where an unsupported instruction somehow makes
   it to the printer)
- ability to query if a pseudo can be lowered, which is done in commuteOpcode
  to prevent REV from commuting to non-REV on VI

Tested-by: Michel Dänzer <michel.daenzer@amd.com>

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235317 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-20 18:06:11 +00:00
Tom Stellard b771f2d8ee Merging r227989:
------------------------------------------------------------------------
r227989 | marek.olsak | 2015-02-03 12:38:05 -0500 (Tue, 03 Feb 2015) | 10 lines

R600/SI: Remove VOP2_REV definitions from target-specific instructions

The getCommute* functions are only used with pseudos, so this commit doesn't
change anything.

The issue with missing non-rev versions of shift instructions on VI will fixed
separately.

Tested-by: Michel Dänzer <michel.daenzer@amd.com>

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235316 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-20 18:06:09 +00:00
Tom Stellard 64aab8a216 Merging r227988:
------------------------------------------------------------------------
r227988 | marek.olsak | 2015-02-03 12:38:01 -0500 (Tue, 03 Feb 2015) | 11 lines

R600/SI: Trivial instruction definition corrections for VI (v2)

- V_MAC_LEGACY_F32 exists on VI, but it's VOP3-only.

- Define CVT_PK opcodes which are different between SI and VI. These are
  unused. The idea is to define all chip differences.

v2: keep V_MUL_LO_U32

Tested-by: Michel Dänzer <michel.daenzer@amd.com>

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235315 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-20 18:06:07 +00:00
Tom Stellard ce14bcb58c Merging r227987:
------------------------------------------------------------------------
r227987 | marek.olsak | 2015-02-03 12:37:57 -0500 (Tue, 03 Feb 2015) | 12 lines

R600/SI: Determine target-specific encoding of READLANE and WRITELANE early v2

These are VOP2 on SI and VOP3 on VI, and their pseudos are neither, which can
be a problem. In order to make isVOP2 and isVOP3 queries behave as expected,
the encoding must be determined first.

This doesn't fix any known issue, but better safe than sorry.

v2: add and use getMCOpcodeFromPseudo

Tested-by: Michel Dänzer <michel.daenzer@amd.com>

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235208 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-17 16:59:33 +00:00
Tom Stellard f0f6373ca7 Merging r227986:
------------------------------------------------------------------------
r227986 | marek.olsak | 2015-02-03 12:37:52 -0500 (Tue, 03 Feb 2015) | 9 lines

R600/SI: Fix dependency between instruction writing M0 and S_SENDMSG on VI (v2)

This fixes a hang when using an empty geometry shader.

v2: - don't add s_nop when followed by s_waitcnt
    - comestic changes

Tested-by: Michel Dänzer <michel.daenzer@amd.com>

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235207 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-17 16:59:32 +00:00
Tom Stellard cef595ebd3 Merging r227822:
------------------------------------------------------------------------
r227822 | thomas.stellard | 2015-02-02 13:02:28 -0500 (Mon, 02 Feb 2015) | 6 lines

R600/SI: 64-bit and larger memory access must be at least 4-byte aligned

This is true for SI only. CI+ supports unaligned memory accesses,
but this requires driver support, so for now we disallow unaligned
accesses for all GCN targets.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235206 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-17 16:59:29 +00:00
Tom Stellard 60e9aae79e Merging r227482:
------------------------------------------------------------------------
r227482 | Matthew.Arsenault | 2015-01-29 14:34:18 -0500 (Thu, 29 Jan 2015) | 2 lines

R600/SI: Fix tonga's basic scheduling model

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@235205 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-17 16:59:26 +00:00
Kristof Beyls 09f4600d31 Cherry-pick r231227: fix PR22408.
Original message from r231227:
Fix PR22408 - LLVM producing AArch64 TLS relocations that GNU linkers cannot handle yet.

As is described at http://llvm.org/bugs/show_bug.cgi?id=22408, the GNU linkers
ld.bfd and ld.gold currently only support a subset of the whole range of AArch64
ELF TLS relocations. Furthermore, they assume that some of the code sequences to
access thread-local variables are produced in a very specific sequence.
When the sequence is not as the linker expects, it can silently mis-relaxe/mis-optimize
the instructions.
Even if that wouldn't be the case, it's good to produce the exact sequence,
as that ensures that linkers can perform optimizing relaxations.

This patch:

* implements support for 16MiB TLS area size instead of 4GiB TLS area size. Ideally clang
  would grow an -mtls-size option to allow support for both, but that's not part of this patch.
* by default doesn't produce local dynamic access patterns, as even modern ld.bfd and ld.gold
  linkers do not support the associated relocations. An option (-aarch64-elf-ldtls-generation)
  is added to enable generation of local dynamic code sequence, but is off by default.
* makes sure that the exact expected code sequence for local dynamic and general dynamic
  accesses is produced, by making use of a new pseudo instruction. The patch also removes
  two (AArch64ISD::TLSDESC_BLR, AArch64ISD::TLSDESC_CALL) pre-existing AArch64-specific pseudo
  SDNode instructions that are superseded by the new one (TLSDESC_CALLSEQ).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@234393 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-08 07:19:32 +00:00
Pawel Bylica 9fca970c36 Cherry-pick r233351, r233353, r233355: fix PR22304.
Original message from r233351:
Fix a bug in SelectionDAG scheduling backtracking code: PR22304.

It can happen (by line CurSU->isPending = true; // This SU is not in
AvailableQueue right now.) that a SUnit is mark as available but is
not in the AvailableQueue. For SUnit being selected for scheduling
both conditions must be met.

This patch mainly defensively protects from invalid removing a node
from a queue. Sometimes nodes are marked isAvailable but are not in
the queue because they have been defered due to some hazard.

The other two commits move a test from CodeGen/Generic to Codegen/X86.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@234303 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-07 07:58:46 +00:00
Paul Robinson dbdbe63b4a Merging r233153 and r233584:
------------------------------------------------------------------------
r233153 | probinson | 2015-03-24 17:10:24 -0700 (Tue, 24 Mar 2015) | 7 lines

'optnone' should not disable DAG combiner.

Reverts the code change from r221168 and the relevant test.
It was a mistake to disable the combiner, and based on the ultimate
definition of 'optnone' we shouldn't have considered the test case
as failing in the first place.

------------------------------------------------------------------------
r233584 | probinson | 2015-03-30 12:37:44 -0700 (Mon, 30 Mar 2015) | 9 lines

Verify 'optnone' can run DAG combiner when appropriate.

Adds a test to verify the behavior that r233153 restored: 'optnone'
does not spuriously disable the DAG combiner, and in fact there are
cases where the DAG combiner must run (even at -O0 or 'optnone') in
order for codegen to succeed.

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

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@233871 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-02 00:15:35 +00:00
Tom Stellard 0c05d9a265 Merging r227214:
------------------------------------------------------------------------
r227214 | marek.olsak | 2015-01-27 12:27:15 -0500 (Tue, 27 Jan 2015) | 2
lines

R600/SI: Enable all tests that pass on VI without changes

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@233734 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-31 19:12:49 +00:00
Tom Stellard 81abc5e633 Merging r227213:
------------------------------------------------------------------------
r227213 | marek.olsak | 2015-01-27 12:25:15 -0500 (Tue, 27 Jan 2015) | 2 lines

R600/SI: Fix MIN3/MAX3 on VI, define MED3

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@233733 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-31 19:12:07 +00:00
Tom Stellard 90290b15f9 Merging r227212:
------------------------------------------------------------------------
r227212 | marek.olsak | 2015-01-27 12:25:11 -0500 (Tue, 27 Jan 2015) | 9 lines

R600/SI: Don't set patterns for chip-specific instructions while having pseudos

Only pseudos have patterns on them.

Also don't set the asm string for VINTRP_Pseudo. All pseudos should have empty
asm.

This matches what all other multiclasses do.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@233732 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-31 19:12:06 +00:00
Tom Stellard 848707f323 Merging r227211:
------------------------------------------------------------------------
r227211 | marek.olsak | 2015-01-27 12:25:07 -0500 (Tue, 27 Jan 2015) | 5 lines

R600/SI: Add VI versions of LDS atomics

Each class is split into two: one adds let statements around non-pseudos,
and the other one specifies the parameters.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@233731 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-31 19:12:04 +00:00
Tom Stellard b34bf94dba Merging r227210:
------------------------------------------------------------------------
r227210 | marek.olsak | 2015-01-27 12:25:02 -0500 (Tue, 27 Jan 2015) | 2 lines

R600/SI: Add VI versions of MUBUF atomics

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@233730 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-31 19:12:02 +00:00
Tom Stellard 381da58afa Merging r227209:
------------------------------------------------------------------------
r227209 | marek.olsak | 2015-01-27 12:24:58 -0500 (Tue, 27 Jan 2015) | 4 lines

R600/SI: Add VI versions of MUBUF loads and stores

This enables a lot of existing patterns for VI.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@233729 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-31 19:12:00 +00:00
Tom Stellard c614909e79 Merging r227208:
------------------------------------------------------------------------
r227208 | marek.olsak | 2015-01-27 12:24:54 -0500 (Tue, 27 Jan 2015) | 7 lines

R600/SI: Add pseudos for MUBUF loads and stores

This defines the SI versions only, so it shouldn't change anything.

There are no changes other than using the new multiclasses, adding missing
mayLoad/mayStore, and formatting fixes.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_36@233728 91177308-0d34-0410-b5e6-96231b3b80d8
2015-03-31 19:11:56 +00:00