38312 Commits

Author SHA1 Message Date
Matt Arsenault
69971dbc30 AMDGPU: SIDebuggerInsertNops preserves CFG
This saves an additional run of the DominatorTree and
MachineLoopInfo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271444 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-02 00:04:22 +00:00
Rafael Espindola
2f6da59b68 Avoid a load for local functions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271437 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-01 21:57:11 +00:00
Keno Fischer
aec5010b27 [PPC64] Fix SUBFC8 Defs list
Fix PR27943 "Bad machine code: Using an undefined physical register".
SUBFC8 implicitly defines the CR0 register, but this was omitted in
the instruction definition.

Patch by Jameson Nash <jameson@juliacomputing.com>

Reviewers: hfinkel
Differential Revision: http://reviews.llvm.org/D20802

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271425 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-01 20:31:07 +00:00
Michael Zuckerman
ac3b4c962d Adding back-end support to two bit scanning intrinsics
Adding LLVM back-end support to two intrinsics dealing with bit scan: _bit_scan_forward and _bit_scan_reverse.
Their functionality is as described in Intel intrinsics guide:
https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_bit_scan_forward&expand=371,370
https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_bit_scan_reverse&expand=371,370

Commit on behalf of Omer Paparo Bivas


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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271386 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-01 12:02:37 +00:00
Oliver Stannard
0144de5262 [ARM] Add additional matching for UBFX instructions
This adds an additional matcher to select UBFX(..) from SRL(AND(..)) in
ARMISelDAGToDAG to help with code size.

Patch by David Green.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271384 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-01 12:01:01 +00:00
Chris Dewhurst
c958a733af [Sparc] Allow passing of empty structs.
Passing an empty struct as a function call argument is now supported.

unit tests for various scenarios added.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271374 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-01 08:48:56 +00:00
Craig Topper
323e9f1870 Revert r271362 "[AVX512] Remove masked load intrinsics. Clang now emits generic masked load intrinsics instead."
Looks like something isn't quite right still. Also forgot to move the test cases to an autoupgrade test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271363 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-01 05:57:55 +00:00
Craig Topper
c1bee8aab0 [AVX512] Remove masked load intrinsics. Clang now emits generic masked load intrinsics instead.
The intrinsics will be autoupgraded to the same generic masked loads.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271362 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-01 05:35:16 +00:00
Kevin B. Smith
5830c5c818 [X86]: Add a pattern that uses GR16_ABCD rather than GR32_ABCD to avoid falsely marking whole 32 bit register as live.
Differential Revision: http://reviews.llvm.org/D20649


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271341 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 22:00:12 +00:00
Matthias Braun
fe23302cc8 ARM: Do not attempt to modify register class of physregs.
Physregs have no associated register class, do not attempt to modify it
in Thumb2InstrInfo::storeRegToStackSlot()/loadFromStackSlot().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271339 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 21:39:12 +00:00
Rafael Espindola
f2b59e8119 Delete AArch64II::MO_CONSTPOOL.
A constant pool holding the address of a variable in equivalent to
a got entry. It produces exactly the same instruction sequence as a
got use and unlike a got use this is not uniqued by the linker.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271311 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 18:31:14 +00:00
Simon Dardis
f213957c14 [mips] Enforce compact branch register restrictions
Enforce compact branch register restrictions such as the use of the zero
register, both operands being the same register. Emit clear error in such
cases as the issue is subtle.

For bovc and bnvc, silently fixup such cases when emitting objects directly,
like LLVM started doing in rL269899.

Reviewers: vkalintiris, dsanders

Differential Review: http://reviews.llvm.org/D20475


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271301 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 17:34:42 +00:00
Matt Arsenault
9d102db2c1 AMDGPU: Remove unused address space
Also return a single StringRef instead of building a string.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271296 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 16:57:45 +00:00
Rafael Espindola
1a9c272521 Add a use of shouldAssumeDSOLocal to ARM.
Now this code path knows about position independent executables.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271290 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 15:31:55 +00:00
Krzysztof Parzyszek
72f099b5f0 [Hexagon] Disable expanding MUX instructions that define a subregister
The code in HexagonExpandCondsets.cpp does not handle those cases at the
moment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271281 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 14:27:10 +00:00
Yaron Keren
4c77296fb2 Do not modify a std::vector while looping it.
Introduced in r271244, this is probably undefined behaviour and asserts when
compiled with Visual C++ debug mode. 

