Commit Graph

36630 Commits

Author SHA1 Message Date
Daniel Sanders
8c7f4d958b [mips][ias] EF_MIPS_MICROMIPS should iff microMIPS code was emitted.
Summary:
This fixes PR27682. Additionally, '.set micromips' by itself is not sufficient
to raise the EF_MIPS_MICROMIPS flag. It is also necessary to emit a microMIPS
instruction. This has also been fixed.

Reviewers: sdardis, vkalintiris, rafael

Subscribers: rafael, dsanders, sdardis, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269639 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 09:10:13 +00:00
Zoran Jovanovic
2365c029a9 [mips] Addition of a third operand to the instructions [d]div, [d]divu
Author: obucina
Reviewers: dsanders
Adds support for third operand for [D]DIV[U] instructions. Additional test for case when destination reg is zero register
Differential Revision: http://reviews.llvm.org/D16888


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269636 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-16 08:57:59 +00:00
Craig Topper
ef1f2996c1 [AVX512] Fix mask argument type for insertf32x4/inserti32x4.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269616 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-15 21:24:45 +00:00
Simon Pilgrim
12384d7415 [X86][SSE] Added constant index tests for 128-bit integer vector types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269604 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-15 19:27:28 +00:00
Simon Pilgrim
04c3ec9f8d [X86][SSE] Added variable index tests for 128-bit integer vector types
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269603 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-15 19:12:39 +00:00
Simon Pilgrim
02d2d979c7 Fixed typo in test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269602 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-15 18:50:22 +00:00
Sanjay Patel
f081becca9 add test to show missing optimization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269601 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-15 18:41:18 +00:00
Simon Pilgrim
ec8eda6695 [X86][SSE] Added extra extractelement tests
Added constant index tests for all 256-bit integer vector types (touching lower / upper 128-bits)

Added variable index tests for all 256-bit integer vector types

Added out-of-range index tests for all 256-bit integer vector types

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269600 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-15 18:22:21 +00:00
Sanjay Patel
7f7fd2a1c8 regenerate checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269596 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-15 18:05:10 +00:00
Simon Pilgrim
b6e1e95468 [X86][SSE] Regenerate extractelement tests
Added SSE2/AVX2 target tests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269595 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-15 18:02:39 +00:00
Simon Pilgrim
78ba7287ef [CostModel][X86] Added scalar bitreverse tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269594 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-15 17:40:48 +00:00
Elena Demikhovsky
746e3cee24 Vector GEP - fixed a crash on InstSimplify Pass.
Vector GEP with mixed (vector and scalar) indices failed on the InstSimplify Pass when all indices are constants.

Differential revision http://reviews.llvm.org/D20149



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269590 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-15 12:30:25 +00:00
Craig Topper
b776ae7788 [AVX512] Make the permd intrinsics take a 32-bit immediate to match the software spec.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269579 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 21:13:20 +00:00
Saleem Abdulrasool
5ec105e613 ARM: support export directives for Windows
It seems that cl will emit the export directives for Windows ARM targets.  The
fact that it did this had originally been missed and this functionality was
never implemented.  This makes it possible to rely solely on the source code for
indicating what the exported interfaces are and brings us more compatibility
with cl.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269574 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 18:58:34 +00:00
Elena Demikhovsky
fbe3ed3cb9 Fixed lowering of _comi_ intrinsics from all sets - SSE/SSE2/AVX/AVX-512
Differential revision http://reviews.llvm.org/D19261



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269569 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 15:06:09 +00:00
Renato Golin
7e38263edc Revert "[llc] New diagnostic handler"
This reverts commit r269563. Even though now it passes all LLDB bots
after a local fix, there's a new buildbot it fails with tests that we
hadn't seen locally:

http://lab.llvm.org:8011/builders/clang-x86_64-linux-selfhost-modules/builds/15647

Adding those tests to the list to investigate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269568 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 14:37:11 +00:00
NAKAMURA Takumi
92a36504fa Re-enable llvm/test/ThinLTO/X86/cache.ll.
This reverts;
  r269548, "XFAIL ThinLTO Caching test on Windows."
  r269561, "Rework r269548, "XFAIL ThinLTO Caching test on Windows.", not to use XFAIL, for now."

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269567 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 14:28:17 +00:00
Dima Stepanov
f9bb9034b0 Revert changes after test commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269564 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 13:29:52 +00:00
Renato Golin
2c05d88b8d [llc] New diagnostic handler
Without a diagnostic handler installed, llc's behaviour is to exit on the first
error that it encounters. This is very different from the behaviour of clang
and other front ends, which try to gather as many errors as possible before
exiting.

This commit adds a diagnostic handler to llc, allowing it to find and report
more than one error. The old behaviour is preserved under a flag (-exit-on-error).

Some of the tests fail with the new diagnostic handler, so they have to use the
new flag in order to run under the previous behaviour. Some of these are known
bugs, others need further investigation. Ideally, we should fix the tests and
remove the flag at some point in the future.

Reapplied after fixing the LLDB build that was broken due to the new
DiagnosticSeverity in LLVMContext.h.

Patch by Diana Picus.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269563 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 13:15:22 +00:00
NAKAMURA Takumi
44f77bce2b Rework r269548, "XFAIL ThinLTO Caching test on Windows.", not to use XFAIL, for now.
It was passing (and is XPASSing) with --host=linux --target=win32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269561 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 12:47:40 +00:00
Daniel Sanders
26a1923567 [mips] Enable IAS by default for 32-bit MIPS targets (O32).
Summary:
The MIPS IAS can now pass 'ninja check-all', recurse, build a bootable linux
kernel, and pass a variety of LNT testing.

Unfortunately we can't enable it by default for 64-bit targets yet since the N32
ABI is still very buggy and this also means we can't enable it for N64 either
because we can't distinguish between N32 and N64 in the relevant code.

Reviewers: vkalintiris

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D18759
Differential Revision: http://reviews.llvm.org/D18761



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269560 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 12:43:08 +00:00
Dima Stepanov
195a459e2d Test commt: remove a blank line.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269558 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 10:30:54 +00:00
Mehdi Amini
6369bff7ed XFAIL ThinLTO Caching test on Windows.
I have no idea what's going on on Windows here.

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269548 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 05:38:58 +00:00
Mehdi Amini
b01d46ba1c Add testing in llvm-lto for ThinLTO caching.
Trying to improve code coverage for `make check`

From: mehdi_amini <mehdi_amini@91177308-0d34-0410-b5e6-96231b3b80d8>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269545 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 05:16:41 +00:00
Mehdi Amini
68d85bb896 Revert "Add testing in llvm-lto for ThinLTO caching."
This reverts commit r269538 and r269542.
"rename()" is expected to fail across filesystems, will handle this.

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269543 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 05:07:44 +00:00
Mehdi Amini
a6723bb337 Increase verbosity in the test output to help debugging windows issues
From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269542 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 05:01:36 +00:00
Mehdi Amini
82d7fff155 Add testing in llvm-lto for ThinLTO caching.
Trying to improve code coverage for `make check`

From: Mehdi Amini <mehdi.amini@apple.com>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269538 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 04:41:26 +00:00
Dan Gohman
c40a684451 [WebAssembly] Fix legalization of i128 shifts.
compiler-rt/libgcc shift routines expect the shift count to be an i32, so
use i32 as the shift count for shifts that are legalized to libcalls. This
also reverts r268991, now that the signatures are correct.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269531 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 02:15:47 +00:00
Craig Topper
59cfb9caf5 [AVX512] Fix types for pshufd intrinsics. The immediate is the second argument and the mask is the 4th argument. Also move the 128/256 tests to the right test file.
Prior to this the immediate was a strange 16-bits and the 512-bit intrinsic couldn't receive the full 16 mask bits it needs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269526 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 00:47:18 +00:00
Reid Kleckner
fed38e2afb [codeview] Add type stream merging prototype
Summary:
This code is intended to be used as part of LLD's PDB writing. Until
that exists, this is exposed via llvm-readobj for testing purposes.

Type stream merging uses the following algorithm:

- Begin with a new empty stream, and a new empty hash table that maps
  from type record contents to new type index.
- For each new type stream, maintain a map from source type index to
  destination type index.
- For each record, copy it and rewrite its type indices to be valid in
  the destination type stream.
- If the new type record is not already present in the destination
  stream hash table, append it to the destination type stream, assign it
  the next type index, and update the two hash tables.
- If the type record already exists in the destination stream, discard
  it and update the type index map to forward the source type index to
  the existing destination type index.

