136801 Commits

Author SHA1 Message Date
Prakhar Bahuguna
7461b8a6d7 Correct the upper bound for a CBZ/CBNZ branch target.
Summary:
Fix for the upper bound check that was causing a build failure.

Reviewers: olista01, rengolin, t.p.northover

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D23501

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278789 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-16 10:41:56 +00:00
Prakhar Bahuguna
6e45500a57 [Thumb] Validate branch target for CBZ/CBNZ instructions.
Summary:
The assembler currently does not check the branch target for CBZ/CBNZ
instructions, which only permit branching forwards with a positive offset. This
adds validation for the branch target to ensure negative PC-relative offsets are
not encoded into the instruction, whether specified as a literal or as an
assembler symbol.

Reviewers: rengolin, t.p.northover

Subscribers: llvm-commits, rengolin

Differential Revision: https://reviews.llvm.org/D23312

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278788 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-16 10:41:52 +00:00
Simon Pilgrim
a14491aa36 [X86][SSE] Add support for combining target shuffles to PALIGNR byte rotations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278787 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-16 10:03:23 +00:00
Job Noorman
9d30d1b1e5 [AVR] Fix compile errors
Differential Revision: https://reviews.llvm.org/D23450


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278784 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-16 08:41:35 +00:00
Guy Blank
6f26a8e23e [X86] Add xgetbv/xsetbv intrinsics to non-windows platforms
Differential Revision: https://reviews.llvm.org/D21958

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278782 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-16 06:41:00 +00:00
David Majnemer
0bf24e0333 [InstSimplify] Fold gep (gep V, C), (xor V, -1) to C-1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278779 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-16 06:13:46 +00:00
Mehdi Amini
2a393a5758 FunctionImport: missed one occurence of ImportListForModule to rename (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278778 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-16 05:49:12 +00:00
Mehdi Amini
22277af930 FunctionImport: rename ImportsForModule to ImportList for consistency (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278777 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-16 05:47:12 +00:00
Mehdi Amini
055f556eae [LTO] Simplify APIs and constify (NFC)
Summary:
Multiple APIs were taking a StringMap for the ImportLists containing
the entries for for all the modules while operating on a single entry
for the current module. Instead we can pass the desired ModuleImport
directly. Also some of the APIs were not const, I believe just to be
able to use operator[] on the StringMap.

Reviewers: tejohnson

Subscribers: llvm-commits, mehdi_amini

Differential Revision: https://reviews.llvm.org/D23537

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278776 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-16 05:46:05 +00:00
Sanjay Patel
8454221022 [InstCombine] add tests for missing vector icmp folds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278768 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-16 00:48:38 +00:00
Mehdi Amini
cbcae43747 [LTO] Rename variables with meaningul names, i.e. more than one character (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278766 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-16 00:44:46 +00:00
Sanjay Patel
8e443cd8d1 [InstCombine] add tests for missing vector icmp folds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278765 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-16 00:27:12 +00:00
Reid Kleckner
ca77873b47 [AMDGPU] Give enum an explicit 64-bit type to fix MSVC 2013 failures
Recall that MSVC always gives enums the type 'int', nothing else.  MSVC
2015 does not appear to have this problem anymore.

Clang-cl -Wmicrosoft-enum-value flags this, FWIW, so now I have a true
positive for my warning. :)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278762 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 23:54:44 +00:00
Teresa Johnson
3d6b718ec1 [ThinLTO] Fix temp file dumping, enable via llvm-lto and test it
Summary:
Fixed a bug in ThinLTOCodeGenerator's temp file dumping. The Twine
needs to be passed directly as an argument, or a copy saved into a
std::string.

It doesn't seem there are any consumers of this, so I added a new option
to llvm-lto to enable saving of temp files during ThinLTO, and augmented
a test to use it to check post-import but pre-opt bitcode.

Reviewers: mehdi_amini

Subscribers: llvm-commits, mehdi_amini

Differential Revision: https://reviews.llvm.org/D23525

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278761 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 23:24:57 +00:00
Reid Kleckner
d7f4d1124d Don't use %llc_dwarf with -mtriple, they don't combine
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278758 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 22:54:26 +00:00
Sanjay Patel
dfacb43d50 [InstCombine] add tests for missing vector icmp folds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278757 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 22:43:52 +00:00
Justin Bogner
d6a48b16f6 Linker: Avoid some ridiculous indentation by using a temporary. NFC
This was indented really awkwardly, and clang-format didn't seem to
know how to do any better. Avoid the issue with a temporary variable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278756 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 22:41:42 +00:00
Wolfgang Pieb
5912e9a50d Adding the triple for test comitted with r278703.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278755 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 22:39:39 +00:00
Mike Aizatsky
f514d2f83e [sancov] extracting AArch64 test to a separate file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278754 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 22:30:37 +00:00
Tim Shen
eeadbe0f8f [ADT] Fix DepthFirstIterator's std::iterator base to have normal typedefs
Summary: This is similiar to r278752, where I found that the std::iterator<...> base can be normal.

Reviewers: dblaikie

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D23527

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278753 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 22:07:30 +00:00
Tim Shen
36b7d78473 [ADT] Change PostOrderIterator to use NodeRef. NFC.
Reviewers: dblaikie

Subscribers: mzolotukhin, llvm-commits

Differential Revision: https://reviews.llvm.org/D23522

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278752 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 21:52:54 +00:00
Sanjay Patel
caa310554b [InstCombine] add tests for missing vector icmp folds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278751 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 21:47:50 +00:00
Eli Friedman
29e5e147c7 Fix typo in lowering for fp128 ueq.
Regression from r259791.

Differential Revision: https://reviews.llvm.org/D23374



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278750 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 21:46:19 +00:00
Jan Vesely
fc94e66b10 AMDGPU/R600: Convert buffer id to VTX_READ input
Use patterns instead of multiple instructions
Add buffer id to asm string

https://reviews.llvm.org/D22650

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278749 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 21:38:30 +00:00
Hemant Kulkarni
072a33f253 Really fix the issue with 502957cc9cf805dc6093950e8cdcd0db4969d933. Windows %p and FileCheck limitations makes the test linux only
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278748 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 21:38:23 +00:00
Sanjay Patel
72159afddb [InstCombine] add tests for missing vector icmp folds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278747 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 21:37:24 +00:00
Tim Northover
b430a4adda GlobalISel: support loads and stores of strange types.
Before we mischaracterized structs and i1 types as a scalar with size 0 in
various ways.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278744 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 21:13:17 +00:00
Teresa Johnson
889162f9a1 Remove unnecessary flag from new test
Remove -disable-inlining flag that snuck into the test I added for r278739.
It doesn't have an effect in ThinLTO mode (something that should be fixed),
but in any case the checks depend on inlining currently.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278743 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 21:07:57 +00:00
Sanjay Patel
70fd49b5bf update tests to use FileCheck and exact checking
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278741 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 21:02:25 +00:00
Sanjoy Das
b4ca813e88 Revert "[ValueTracking] Improve ValueTracking on left shift with nsw flag"
This reverts commit r278172.  It causes PR28946.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278740 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 21:01:31 +00:00
Teresa Johnson
d73e1345aa [ThinLTO] Remove functions resolved to available_externally from comdats
Summary:
thinLTOResolveWeakForLinkerModule needs to drop any preempted weak symbols
that were converted to available_externally from comdats, otherwise we
will get a verification failure (since available_externally is a
declaration for the linker, and no declarations can be in a comdat).

Reviewers: mehdi_amini

Subscribers: llvm-commits, mehdi_amini

Differential Revision: https://reviews.llvm.org/D23015

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278739 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 21:00:04 +00:00
Sanjay Patel
f9b2472517 [InstCombine] add tests for missing vector icmp folds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278737 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 20:56:11 +00:00
Hemant Kulkarni
3928f27c2d Fix a test that failed due to:
https://llvm.org/svn/llvm-project/llvm/trunk@278725 91177308-0d34-0410-b5e6-96231b3b80d8

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278732 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 20:36:16 +00:00
David L Kreitzer
1e230bc8b4 Enhance SCEV to compute the trip count for some loops with unknown stride.
Patch by Pankaj Chawla

Differential Revision: https://reviews.llvm.org/D22377


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278731 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 20:21:41 +00:00
Sanjay Patel
fa85d67d36 [InstCombine] add test for missing vector icmp fold
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278727 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 20:02:40 +00:00
Sanjay Patel
f7714c1cd1 [InstCombine] add tests for vector icmp folds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278726 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 19:58:21 +00:00
Hemant Kulkarni
502957cc9c llvm-objdump: Implement source[line numbers] interleaving
Differential Revsion: https://reviews.llvm.org/D22932

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278725 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 19:49:24 +00:00
Kostya Serebryany
e286c13fc8 [libFuzzer] print a verbose message after executing inputs in non-fuzzing mode
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278724 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 19:44:04 +00:00
Kostya Serebryany
0347ebc2df [libFuzzer] fix the bot
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278721 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 19:36:13 +00:00
Sanjay Patel
7016f855b3 [InstCombine] add tests for missing vector icmp folds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278717 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 19:16:33 +00:00
Sanjay Patel
bb8ab1ab78 update test to use FileCheck and autogenerated checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278714 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 18:56:10 +00:00
Reid Kleckner
ade7edf502 Fix WAsm test after LSR change in r278658
Now the increment is done in a different location

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278713 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 18:51:42 +00:00
Matthias Braun
1741b5a541 Revert "[Thumb] Validate branch target for CBZ/CBNZ instructions."
This currently breaks the greendragon clang-stage1-configure-RA/ and
brotli. It is probably just uncovering a pre-existing problem. Reverting
temporarily to get the buildbots green again. A reduced testcase will
follow shortly.

This reverts commit r278659.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278711 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 18:50:13 +00:00
Sanjay Patel
66842c0725 [InstCombine] add tests for missing vector icmp folds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278709 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 18:45:10 +00:00
Sanjay Patel
a451d6b7d4 [InstCombine] add test for missing vector icmp fold
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278708 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 18:39:54 +00:00
Sanjay Patel
3d09ca24ae minimize test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278707 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 18:35:44 +00:00
Sanjay Patel
cc96a8ce86 remove unnecessary IR comments about uses
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278705 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 18:32:50 +00:00
Sanjay Patel
8b850ac940 [InstCombine] add tests for missing vector icmp folds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278704 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 18:26:56 +00:00
Wolfgang Pieb
1bb8cbfd42 Local variables whose address is taken and passed on to a call are described
in debug info using their stack slots instead of as an indirection of param reg + 0
offset. This is done by detecting FrameIndexSDNodes in SelectionDAG and generating
FrameIndexDbgValues for them. This ultimately generates DBG_VALUEs with stack
location operands.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278703 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 18:18:26 +00:00
Sanjay Patel
f5c5c7dfe0 [InstCombine] add tests for missing vector icmp folds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278689 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 17:55:39 +00:00