On further note, the loop is quadratic with regard to the number of successors
since removeSuccessor is linear and could probably be modified to linear time.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271278 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 13:45:05 +00:00
Ranjeet Singh
c146d1a1e5 [ARM] Add backend support for load/store intrinsics.
Added support to map intrinsics
__builtin_arm_{ldc,ldcl,ldc2,ldc2l,stc,stcl,stc2,stc2l}
to their ARM instructions.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271271 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 12:39:30 +00:00
Simon Pilgrim
a8a5e74bf9 [X86][SSE] Add load-folding patterns for (V)CVTDQ2PD (PR27291)
Added patterns for (V)CVTDQ2PD -> 2f64 loading from a 64-bit source.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271269 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 12:04:35 +00:00
Simon Dardis
8140f781f2 [mips] bnec/beqc register constraint fix
beqc and bnec cannot have $rs == $rt. Inhibit compact branch creation
if that would occur.

Reviewers: vkalintiris, dsanders

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271260 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 09:54:55 +00:00
Igor Breger
ae9c817ebb [AVX512] Fix intrinsic vcvtps2ph lowering.
Differential Revision: http://reviews.llvm.org/D20788

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271255 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 08:04:21 +00:00
Igor Breger
7720e47020 Fix intrinsic vbroadcast{i32|f32}x2 lowering.
Differential Revision: http://reviews.llvm.org/D20780

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271254 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 07:43:39 +00:00
Craig Topper
acc7ed7b83 [AVX512] Remove masked store intrinsics. Clang now emits generic masked store intrinsics instead.
The intrinsics will be autoupgraded to the same generic masked stores.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271245 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 01:50:02 +00:00
Saleem Abdulrasool
a2bdb6de81 X86: permit using SjLj EH on x86 targets as an option
This adds support to the backed to actually support SjLj EH as an exception
model.  This is *NOT* the default model, and requires explicitly opting into it
from the frontend.  GCC supports this model and for MinGW can still be enabled
via the `--using-sjlj-exceptions` options.

Addresses PR27749!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271244 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-31 01:48:07 +00:00
Craig Topper
2463f3bdaa [X86] Remove SSE/AVX unaligned store intrinsics as clang no longer uses them. Auto upgrade to native unaligned store instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271236 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-30 23:15:56 +00:00
Rafael Espindola
9e45fdcaa3 Fix a crash when producing COFF.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271229 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-30 20:18:53 +00:00
Diana Picus
e7cbdab8a9 [BPF] Remove exit-on-error from tests (PR27768, PR27769)
The exit-on-error flag is necessary to avoid some assertions/unreachables. We
can get past them by creating a few dummy nodes.

Fixes PR27768, PR27769.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271200 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-30 08:28:34 +00:00
Rafael Espindola
c615a826fd Move RelaxELFRel out to llvm-mc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271160 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-29 01:11:00 +00:00
Simon Pilgrim
687467768e [X86][SSE] (Reapplied) Replace (V)PMOVSX and (V)PMOVZX integer extension intrinsics with generic IR (llvm)
This patch removes the llvm intrinsics VPMOVSX and (V)PMOVZX sign/zero extension intrinsics and auto-upgrades to SEXT/ZEXT calls instead. We already did this for SSE41 PMOVSX sometime ago so much of that implementation can be reused.