Reviewers: zturner, ruiu

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269521 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-14 00:02:53 +00:00
Marcin Koscielnicki
133b6ea685 [MSan] [PowerPC] Implement PowerPC64 vararg helper.
Differential Revision: http://reviews.llvm.org/D20000

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269518 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 23:55:33 +00:00
Davide Italiano
743098991d [PM] Port LowerAtomic to the new pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269511 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 22:52:35 +00:00
Adam Nemet
27aef5052b [LAA] Include MaxSafeDepDistBytes in the analysis print-out
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269508 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 22:49:13 +00:00
Michael Zolotukhin
2463a66c88 Revert "Revert "[Unroll] Implement a conservative and monotonically increasing cost tracking system during the full unroll heuristic analysis that avoids counting any instruction cost until that instruction becomes "live" through a side-effect or use outside the...""
This reverts commit r269395.

Try to reapply with a fix from chapuni.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269486 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 21:23:25 +00:00
Rui Ueyama
2acb5f6a3a pdbdump: Print "Publics" stream.
Publics stream seems to contain information as to public symbols.
It actually contains a serialized hash table along with fixed-sized
headers. This patch is not complete. It scans only till the end of
the stream and dump the header information. I'll write code to
de-serialize the hash table later.

Reviewers: zturner

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269484 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 21:21:53 +00:00
Jan Vesely
d75c9ce18b AMDGPU/R600: Fold global address operand
Reviewers: tstellard

Subscribers: arsenm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269480 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 20:39:31 +00:00
Jan Vesely
fbff874b03 AMDGPU/R600: Implement memory loads from constant AS
Reviewers: tstellard

Subscribers: arsenm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269479 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 20:39:29 +00:00
Steven Wu
1c60c02881 Disable test from r269436 on unsupported platforms
Fixing bots failure. test/ExecutionEngine/RuntimeDyld/SystemZ/cfi-relo-pc64.s
requires SystemZ backend. Mark the test as unsupported if the backend is not
available.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269470 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 20:10:51 +00:00
Reid Kleckner
ef598a795b [codeview] Align class and print names of types
Summary: This way we can get rid of one of the fields in the .def file.

Reviewers: llvm-commits

Subscribers: zturner

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269461 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 19:37:07 +00:00
Tim Northover
6e490efa61 ARM: use callee-saved list in the order they're actually saved.
When setting the frame pointer, the offset from SP is calculated based on the
stack slot it gets allocated, but this slot is in turn based on the order of
the CSR list so that list should match the order we actually save the registers
in. Mostly it did, but in the edge-case of MachO AAPCS targets it was wrong.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269459 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 19:16:14 +00:00
Krzysztof Parzyszek
d1ae63365b [Hexagon] Remove dead nodes from SelectionDAG to avoid cycles
Recent changes to the instruction selection code exposed a problem where
a dead node was not removed on time. This node had both input and output
chains, which lead to an apparent cycle.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269458 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 18:48:15 +00:00
Konstantin Zhuravlyov
a3570477c9 [AMDGPU] Update nop insertion for debugger usage
- Insert one nop for each high level statement instead of two
- Do not insert nop before prologue

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269452 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 18:21:28 +00:00
Renato Golin
d22ce76857 Revert "[ARM,AArch64] NFC. Add extra test cases for bswap lowering."
This reverts commit r269425, as it fails on Windows (Thumb only).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269451 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 18:19:42 +00:00
Sanjay Patel
44171a4e1d regenerate checks and add a run to show missed shrinkage
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269449 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 18:04:39 +00:00
Sanjay Patel
a19270c5f6 regenerate checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269447 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 18:02:16 +00:00
Paul Osmialowski
0b30fc6010 add support for -print-imm-hex for AArch64
Most immediates are printed in Aarch64InstPrinter using 'formatImm' macro,
but not all of them.

Implementation contains following rules:

- floating point immediates are always printed as decimal
- signed integer immediates are printed depends on flag settings
  (for negative values 'formatImm' macro prints the value as i.e -0x01
  which may be convenient when imm is an address or offset)
- logical immediates are always printed as hex
- the 64-bit immediate for advSIMD, encoded in "a🅱️c:d:e:f:g:h" is always printed as hex
- the 64-bit immedaite in exception generation instructions like:
  brk, dcps1, dcps2, dcps3, hlt, hvc, smc, svc is always printed as hex
- the rest of immediates is printed depends on availability
  of -print-imm-hex

Signed-off-by: Maciej Gabka <maciej.gabka@arm.com>
Signed-off-by: Paul Osmialowski <pawel.osmialowski@arm.com>

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269446 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 18:00:09 +00:00
Reid Kleckner
af223d6177 [codeview] Dump the type index on the first line of each record
This will make it easier to write FileCheck tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269444 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 17:48:24 +00:00
Chris Bieneman
062cef56d2 [obj2yaml] [yaml2obj] Basic support for MachO::load_command
This patch adds basic support for MachO::load_command. Load command types and sizes are encoded in the YAML and expanded back into MachO.

The YAML doesn't yet support load command structs, that is coming next. In the meantime as a temporary measure when writing MachO files the load commands are padded with zeros so that the generated binary is valid.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269442 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 17:41:41 +00:00
Sanjay Patel
4f864166dd [InstCombine] handle zero constant vectors for LE/GE comparisons too
Enhancement to: http://reviews.llvm.org/rL269426
With discussion in: http://reviews.llvm.org/D17859

This should complete the fixes for: PR26701, PR26819:
https://llvm.org/bugs/show_bug.cgi?id=26701
https://llvm.org/bugs/show_bug.cgi?id=26819
 


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269439 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 17:28:12 +00:00
Bryan Chan
d80276dc1b [RuntimeDyld] Support R_390_PC64 relocation type
Summary: When the MCJIT generates ELF code, some DWARF data requires 64-bit PC-relative relocation (R_390_PC64). This patch adds support for R_390_PC64 relocation to RuntimeDyld::resolveSystemZRelocation, to avoid an assertion failure.

Reviewers: uweigand

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269436 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 17:23:48 +00:00
Jun Bum Lim
3f9e48ad51 [MemCpyOpt] Use MaxIntSize in byte instead of bit
Summary: This change fix the bug in isProfitableToUseMemset() where MaxIntSize shoule be in byte, not bit.

Reviewers: arsenm, joker.eph, mcrosier

Subscribers: mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269433 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 16:52:24 +00:00
Renato Golin
865778e04a Revert "[llc] New diagnostic handler"
This reverts commit r269428, as it breaks the LLDB build. We need to
understand how to change LLDB in the same way as LLC before landing this
again.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269432 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 16:02:44 +00:00
Renato Golin
89ca6c01c0 [llc] New diagnostic handler
Without a diagnostic handler installed, llc's behaviour is to exit on the first
error that it encounters. This is very different from the behaviour of clang
and other front ends, which try to gather as many errors as possible before
exiting.

This commit adds a diagnostic handler to llc, allowing it to find and report
more than one error. The old behaviour is preserved under a flag (-exit-on-error).

Some of the tests fail with the new diagnostic handler, so they have to use the
new flag in order to run under the previous behaviour. Some of these are known
bugs, others need further investigation. Ideally, we should fix the tests and
remove the flag at some point in the future.

Patch by Diana Picus.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269428 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 15:37:46 +00:00
Sanjay Patel
81a5b32238 [InstCombine] canonicalize* LE/GE vector integer comparisons to LT/GT (PR26701, PR26819)
*We don't currently handle the  edge case constants (min/max values), so it's not a complete
canonicalization.

To fully solve the motivating bugs, we need to enhance this to recognize a zero vector
too because that's a ConstantAggregateZero which is a ConstantData, not a ConstantVector
or a ConstantDataVector.

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




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269426 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 15:10:46 +00:00
Renato Golin
df80f4b7d8 [ARM,AArch64] NFC. Add extra test cases for bswap lowering.
These tests were sitting in Phab for many months. They're good tests and should be in.

Patch by Charlie Turner.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269425 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 15:10:24 +00:00
Simon Pilgrim
9976193239 [X86][AVX512] Moved CHECKs inside functions to stop update_llc_test_checks going haywire
I'm not going to regenerate these anytime soon but do have some diffs to apply that I'd like to do with update_llc_test_checks

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269420 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 14:47:55 +00:00
Amjad Aboud
c0cc51c8de Assure calling "cld" instruction in prologue of X86 interrupt handler function.
Differential Revision: http://reviews.llvm.org/D18725


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269413 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 12:46:57 +00:00
Daniel Sanders
ce7190c29e [mips][ias] Work around yet another incorrect microMIPS relocation evaluation exposed by r268900.
It's not entirely clear why R_MICROMIPS_(GOT|HI16|LO16) are evaluated
incorrectly in a small number of the LNT tests at this point. However, it's not
related to the STO_MIPS_MICROMIPS issue.

At this point all the microMIPS-related changes of r268900 have been reverted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269410 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 12:07:14 +00:00
Hrvoje Varga
2d6c428cea [mips][microMIPS] Implement APPEND, BPOSGE32C, MODSUB, MULSA.W.PH and MULSAQ_S.W.PH instructions
Differential Revision: http://reviews.llvm.org/D14117


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269408 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 11:32:53 +00:00
Michael Zolotukhin
a934d5cb93 Revert "[Unroll] Implement a conservative and monotonically increasing cost tracking system during the full unroll heuristic analysis that avoids counting any instruction cost until that instruction becomes "live" through a side-effect or use outside the..."
This reverts commit r269388.

It caused some bots to fail, I'm reverting it until I investigate the
issue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269395 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 06:32:25 +00:00
Matt Arsenault
1e466e511b AMDGPU: Remove verifier check for scc live ins
We only really need this to be true for SIFixSGPRCopies.
I'm not sure there's any way this could happen before that point.

Fixes a case where MachineCSE could introduce a cross block
scc use.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269391 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 04:15:48 +00:00
Michael Zolotukhin
a538be3ab1 [Unroll] Implement a conservative and monotonically increasing cost tracking system during the full unroll heuristic analysis that avoids counting any instruction cost until that instruction becomes "live" through a side-effect or use outside the...
Summary:
...loop after the last iteration.

This is really hard to do correctly. The core problem is that we need to
model liveness through the induction PHIs from iteration to iteration in
order to get the correct results, and we need to correctly de-duplicate
the common subgraphs of instructions feeding some subset of the
induction PHIs. All of this can be driven either from a side effect at
some iteration or from the loop values used after the loop finishes.

This patch implements this by storing the forward-propagating analysis
of each instruction in a cache to recall whether it was free and whether
it has become live and thus counted toward the total unroll cost. Then,
at each sink for a value in the loop, we recursively walk back through
every value that feeds the sink, including looping back through the
iterations as needed, until we have marked the entire input graph as
live. Because we cache this, we never visit instructions more than twice
-- once when we analyze them and put them into the cache, and once when
we count their cost towards the unrolled loop. Also, because the cache
is only two bits and because we are dealing with relatively small
iteration counts, we can store all of this very densely in memory to
avoid this from becoming an excessively slow analysis.

The code here is still pretty gross. I would appreciate suggestions
about better ways to factor or split this up, I've stared too long at
the algorithmic side to really have a good sense of what the design
should probably look at.

Also, it might seem like we should do all of this bottom-up, but I think
that is a red herring. Specifically, the simplification power is *much*
greater working top-down. We can forward propagate very effectively,
even across strange and interesting recurrances around the backedge.
Because we use data to propagate, this doesn't cause a state space
explosion. Doing this level of constant folding, etc, would be very
expensive to do bottom-up because it wouldn't be until the last moment
that you could collapse everything. The current solution is essentially
a top-down simplification with a bottom-up cost accounting which seems
to get the best of both worlds. It makes the simplification incremental
and powerful while leaving everything dead until we *know* it is needed.

Finally, a core property of this approach is its *monotonicity*. At all
times, the current UnrolledCost is a conservatively low estimate. This
ensures that we will never early-exit from the analysis due to exceeding
a threshold when if we had continued, the cost would have gone back
below the threshold. These kinds of bugs can cause incredibly hard to
track down random changes to behavior.

We could use a techinque similar (but much simpler) within the inliner
as well to avoid considering speculated code in the inline cost.

Reviewers: chandlerc

Subscribers: sanjoy, mzolotukhin, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269388 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 01:42:39 +00:00
Michael Zolotukhin
cbd66afc98 [LoopUnrollAnalyzer] Don't treat gep-instructions with simplified offset as simplified.
Summary:
Currently we consider such instructions as simplified, which is incorrect,
because if their user isn't simplified, we can't actually simplify them too.
This biases our estimates of profitability: for instance the analyzer expects
much more gains from unrolling memcpy loops than there actually are.

Reviewers: hfinkel, chandlerc

Subscribers: mzolotukhin, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269387 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 01:42:34 +00:00
Adrian Prantl
07368be39d dsymutil: Fix the DWOId mismatch check for cached modules.
In verbose mode, we emit a warning if the DWOId of a skeleton CU
mismatches the DWOId of the referenced module. This patch updates the
cached DWOId after a module has been loaded to the DWOId of the module
on disk (instead of storing the DWOId we expected to load). This
allows us to correctly emit the mismatch warning for all subsequent
object files that want to import the same module. This patch also
ensures both warnings are only emitted in verbose mode.

rdar://problem/26214027

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269383 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-13 00:17:58 +00:00
Reid Kleckner
2eea1812c8 [codeview] Fix dumping VFTables, stop when we see LF_PAD*
Also stop visiting type records when we encounter an error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269374 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 22:46:41 +00:00
Renato Golin
abc00cb813 [ARM] Support and tests for transform of LDR rt, = to MOV
This change implements the transformation in processInstruction() for the
LDR rt, =expression to MOV rt, expression when the expression can be evaluated
and can fit into the immediate field of the MOV or a MVN.

Across the ARM and Thumb instruction sets there are several cases to consider,
each with a different range of representatble constants.

In ARM we have:
 * Modified immediate (All ARM architectures)
 * MOVW (v6t2 and above)

In Thumb we have:
 * Modified immediate (v6t2, v7m and v8m.mainline)
 * MOVW (v6t2, v7m, v8.mainline and v8m.baseline)
 * Narrow Thumb MOV that can be used in an IT block (non flag-setting)

If the immediate fits any of the available alternatives then we make the transformation.

Fixes 25722.

Patch by Peter Smith.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269354 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 21:22:42 +00:00
Renato Golin
7ed2299a8f [ARM] Fixup tests to take into account mov translation. NFC.
Alter instances in the test-suite that use immediates that can be represented
in the immediate field of a MOV. The reason for doing this is that when the
LDR rt,=imm transformation to MOV rt, imm the existing tests do not need to
be modified.

Required by the patch that fixes PR25722.

Patch by Peter Smith.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269353 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 21:22:37 +00:00
Tom Stellard
c37b54dfc5 Revert "LiveIntervalAnalysis: Rework constructMainRangeFromSubranges()"
This reverts commit r269016 and also the follow-up commit r269020.

This patch caused PR27705.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269344 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 20:27:40 +00:00
David Blaikie
13dad4bbfc llvm-dwp: Use llvm::Error to improve diagnostic quality/error handling in llvm-dwp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269339 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 19:59:54 +00:00
Amjad Aboud
22ef2ed5bb Fixed the callee saved registers list for X86 AllRegs calling convention.
32-bit AllRegs:
SSE: xmm0-xmm7
AVX: ymm0-ymm7
AVX512: zmm0-zmm7 + k0-k7

64-bit AllRegs:
SSE: xmm0-xmm15
AVX: ymm0-ymm15
AVX512: zmm0-zmm31 + k0-k7

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269337 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 19:58:32 +00:00
Krzysztof Parzyszek
d54aa7c3b5 [Hexagon] Expand VSelect pseudo instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269328 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 19:16:02 +00:00
Chris Bieneman
d6f6aaf5e7 [yaml2macho] Handle mach_header_64 reserved field
I've added the reserved field as an "optional" in YAML, but I've added asserts in the yaml2macho code to enforce that the field is present in mach_header_64, but not in mach_header.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269320 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 18:21:09 +00:00
Chris Bieneman
ed0b17172e [yaml2obj] Support for dumping mach_header from yaml
With this change obj2yaml and yaml2obj can now round-trip mach_headers.

This change also adds ObjectYAML/MachO tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269314 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 17:44:48 +00:00
Krzysztof Parzyszek
9c350c822f [Hexagon] Properly handle instruction selection of vsplat intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269312 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 17:21:40 +00:00
Xinliang David Li
c8239a02c0 minor test clean up /NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269308 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 16:41:27 +00:00
Daniel Sanders
100018952c [mips][ias] Fix O32 .cprestore directive when inside .set noat region and offset is in range.
Summary:
This expands on r269179 to fix an additional case that was not covered by our
tests. The assembler temporary is not needed when the .cprestore offset fits
inside a simm16 and it is not an error to use it inside a '.set noat' in this
case.

Reviewers: emaste, seanbruno, sdardis

Subscribers: dsanders, sdardis, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269295 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 14:01:50 +00:00
Daniel Sanders
d89f32c83d [mips][ias] Work around incorrect another microMIPS relocation evaluation exposed by r268900
As explained in r269196, microMIPS has a special case that is not correctly
implemented in LLVM. If we have a symbol 'foo' which is equivalent to
'.text+0x10'. The value of an R_MICROMIPS_LO16 relocation using 'foo' is
'foo+0x11' and not 'foo+0x10'. The in-place addend should therefore be 0x11.