Reapplied now that the the companion patch (D20684) removes/auto-upgrade the clang intrinsics has been committed.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271131 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-28 18:03:41 +00:00
Rafael Espindola
61c74dc4d5 Fix production of R_X86_64_GOTPCRELX/R_X86_64_REX_GOTPCRELX.
We were producing R_X86_64_GOTPCRELX for invalid instructions and
sometimes producing R_X86_64_GOTPCRELX instead of
R_X86_64_REX_GOTPCRELX.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271118 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-28 15:51:38 +00:00
Sanjay Patel
aea5485cfe [x86] avoid printing unnecessary sign bits of hex immediates in asm comments (PR20347)
It would be better to check the valid/expected size of the immediate operand, but this is
generally better than what we print right now.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271114 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-28 14:58:37 +00:00
Ahmed Bougacha
fe422064d9 [X86] Try to zero elts when lowering 256-bit shuffle with PSHUFB.
Otherwise we fallback to a blend of PSHUFBs later on.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271113 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-28 14:38:04 +00:00
Rafael Espindola
68e92aed2a Simplify and clang-format a table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271112 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-28 11:13:34 +00:00
Rafael Espindola
f57428de58 Fix default reloc model on ARM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271111 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-28 10:41:15 +00:00
Renato Golin
b0771c89b2 Revert "Revert "Map DynamicNoPIC to Static on non-darwin.""
This reverts commit r271096, as reverting it broke even more buildbots!

But that also means I'll break on ARM again... :(

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271099 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-28 04:47:13 +00:00
Renato Golin
ff7695ffc7 Revert "Map DynamicNoPIC to Static on non-darwin."
This reverts commit r271052, as it broke some ARM buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271096 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-28 04:24:26 +00:00
Krzysztof Parzyszek
537cc1b99b [Hexagon] Add option to enable subregister liveness tracking
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271088 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-28 02:02:51 +00:00
Krzysztof Parzyszek
d074accb5e [Hexagon] Separate C8 and USR to avoid unwanted subregister composition
Composing subreg_loreg with subreg_oveflow leads to strange results with
lane masks for register classes with subreg_loreg. In particular, dead
lane detection generates incorrect code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271087 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-28 01:51:16 +00:00
Matthias Braun
8bcf561616 AArch64: Fix indentation
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271084 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-28 01:06:51 +00:00
Matt Arsenault
0c56b68bee AMDGPU: Fix trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271081 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-28 00:50:51 +00:00
Matt Arsenault
14cb586d5e AMDGPU: Add fract intrinsic
Remove broken patterns matching it. This was matching the
unsafe math pattern and expanding the fix for the buggy instruction
from the pattern. The problems are also on CI. Remove the workarounds
and only use fract with unsafe math or from the intrinsic.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271078 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-28 00:19:52 +00:00
Rafael Espindola
3d3b6e3e28 Start using shouldAssumeDSOLocal on ARM.
Given where this is used it should be a nop.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271066 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-27 22:41:51 +00:00
Matthias Braun
da265fc2fa AArch64Subtarget: Use default member initializers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271057 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-27 22:14:09 +00:00
Rafael Espindola
a31d45bb57 Map DynamicNoPIC to Static on non-darwin.
DynamicNoPIC was only every used on darwin. This maps it to static on
ELF. It matches what is done on X86.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271052 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-27 21:44:18 +00:00
Krzysztof Parzyszek
c1712d6440 [Hexagon] Use standard macros to initialize HexagonExpandCondsets pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271045 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-27 21:15:34 +00:00
Krzysztof Parzyszek
8e211bbca8 [Hexagon] Do not create passes in the constructor of HexagonPassConfig
When running mir tests, a pass created in that constructor would not be
freed, leading to memory leaks.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271043 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-27 20:48:39 +00:00
Michael Kuperstein
780aab5bdb [X86] Detect SAD patterns and emit psadbw instructions.
This recommits r267649 with a fix for PR27539.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271033 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-27 18:53:22 +00:00
Ahmed Bougacha
8360163913 [X86] Clarify PSHUFB+blend lowering function name. NFC.
Also guard against v32i8 users.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271024 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-27 17:58:17 +00:00
Ahmed Bougacha
9629952ed7 [ARM] Remove tBLXr Pat made redundant by r269101. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271023 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-27 17:58:03 +00:00
Benjamin Kramer
4964a7bd67 Use StringRef::startswith instead of find(...) == 0.
It's faster and easier to read.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271018 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-27 16:54:57 +00:00
Benjamin Kramer
d8b9eeef20 [sparc] Simplify a slow and verbose way of checking if a string starts with "ld".
PR27904.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@271016 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-27 16:45:37 +00:00