This commit reverts a little more of the effect of r268900 by keeping the
symbol when the STO_MIPS_MICROMIPS flag is set for R_MIPS_GPREL32 relocations.
This fixes SingleSource/UnitTests/2003-08-11-VaListArg, and
SingleSource/UnitTests/2003-05-07-VarArgs for microMIPS.

I believe there are additional relocations that have the same issue (e.g.
R_MIPS_64, and R_MIPS_GPREL16) but for now I'm focusing on restoring our
internal buildbots back to the green state we had in r268899.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269294 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 13:39:13 +00:00
Chad Rosier
443898c3e6 [AArch64] Remove command-line option use for testing.
The EXTR combine has been in tree for over 2 years without complain, so go ahead
and remove the option.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269292 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 13:27:24 +00:00
Simon Pilgrim
d836fe6b93 [SelectionDAG] Attempt to split BITREVERSE vector legalization into BSWAP and BITREVERSE stages
For BITREVERSE, bit shifting/masking every bit in a vector element is a very lengthy procedure.

If the input vector type is a whole multiple of bytes wide then we can split this into a BSWAP shuffle stage (to reverse at the byte level) and then a BITREVERSE stage applied to each byte. Most vector capable targets can efficiently BSWAP using shuffles resulting in a considerable reduction in instructions.

With this patch targets would only need to implement a target specific vXi8 BITREVERSE implementation to efficiently reverse most legal vector types.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269290 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 13:09:49 +00:00
Hrvoje Varga
6c8d6522ab Revert "[mips][microMIPS] Implement CFC*, CTC* and LDC* instructions"
This reverts commit r269176 as it caused test-suite failure.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269287 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 12:46:06 +00:00
Daniel Sanders
b58361c4a0 [mips][ias] Correct ELF eflags when Octeon is the target.
Reviewers: sdardis

Subscribers: petarj, mpf, dsanders, spetrovic, llvm-commits, sdardis

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269283 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 11:31:19 +00:00
Daniel Sanders
f6248f5f78 [mips][ias] Handle N64 compound relocations and R_MIPS_SUB in needsRelocateWithSymbol()
Summary:
This eliminates the default case for N64 that was left out of r269047.

The change to R_MIPS_SUB is needed in this patch to make this testable since
%lo(%neg(%gp_rel(foo))) and %hi(%neg(%gp_rel(foo))) remain the only ways to get
a compound relocation from the assembler.

Reviewers: sdardis, rafael

Subscribers: dsanders, llvm-commits, sdardis

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269280 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 10:55:00 +00:00
Dan Gohman
ca8feb05bb [WebAssembly] Fast-isel support for calls, arguments, and selects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269273 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 04:19:09 +00:00
Hal Finkel
db6adcba1e [PowerPC] Fix a DAG replacement bug in PPCTargetLowering::DAGCombineExtBoolTrunc
While promoting nodes in PPCTargetLowering::DAGCombineExtBoolTrunc, it is
possible for one of the nodes to be replaced by another. To make sure we do not
visit the deleted nodes, and to make sure we visit the replacement nodes, use a
list of HandleSDNodes to track the to-be-promoted nodes during the promotion
process.

The same fix has been applied to the analogous code in
PPCTargetLowering::DAGCombineTruncBoolExt.

Fixes PR26985.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269272 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 04:00:56 +00:00
David Majnemer
b0f9f5bfc7 [SCCP] Resolve shifts beyond the bitwidth to undef
Shifts beyond the bitwidth are undef but SCCP resolved them to zero.
Instead, DTRT and resolve them to undef.

This reimplements the transform which caused PR27712.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269269 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 03:07:40 +00:00
Xinliang David Li
f058cfd499 [Layout] Add a new test case for optimal rotation
Enabled by -force-precise-rotation-cost option


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269267 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 02:19:16 +00:00
Matt Arsenault
8adf4ebcf3 AMDGPU: Fix breaking IR on instructions with multiple pointer operands
The promote alloca pass would attempt to promote an alloca with
a select, icmp, or phi user, even though the other operand was
from a non-promotable source, producing a select on two different
pointer types.

Only do this if we know that both operands derive from the same
alloca. In the future we should be able to relax this to an alloca
which will also be promoted.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269265 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 01:58:58 +00:00
Chad Rosier
dd7a9752c2 [AArch64] Add support for unscaled narrow stores in getUsefulBitsForUse.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269263 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 01:42:01 +00:00
Sanjoy Das
d2e75bd7aa All llvm.deoptimize declarations must use the same calling convention
This new verifier rule lets us unambigously pick a calling convention
when creating a new declaration for
`@llvm.experimental.deoptimize.<ty>`.  It is also congruent with our
lowering strategy -- since all calls to `@llvm.experimental.deoptimize`
are lowered to calls to `__llvm_deoptimize`, it is reasonable to enforce
a unique calling convention.

Some of the tests that were breaking this verifier rule have had to be
split up into different .ll files.

The inliner was violating this rule as well, and has been fixed to avoid
producing invalid IR.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269261 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-12 01:17:38 +00:00
Davide Italiano
e5b9c737be Revert "[SCCP] Partially propagate informations when the input is not fully defined."
This reverts commit r269105 as it caused PR27712.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269252 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 23:06:10 +00:00
Wei Mi
825e5aadeb Fix a bug when hoist spill to a BB with landingpad successor.
This is to fix the bug in https://llvm.org/bugs/show_bug.cgi?id=27612.

When spill is hoisted to a BB with landingpad successor, and if the VNI
of the spill reg lives into the landingpad successor, the spill should be
inserted before the call which may throw exception. InsertPointAnalysis
is used to compute the safe insert point.

http://reviews.llvm.org/D20027 is a preparing patch for this patch.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269249 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 22:37:43 +00:00
Sanjay Patel
0dc2e08e23 regenerate checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269241 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 21:51:28 +00:00
Chad Rosier
fea2d4d86c [AArch64] Improve getUsefulBitsForUse for narrow stores.
For narrow stores (e.g., strb, srth) we know the upper bits of the register are
unused/not useful. In some cases we can use this information to eliminate
unnecessary instructions.

For example, without this patch we generate (from the 2nd test case):

 ldr w8, [x0]
 and w8, w8, #0xfff0
 bfxil w8, w2, #16, #4
 strh w8, [x1]

and after the patch the 'and' is removed:

 ldr w8, [x0]
 bfxil w8, w2, #16, #4
 strh w8, [x1]
 ret

During the lowering of the bitfield insert instruction the 'and' is eliminated
because we know the upper 16-bits that are masked off are unused and the lower
4-bits that are masked off are overwritten by the insert itself. Therefore, the
'and' is unnecessary.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269226 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 20:19:54 +00:00
Simon Pilgrim
5009e4f85f [X86][AVX512] Fixed VPERMILPD/VPERMILPS shuffle comments.
Fixed incorrect operands indices used to access src registers

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269221 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 18:53:44 +00:00
Sanjoy Das
2731c7a952 [SCEVExpander] Fix a failed cast<> assertion
SCEVExpander::replaceCongruentIVs assumes the backedge value of an
SCEV-analysable PHI to always be an instruction, when this is not
necessarily true.  For now address this by bailing out of the
optimization if the backedge value of the PHI is a non-Instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269213 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 17:41:41 +00:00
Sanjoy Das
5bbe5abe5e [SCEVExpander] Don't break SSA in replaceCongruentIVs
`SCEVExpander::replaceCongruentIVs` bypasses `hoistIVInc` if both the
original and the isomorphic increments are PHI nodes.  Doing this can
break SSA if the isomorphic increment is not dominated by the original
increment.  Get rid of the bypass, and let `hoistIVInc` do the right
thing.

Fixes PR27232 (compile time crash/hang).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269212 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 17:41:34 +00:00
Sanjoy Das
836f35c484 [SCEV] Be more aggressive around proving no-wrap
... for AddRec's in loops for which SCEV is unable to compute a max
tripcount.  This is not a problem for "normal" loops[0] that don't have
guards or assumes, but helps in cases where we have guards or assumes in
the loop that can be used to constrain incoming values over the backedge.

This partially fixes PR27691 (we still don't handle the NUW case).

[0]: for "normal" loops, in the cases where we'd be able to prove
no-wrap via isKnownPredicate, we'd also be able to compute a max
tripcount.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269211 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 17:41:26 +00:00
Jan Vesely
a836e3c43c AMDGPU: Split private memory tests
Reenable R600 testing

reviewer: arsenm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269207 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 17:24:45 +00:00
Dan Gohman
9cc168109a [WebAssembl] Implement enough of fast-isel to run the comparison tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269203 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 16:32:42 +00:00
Vedant Kumar
0a0124375c [BasicAA] Compare GEP indices based on value (Fix PR27418)
Equivalent GEP indices with different types are treated as different
indices altogether, leading to an incorrect AA result. Fix the issue
by comparing indices based on their values.

Thanks to Mikael Holmén for reporting the issue!

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269197 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 15:45:43 +00:00
Daniel Sanders
2922c601c3 [mips][ias] Work around incorrect microMIPS relocation evaluation exposed by r268900
microMIPS has a special case that is not correctly implemented in LLVM. If we
have a symbol 'foo' which is equivalent to '.text+0x10'. The value of an
R_MICROMIPS_LO16 relocation using 'foo' is 'foo+0x11' and not 'foo+0x10'. The
in-place addend should therefore be 0x11.

Work around this by partially reverting the effect of r268900 by keeping the
symbol when the STO_MIPS_MICROMIPS flag is set. This fixes
SingleSource/Regression/C/PR640 for microMIPS.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269196 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 15:44:23 +00:00
Simon Pilgrim
ab00bc3035 [X86][AVX512] Regenerate intrinsics test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269193 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 15:13:29 +00:00
Krzysztof Parzyszek
1c156dfdcb [Hexagon] Use offsets relative to FP+8 in .cfi_offset instructions
When generating .cfi_offset instructions, make sure that the offset is
calculated with respect to the register used to define the CFA (which is
currently always FP+8).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269191 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 14:53:07 +00:00
Simon Pilgrim
b78951b109 [X86] Regenerate shuffle test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269186 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 13:57:15 +00:00
Daniel Sanders
46a5550f61 [mips][ias] Fix N32 and N64 .cprestore directive when inside .set noat region.
Summary:
r268058 unintentionally made the retrieval of the current assembler temporary
unconditional. This was fine for the existing tests but it broke the cases
where the assembler temporary is not needed (N32/N64 or not PIC) and is
unavailable due to a '.set noat' directive.

This fixes FreeBSD's libc.

Reviewers: emaste, sdardis, seanbruno

Subscribers: dsanders, emaste, sdardis, llvm-commits

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269179 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 12:48:19 +00:00
Hrvoje Varga
eef2fa80b4 [mips][microMIPS] Implement CFC*, CTC* and LDC* instructions
Differential Revision: http://reviews.llvm.org/D19713


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269176 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 12:12:24 +00:00
Hrvoje Varga
d187959ecd [mips][micromips] Implement DSBH, DSHD, DSLL, DSLL32, DSLLV, DSRA, DSRA32 and DSRAV instructions
Differential Revision: http://reviews.llvm.org/D16800


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269169 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 11:17:04 +00:00
Weiming Zhao
daccc21594 [AArch64] Fix DAG selection for cmps for fp16 type
Summary: When emitting comparison for fp16, in addition to promote the LHS and RHS to fp32, we need to change the VT as well.

Reviewers: t.p.northover

Subscribers: t.p.northover, aemerson, rengolin, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269151 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 01:26:32 +00:00
Matt Arsenault
3e43181f87 AMDGPU: Change private_element_size to 4
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269145 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-11 00:28:54 +00:00
Xinliang David Li
3ddae02e7c Add missing tests for new PM
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269139 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 23:37:19 +00:00
Easwaran Raman
d56f6d6de3 Revert r269131
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269138 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 23:26:04 +00:00
Dehao Chen
b1ff2765a3 Propagate branch metadata when some branch probability is missing.
Summary: In sample profile, some branches may have profile missing due to profile inaccuracy. We want existing branch probability still valid after propagation.

Reviewers: hfinkel, davidxl, spatel

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269137 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 23:07:19 +00:00
Sanjay Patel
f2fd62413a auto-generate checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269134 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 22:33:26 +00:00
Tim Northover
dc566822d4 AArch64: allow vN to represent 64-bit registers in inline asm.
Unlike xN/wN, the size of vN is genuinely ambiguous in the assembly, so we
should try to infer what was intended from the type. But only down to 64-bits
(vN can never represent sN, hN or bN).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269132 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 22:26:45 +00:00
Easwaran Raman
79f2742cf7 Reapply r266477 and r266488
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269131 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 22:03:23 +00:00
Xinliang David Li
e052ee9da4 [PM]: port IR based profUse pass to new pass manager
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269129 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 21:59:52 +00:00
Sanjay Patel
8fd08e9630 remove some comments and other cruft from checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269128 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 21:52:15 +00:00
Tim Northover
0d5b5cf764 Revert "MemCpyOpt: combine local load/store sequences into memcpy."
This reverts commit r269125. It was in my tree when I ran "git svn dcommit".
It's really still under review.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269127 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 21:49:40 +00:00
Tim Northover
946a2f08b8 ARM: report an error when attempting to target a misalgined BLX
The CodeGen problem was fixed in r269101, but we still miscompiled assembly
that tried the same thing.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269126 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 21:48:48 +00:00
Tim Northover
654d431cf9 MemCpyOpt: combine local load/store sequences into memcpy.
Sort of the BB-local equivalent to idiom-recognizer: if we have a basic-block
that really implements a memcpy operation, backends can benefit from seeing
this.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269125 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 21:48:11 +00:00
Hans Wennborg
9ee5a28c8c Loop unroller: set thresholds for optsize and minsize functions to zero
Before r268509, Clang would disable the loop unroll pass when optimizing
for size. That commit enabled it to be able to support unroll pragmas
in -Os builds. However, this regressed binary size in one of Chromium's
DLLs with ~100 KB.

This restores the original behaviour of no unrolling at -Os, but doing it
in LLVM instead of Clang makes more sense, and also allows the pragmas to
keep working.

Differential revision: http://reviews.llvm.org/D20115

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269124 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 21:45:55 +00:00
Sanjay Patel
c418e3258c update test to use FileCheck for tighter checking
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269123 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 21:45:51 +00:00
Sanjay Patel
73f2788f27 update test to use FileCheck for tighter checking
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269122 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 21:42:09 +00:00
Lawrence Hu
08074bbc31 Enable loopreroll for sext of loop control only IV
This patch extend loopreroll to allow the instruction chain
        of loop control only IV has sext.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269121 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 21:16:49 +00:00
Lawrence Hu
0b382412f7 Revert r26084: Enable loopreroll for sext of loop control only IV
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269119 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 21:11:09 +00:00
Lawrence Hu
8e8c9a8a0b Revert r269093: Enable loopreroll for sext of loop control only IV
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269117 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 21:04:28 +00:00
Quentin Colombet
5e0f621a7b [X86] Properly check that EAX is dead when copying EFLAGS.
This fixes a bug introduced in r267623, where we got smarter and avoided to save
EAX before using it. However, we failed to check if any of the subregister of
EAX were alive and thus, missed cases where we have to save EAX before using it.

The problem may happen on every X86/i386/... platform.

This fixes llvm.org/PR27624


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269115 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 20:49:46 +00:00
Sanjay Patel
f59206d480 [InstSimplify] use computeKnownBits on shift amount operands
Do simplifications common to all shift instructions based on the amount shifted:
1. If the shift amount is known larger than the bitwidth, the result is undefined.
2. If the valid bits of the shift amount are all known to be 0, it's a shift by zero, so the shift operand is the result.

Note that we could generalize the shift-by-zero transform into a shift-by-constant if all of the valid bits in the shift
amount are known, but that would have to be done in InstCombine rather than here because it would mean we need to create
a new shift instruction.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269114 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 20:46:54 +00:00
Chad Rosier
1e0d415c13 [InstCombine] Fold icmp ugt/ult (udiv i32 C2, X), C1.
This patch adds support for two optimizations:
icmp ugt (udiv C2, X), C1 -> icmp ule X, C2/(C1+1)
icmp ult (udiv C2, X), C1 -> icmp ugt X, C2/C1

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269109 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 20:22:09 +00:00
Kit Barton
db21c5a551 [SystemZ] Add support for additional branch extended mnemonics
Added support for extended mnemonics for the following branch instructions and
load/store-on-condition opcodes:

BR, LOCR, LOCGR, LOC, LOCG, STOC, STOCG

Phabricator: http://reviews.llvm.org/D19729

Committing on behalf of Zhan Liau

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269106 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 20:11:24 +00:00
Davide Italiano
5f206cf7b0 [SCCP] Partially propagate informations when the input is not fully defined.
With this patch:
%r1 = lshr i64 -1, 4294967296 -> undef

Before this patch:
%r1 = lshr i64 -1, 4294967296 -> 0

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269105 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 19:49:47 +00:00
Adrian Prantl
b97f02b8fa Debug Info: Prevent DW_AT_abstract_origin from being emitted twice
for the same subprogram.

This fixes a bug where DW_AT_abstract_origin is being emitted twice for
the same subprogram if a function is both inlined and emitted in the same
translation unit, by restoring the pre-r266446 behavior.

http://reviews.llvm.org/D20072

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269103 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 19:38:51 +00:00
Tim Northover
8189e3d887 ARM: stop emitting blx instructions for most calls on MachO.
I'm really not sure why we were in the first place, it's the linker's job to
convert between BL/BLX as necessary. Even worse, using BLX left Thumb calls
that could be locally resolved completely unencodable since all offsets to BLX
are multiples of 4.

rdar://26182344

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269101 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 19:17:47 +00:00
Justin Bogner
c6c705c89d LPM: Drop require<loops> from these tests, it's redundant. NFC
The LoopPassManager needs to calculate the loops analysis in order to
iterate over the loops at all. Requiring it is redundant and just adds
noise to the RUN lines here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269097 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 18:28:10 +00:00
Rafael Espindola
11ab0c3a5d Make "@name =" mandatory for globals in .ll files.
An oddity of the .ll syntax is that the "@var = " in

@var = global i32 42

is optional. Writing just

global i32 42

is equivalent to

@0 = global i32 42

This means that there is a pretty big First set at the top level. The
current implementation maintains it manually. I was trying to refactor
it, but then started wondering why keep it a all. I personally find the
above syntax confusing. It looks like something is missing.

This patch removes the feature and simplifies the parser.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269096 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 18:22:45 +00:00
Lawrence Hu
2a60909c19 Enable loopreroll for sext of loop control only IV
This patch extend loopreroll to allow the instruction chain
    of loop control only IV has sext.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269093 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 18:00:42 +00:00
Mandeep Singh Grang
efde4d38ac Fix PR26655: Bail out if all regs of an inst BUNDLE have the correct kill flag
Summary:
While setting kill flags on instructions inside a BUNDLE, we bail out as soon
as we set kill flag on a register.  But we are missing a check when all the
registers already have the correct kill flag set. We need to bail out in that
case as well.

This patch refactors the old code and simply makes use of the addRegisterKilled
function in MachineInstr.cpp in order to determine whether to set/remove kill
on an instruction.

Reviewers: apazos, t.p.northover, pete, MatzeB

Subscribers: MatzeB, davide, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269092 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 17:57:27 +00:00
Rong Xu
346818f514 [PGO] resubmit r268969
Put the test into a target specific directory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269090 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 17:45:33 +00:00
Lawrence Hu
fdf3439d6a Enable loopreroll for sext of loop control only IV
This patch extend loopreroll to allow the instruction chain
    of loop control only IV has sext.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269084 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 17:42:27 +00:00
Dan Gohman
f02416f9ad [WebAssembly] Preliminary fast-isel support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269083 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 17:39:48 +00:00
Simon Pilgrim
d91145c2d6 [X86][AVX512] Added another masked shuffle combine from load test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269077 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 16:55:20 +00:00
Krzysztof Parzyszek
3c0f002a59 [ScheduleDAG] Make sure to process all def operands before any use operands
An example from Hexagon where things went wrong:
  %R0<def> = L2_loadrigp <ga:@fp04>      ; load function address
  J2_callr %R0<kill>, ..., %R0<imp-def>  ; call *R0, return value in R0

ScheduleDAGInstrs::buildSchedGraph would visit all instructions going
backwards, and in each instruction it would visit all operands in their
order on the operand list. In the case of this call, it visited the use
of R0 first, then removed it from the set Uses after it visited the def.
This caused the DAG to be missing the data dependence edge on R0 between
the load and the call.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269076 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 16:50:30 +00:00
Marcin Koscielnicki
9100579a4f [PR27599] [SystemZ] [SelectionDAG] Fix extension of atomic cmpxchg result.
Currently, SelectionDAG assumes 8/16-bit cmpxchg returns either a sign
extended result, or a zero extended result.  SystemZ takes a third
option by returning junk in the high bits (rotated contents of the other
bytes in the memory word).  In that case, don't use Assert*ext, and
zero-extend the result ourselves if a comparison is needed.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269075 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 16:49:04 +00:00
Simon Pilgrim
86f93f6dff [X86][AVX] Added some shuffle combine from load tests
As discussed on D19198 - we need to check what happens when we shuffle with different value type to the load

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269068 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 16:08:24 +00:00
Teresa Johnson
4b05ce2d0d [ThinLTO] Add option to emit imports files for distributed backends
Summary:
Add support for emission of plaintext lists of the imported files for
each distributed backend compilation. Used for distributed build file
staging.

Invoked with new gold-plugin thinlto-emit-imports-files option, which is
only valid with thinlto-index-only (i.e. for distributed builds), or
from llvm-lto with new -thinlto-action=emitimports value.

Depends on D19556.

Reviewers: joker.eph

Subscribers: llvm-commits, joker.eph

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269067 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 15:54:09 +00:00
Teresa Johnson
27af205ce1 Restore "[ThinLTO] Emit individual index files for distributed backends"
This restores commit r268627:
    Summary:
    When launching ThinLTO backends in a distributed build (currently
    supported in gold via the thinlto-index-only plugin option), emit
    an individual index file for each backend process as described here:
    http://lists.llvm.org/pipermail/llvm-dev/2016-April/098272.html

    ...

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

Address msan failures by avoiding std::prev on map.end(), the
theory is that this is causing issues due to some known UB problems
in __tree.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269059 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 13:48:23 +00:00
James Molloy
3a22301784 Revert "[VectorUtils] Query number of sign bits to allow more truncations"
This was a fairly simple patch but on closer inspection was seriously flawed and caused PR27690.

This reverts commit r268921.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269051 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 12:27:23 +00:00
Daniel Sanders
32ba5cd276 [mips][ias] Make the default path unreachable in needsRelocateWithSymbol() (except for N64).
Following post-commit comments on r268900 from Rafael Espindola:
The missing relocations are now explicitly listed in the switch statement with
appropriate FIXME comments and the default path is now unreachable. The
temporary exception to this is that compound relocations for N64 still have a
default path that returns true. This is because fixing that case ought to be a
separate patch.

Also make R_MIPS_NONE return false since it has no effect on the section data.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269047 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 12:17:04 +00:00
Jeroen Ketema
f14def1048 [OCaml] Update core test and re-enable testing
Differential Revision: http://reviews.llvm.org/D19828


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269040 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 11:19:20 +00:00
Simon Pilgrim
122b5fb8b8 [X86][AVX512] Added masked version of MOVDDUP test with 16f32
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269038 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 10:30:00 +00:00
Chuang-Yu Cheng
9aa98caa23 Update Debug Intrinsics in RewriteUsesOfClonedInstructions in LoopRotation
Loop rotation clones instruction from the old header into the preheader. If
there were uses of values produced by these instructions that were outside
the loop, we have to insert PHI nodes to merge the two values. If the values
are used by DbgIntrinsics they will be used as a MetadataAsValue of a
ValueAsMetadata of the original values, and iterating all of the uses of the
original value will not update the DbgIntrinsics. The new code checks if the
values are used by DbgIntrinsics and if so, updates them using essentially
the same logic as the original code.

The attached testcase demonstrates the issue. Without the fix, the
DbgIntrinic outside the loop uses values computed inside the loop, even
though these values do not dominate the DbgIntrinsic.

Author: Thomas Jablin (tjablin)
Reviewers: dblaikie aprantl kbarton hfinkel cycheng

http://reviews.llvm.org/D19564

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269034 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 09:45:44 +00:00
Arnaud A. de Grandmaison
5e24513c1f [InstCombine] Remove trivially empty va_start/va_end and va_copy/va_end ranges.
When a va_start or va_copy is immediately followed by a va_end (ignoring
debug information or other start/end in between), then it is safe to
remove the pair. As this code shares some commonalities with the lifetime
markers, this has been factored to helper functions.

This InstCombine pattern kicks-in 3 times when running the LLVM test
suite.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269033 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 09:24:49 +00:00
Chris Dewhurst
01fad33aac [Sparc][LEON] Itineraries unit test.
Added test to check LeonItineraries are being applied by code checked-in two weeks ago in r267121.

Phabricator Review: http://reviews.llvm.org/D19359

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269032 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 09:09:20 +00:00
Renato Golin
3c1ea17cfa Revert "[PGO] Fix __llvm_profile_raw_version linkage in MACHO IR instrumentation generates a COMDAT symbol __llvm_profile_raw_version to overwrite the same symbol in profile run-time to distinguish IR profiles from Clang generated profiles. In MACHO, LinkOnceODR linkage is used due to the lack of COMDAT support."
This reverts commits r268969, r268979 and r268984. They had target specific test
in generic directories without the correct specifiers and made it hard for us to
come up with a good solution by rapidly committing untested changes.

This test needs to be in a target specific directory or have the correct REQUIRED
identifier.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269027 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 08:23:57 +00:00
Jonas Paulsson
32db7c31b2 [foldMemoryOperand()] Pass LiveIntervals to enable liveness check.
SystemZ (and probably other targets as well) can fold a memory operand
by changing the opcode into a new instruction that as a side-effect
also clobbers the CC-reg.

In order to do this, liveness of that reg must first be checked. When
LIS is passed, getRegUnit() can be called on it and the right
LiveRange is computed on demand.

Reviewed by Matthias Braun.
http://reviews.llvm.org/D19861

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269026 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 08:09:37 +00:00
Elena Demikhovsky
b6e58d8bd0 [LoopVectorize] Handling induction variable with non-constant step.
Allow vectorization when the step is a loop-invariant variable.
This is the loop example that is getting vectorized after the patch:

 int int_inc;
 int bar(int init, int *restrict A, int N) {

  int x = init;
  for (int i=0;i<N;i++){
    A[i] = x;
    x += int_inc;
  }
  return x;
 }

"x" is an induction variable with *loop-invariant* step.
But it is not a primary induction. Primary induction variable with non-constant step is not handled yet.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269023 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 07:33:35 +00:00
Matthias Braun
c798cb42bb liveness.mir requires asserts to use -debug-only
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269020 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 05:38:47 +00:00
Craig Topper
7522f0e895 [X86] Update X86_INTR calling convention to save ZMM registers instead of YMM registers when AVX512 is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269017 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 05:27:56 +00:00
Matthias Braun
e607e01664 LiveIntervalAnalysis: Rework constructMainRangeFromSubranges()
We now use LiveRangeCalc::extendToUses() instead of a specially designed
algorithm in constructMainRangeFromSubranges():
- The original motivation for constructMainRangeFromSubranges() were
  differences between the main liverange and subranges because of hidden
  dead definitions. This case however cannot happen anymore with the
  DetectDeadLaneMasks pass in place.
- It simplifies the code.
- This fixes a longstanding bug where we did not properly create new SSA
  values on merging control flow (the MachineVerifier missed most of
  these cases).
- Move constructMainRangeFromSubranges() to LiveIntervalAnalysis and
  LiveRangeCalc to better match the implementation/available helper
  functions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269016 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 04:51:14 +00:00
Dan Gohman
01a542927d [WebAssembly] Move register stackification and coloring to a late phase.
Move the register stackification and coloring passes to run very late, after
PEI, tail duplication, and most other passes. This means that all code emitted
and expanded by those passes is now exposed to these passes. This also
eliminates the need for prologue/epilogue code to be manually stackified,
which significantly simplifies the code.

This does require running LiveIntervals a second time. It's useful to think
of these late passes not as late optimization passes, but as a domain-specific
compression algorithm based on knowledge of liveness information. It's used to
compress the code after all conventional optimizations are complete, which is
why it uses LiveIntervals at a phase when actual optimization passes don't
typically need it.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269012 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 04:24:02 +00:00
Sanjoy Das
b93f14ae06 [ValueTracking] Use guards to prove non-nullness of a value
Reviewers: apilipenko, majnemer, reames

Subscribers: mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269008 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 02:35:44 +00:00
Sanjoy Das
bbd902f57e [BasicAA] Guard intrinsics don't write to memory
Summary:
The idea is very close to what we do for assume intrinsics: we mark the
guard intrinsics as writing to arbitrary memory to maintain control
dependence, but under the covers we teach AA that they do not mod any
particular memory location.

Reviewers: chandlerc, hfinkel, gbiv, reames

Subscribers: george.burgess.iv, mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269007 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 02:35:41 +00:00
Matthias Braun
bbeb3ea1ff llc: Rework -run-pass option
We now construct a custom pass pipeline instead of injecting
start-before/stop-after into the default pipeline construction. This
allows to specify any pass known to the pass registry. Previously
specifying indirectly added analysis passes or passes not added to the
pipeline add all would not be added and we would silently do nothing.

This also restricts the -run-pass option to cases with .mir input.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269003 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 01:32:44 +00:00
Quentin Colombet
c2cb1b7b04 [X86][AVX512] Use the proper load/store for AVX512 registers.
When loading or storing AVX512 registers we were not using the AVX512
variant of the load and store for VR128 and VR256 like registers.
Thus, we ended up with the wrong encoding and actually were dropping the
high bits of the instruction. The result was that we load or store the
wrong register. The effect is visible only when we emit the object file
directly and disassemble it. Then, the output of the disassembler does
not match the assembly input.

This is related to llvm.org/PR27481.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269001 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 01:09:14 +00:00
Evgeniy Stepanov
d3d318a084 Don't inline functions with different SafeStack attributes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268999 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 00:33:07 +00:00
Sanjoy Das
cbda428c36 [SCEV] Use guards to prove predicates
We can use calls to @llvm.experimental.guard to prove predicates,
relying on the fact that in all locations domianted by a call to
@llvm.experimental.guard the predicate it is guarding is known to be
true.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268997 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-10 00:31:49 +00:00
Adam Nemet
1b5ab63915 [LV] Hint at the new loop distribution pragma in optimization remark
When we encounter unsafe memory dependencies, loop distribution could
help.

Even though, the diagnostics is in LAA, it's only currently emitted in
the vectorizer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268987 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 23:03:44 +00:00
Rong Xu
0ea9dd5d8e Fix buildbot failure from r268968.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268984 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 22:45:47 +00:00
Quentin Colombet
d3fb1bcc0c [X86] Fix the AllRegs AVX calling convention.
We used to list registers that were not in the AVX space. In other
words, we were pushing registers that the ISA cannot encode
(YMM16-YMM31).

This is part of llvm.org/PR27481.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268983 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 22:37:05 +00:00
Sanjay Patel
22d7b011d5 [Inliner] don't assume that a Constant alloca size is a ConstantInt (PR27277)
Differential Revision: http://reviews.llvm.org/D20077



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268980 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 21:51:53 +00:00
Rong Xu
957278efba Fix buildbot failure from r268968.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268979 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 21:51:50 +00:00
Simon Pilgrim
15a59473b3 [X86][SSE] Improve cost model for i64 vector comparisons on pre-SSE42 targets
As discussed on PR24888, until SSE42 we don't have access to PCMPGTQ for v2i64 comparisons, but the cost models don't reflect this, resulting in over-optimistic vectorizaton.

This patch adds SSE2 'base level' costs that match what a typical target is capable of and only reduces the v2i64 costs at SSE42.

Technically SSE41 provides a PCMPEQQ v2i64 equality test, but as getCmpSelInstrCost doesn't give us a way to discriminate between comparison test types we can't easily make use of this, otherwise we could split the cost of integer equality and greater-than tests to give better costings of each.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268972 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 21:14:38 +00:00
Rong Xu
8e0fce8eb6 [PGO] Fix __llvm_profile_raw_version linkage in MACHO
IR instrumentation generates a COMDAT symbol __llvm_profile_raw_version to
overwrite the same symbol in profile run-time to distinguish IR profiles from
Clang generated profiles. In MACHO, LinkOnceODR linkage is used due to the
lack of COMDAT support.

But LinkOnceODR linkage might have .weak_def_can_be_hidden assembly directive,
while the weak variable in run-time has a .weak_definition directive. Linker
will not merge these two symbols even they have the same name. The end result
is IR profiles are not properly flagged in MACHO.

This patch changes the linkage for __llvm_profile_raw_version in each module to
LinkOnceAny so that it has same .weak_definition directive as in the run-time.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268969 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 21:03:06 +00:00
Marcin Koscielnicki
05b09ea28d [MSan] [AArch64] Fix vararg helper for >1 or non-int fixed arguments.
This fixes http://llvm.org/PR27646 on AArch64.

There are three issues here:

- The GR save area is 7 words in size, instead of 8.  This is not enough
  if none of the fixed arguments is passed in GRs (they're all floats or
  aggregates).
- The first argument is ignored (which counteracts the above if it's passed
  in GR).
- Like x86_64, fixed arguments landing in the overflow area are wrongly
  counted towards the overflow offset.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268967 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 20:57:36 +00:00
Adrian Prantl
b6708cf087 Allow the LTO code generator to strip invalid debug info from the input.
This patch introduces a new option -lto-strip-invalid-debug-info, which
drops malformed debug info from the input.

The problem I'm trying to solve with this sequence of patches is that
historically we've done a really bad job at verifying debug info. We want
to be able to make the verifier stricter without having to worry about
breaking bitcode compatibility with existing producers. For example, we
don't necessarily want IR produced by an older version of clang to be
rejected by an LTO link just because of malformed debug info, and rather
provide an option to strip it. Note that merely outdated (but well-formed)
debug info would continue to be auto-upgraded in this scenario.

rdar://problem/25818489
http://reviews.llvm.org/D19987

This reapplies 268936 with a test case fix for Linux (-exported-symbol foo)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268965 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 19:57:15 +00:00
Chad Rosier
f9451d9d7f [InstCombine] Fold icmp eq/ne (udiv i32 A, B), 0 -> icmp ugt/ule B, A.
Differential Revision: http://reviews.llvm.org/D20036

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268960 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 19:30:20 +00:00
Quentin Colombet
5db7dd2a56 Reapply [X86] Add a new LOW32_ADDR_ACCESS_RBP register class.
This reapplies commit r268796, with a fix for the setting of the inline asm
constraints. I.e., "mark" LOW32_ADDR_ACCESS_RBP as a GR variant, so that the
regular processing of the GR operands (setting of the subregisters) happens.

Original commit log:
[X86] Add a new LOW32_ADDR_ACCESS_RBP register class.

ABIs like NaCl uses 32-bit addresses but have 64-bit frame.
The new register class reflects those constraints when choosing a
register class for a address access.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268955 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 19:01:46 +00:00
Quentin Colombet
41c48e040d [X86] Update a regexp in a test case to resist register allocation
changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268954 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 19:01:42 +00:00
Nemanja Ivanovic
f9018a1eb7 [Power9] Add support for -mcpu=pwr9 in the back end
This patch corresponds to review:
http://reviews.llvm.org/D19683

Simply adds the bits for being able to specify -mcpu=pwr9 to the back end.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268950 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 18:54:58 +00:00
Sanjay Patel
1f19a43136 clean up; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268949 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 18:54:14 +00:00
Krzysztof Parzyszek
13fc4ae0bf [Hexagon] Treat all conditional branches as predicted (not-taken by default)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268946 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 18:22:07 +00:00
Konstantin Zhuravlyov
2fdfecfd6e [AMDGPU] Clean up debugger tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268944 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 18:05:42 +00:00
Zachary Turner
a95bc25b20 [pdb] Parse the module info stream for each module.
Differential Revision: http://reviews.llvm.org/D20026
Reviewed By: rnk

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268942 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 17:45:21 +00:00
Adrian Prantl
cfd85505ad Revert "Allow the LTO code generator to strip invalid debug info from the input."
This reverts commit 268936 while investigating buildbot breakage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268940 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 17:43:30 +00:00
Adrian Prantl
9860b93e07 Allow the LTO code generator to strip invalid debug info from the input.
This patch introduces a new option -lto-strip-invalid-debug-info, which
drops malformed debug info from the input.

The problem I'm trying to solve with this sequence of patches is that
historically we've done a really bad job at verifying debug info. We want
to be able to make the verifier stricter without having to worry about
breaking bitcode compatibility with existing producers. For example, we
don't necessarily want IR produced by an older version of clang to be
rejected by an LTO link just because of malformed debug info, and rather
provide an option to strip it. Note that merely outdated (but well-formed)
debug info would continue to be auto-upgraded in this scenario.

rdar://problem/25818489
http://reviews.llvm.org/D19987

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268936 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 17:37:33 +00:00
Sanjay Patel
bc9409d1af [CGP] avoid crashing from weightlessness
It's possible that we have branch weights with 0 values.
In that case, don't try to create an impossible BranchProbability.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268935 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 17:31:55 +00:00
Matt Arsenault
51485ffe89 DivergenceAnalysis: Fix crash with no return blocks
The post dominator tree does not have a root node in this case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268933 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 16:57:08 +00:00
Matt Arsenault
deeb131011 AMDGPU: Fold shift into cvt_f32_ubyteN
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268930 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 16:29:50 +00:00
Frederic Riss
856a0143b0 [dsymutil] Prevent use-after-free
The BinaryHolder would query the archive member MemoryBuffer name
to check if the current open archive also contains the next requested
objectfile. This comparison was using a StringRef to a temporary
buffer. It only happened with fat archives. This commit adds long-lived
storage along with the MemoryBuffers for the fat archive filename.

The added test would fail during an ASAN build without the fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268924 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 14:44:14 +00:00
Joerg Sonnenberger
ee2078606f Optimize a printf with a double procent to putchar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268922 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 14:36:16 +00:00
James Molloy
ec0b9c8745 [VectorUtils] Query number of sign bits to allow more truncations
When deciding if a vector calculation can be done in a smaller bitwidth, use sign bit information from ValueTracking to add more information and allow more truncations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268921 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 14:32:30 +00:00
Daniel Sanders
43d2886cca [mips][micromips] Make getPointerRegClass() result depend on the instruction.
Summary:
Previously, it returned the GPR16MMRegClass for all instructions which was
incorrect for instructions like lwsp/lwgp and unnecesarily restricted the
permitted registers for instructions like lw32.

This fixes quite a few of the -verify-machineinstrs errors reported in PR27458.
I've only added -verify-machineinstrs to one test in this change since I
understand there is a plan to enable the verifier by default.

Reviewers: hvarga, zbuljan, zoran.jovanovic, sdardis

Subscribers: dsanders, llvm-commits, sdardis

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268918 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 13:38:25 +00:00
Strahinja Petrovic
a16fdea51a [PowerPC] fix register alignment for long double type
This patch fixes register alignment for long double type in
soft float mode. Before this patch alignment was 8 and this
patch changes it to 4.
Differential Revision: http://reviews.llvm.org/D18034



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268909 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 12:27:39 +00:00
Chris Dewhurst
e06fb6bce7 [Sparc][LEON] Add UMAC and SMAC instruction support for Sparc LEON subtargets
This change adds SMAC (signed multiply-accumulate) and UMAC (unsigned multiply-accumulate) for LEON subtargets of the Sparc processor.

The new files LeonFeatures.td and leon-instructions.ll will both be expanded in future, so I want to leave them separate as small files for this review, to be expanded in future check-ins.

Note: The functions are provided only for inline-assembly provision. No DAG selection is provided.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268908 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 11:55:15 +00:00
Silviu Baranga
784cb3fef6 [AArch64] Implement lowering of the X constraint on AArch64
Summary:
This implements the lowering of the X constraint on
AArch64.

The default behaviour of the X constraint lowering is to
restrict it to "f". This is a problem because the "f"
constraint is not implemented on AArch64 and would be too
restrictive anyway. Therefore, the AArch64 hook will
lower this to "w" (if the operand is a floating point or
vector) or "r" otherwise.

The implementation is similar with the one added for
ARM (r267411).

This is the AArch64 side of the fix for http://llvm.org/PR26493

Reviewers: rengolin

Subscribers: aemerson, rengolin, llvm-commits, t.p.northover

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268907 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 11:10:44 +00:00
Simon Pilgrim
a5df424f08 [X86][AVX512] Added masked version of combine tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268904 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 10:43:13 +00:00
Daniel Sanders
0b6e0490cf [mips][ias] R_MIPS_(GOT|HI|LO|PC)16 and R_MIPS_GPREL32 do not need symbols.
Summary:
In theory, care must be taken to ensure that pairs of R_MIPS_(GOT|HI|LO)16
make the same decision on both relocs in the reloc pair but in practice
this isn't as hard as it sounds and only limits the complexity of the
predicate used. We handle all three with the same code to ensure their
decisions always agree with each other.

Reviewers: sdardis

Subscribers: rafael, dsanders, sdardis, llvm-commits

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268900 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 10:21:14 +00:00
Zlatko Buljan
dc02050702 [mips][microMIPS] Implement LWP and SWP instructions
Differential Revision: http://reviews.llvm.org/D10640


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268896 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 08:07:28 +00:00
Frederic Riss
c0fdf88ac7 [dsymutil] Fix -arch option for thumb variants.
r267249 removed the dual ARM/Thumb interface from MachOObjectFile,
simplifying llvm-dsymutil's code. This unfortunately also regressed
llvm-dsymutil's ability to select thumb slices, because the simplified
code was also dealing with the discrepency between the slice arch
(eg. armv7m) and the triple arch name (eg. thumbv7m).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268894 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 06:01:12 +00:00
Craig Topper
63eccc2eca [AVX512] Fix up types for arguments of int_x86_avx512_mask_cvtsd2ss_round and int_x86_avx512_mask_cvtss2sd_round. Only the argument being converted should be a different type. The other 2 argument should have the same type as the result.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268891 91177308-0d34-0410-b5e6-96231b3b80d8
2016-05-09 05:34:12 +00:00