Commit Graph

136777 Commits

Author SHA1 Message Date
Hemant Kulkarni
072a33f253 Really fix the issue with 502957cc9c. 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
Kostya Serebryany
137c3957ed [libFuzzer] add InsertRepeatedBytes and EraseBytes.
New mutation: InsertRepeatedBytes.
Updated mutation: EraseByte => EraseBytes.

This helps https://github.com/google/sanitizers/issues/710
where libFuzzer was not able to find a known bug.
Now it finds it in minutes.

Hopefully, the change is general enough to help other targets.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278687 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 17:48:28 +00:00
Sanjay Patel
12b2b51065 [InstCombine] auto-generate exact checks
Note that several of these tests belong in InstSimplify rather than
InstCombine because they return existing operands or constants.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278684 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 17:19:07 +00:00
Sanjay Patel
e0a314cca9 [InstCombine] add tests for missing vector icmp folds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278683 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 17:10:35 +00:00
Yaxun Liu
93a7ad2603 AMDGPU: Update AMDGPURuntimeMetadata.h for enums of address space qualifiers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278682 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 16:54:25 +00:00
Matt Arsenault
8f1b18be38 AMDGPU: Don't fold subregister extracts into tied operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278676 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 16:18:36 +00:00
Reid Kleckner
515497059a Revert "[SimplifyCFG] Rewrite SinkThenElseCodeToEnd"
This reverts commit r278660.

It causes downstream assertion failure in InstCombine on shuffle
instructions. Comes up in __mm_swizzle_epi32.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278672 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 15:42:31 +00:00
Valery Pykhtin
9364829511 [AMDGPU] fix failure on printing of non-existing instruction operands.
Differential revision: https://reviews.llvm.org/D23323

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278665 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 10:56:48 +00:00
Sjoerd Meijer
47a3de7f4d MachineLoop: add methods findLoopControlBlock and findLoopPreheader
This adds two new utility functions findLoopControlBlock and findLoopPreheader
to MachineLoop and MachineLoopInfo. These functions are refactored and taken
from the Hexagon target as they are target independent; thus this is intendend to
be a non-functional change.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278661 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 08:22:42 +00:00
James Molloy
7bc6001b57 [SimplifyCFG] Rewrite SinkThenElseCodeToEnd
The new version has several advantages:
  1) IMSHO it's more readable and neater
  2) It handles loads and stores properly
  3) It can handle any number of incoming blocks rather than just two. I'll be taking advantage of this in a followup patch.

With this change we can now finally sink load-modify-store idioms such as:

    if (a)
      return *b += 3;
    else
      return *b += 4;

    =>

    %z = load i32, i32* %y
    %.sink = select i1 %a, i32 5, i32 7
    %b = add i32 %z, %.sink
    store i32 %b, i32* %y
    ret i32 %b

When this works for switches it'll be even more powerful.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278660 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 08:04:56 +00:00
Prakhar Bahuguna
91c19fbe6c [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@278659 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 07:57:44 +00:00
James Molloy
bd7c3fb3bf [LSR] Don't try and create post-inc expressions on non-rotated loops
If a loop is not rotated (for example when optimizing for size), the latch is not the backedge. If we promote an expression to post-inc form, we not only increase register pressure and add a COPY for that IV expression but for all IVs!

Motivating testcase:

    void f(float *a, float *b, float *c, int n) {
      while (n-- > 0)
        *c++ = *a++ + *b++;
    }

It's imperative that the pointer increments be located in the latch block and not the header block; if not, we cannot use post-increment loads and stores and we have to keep both the post-inc and pre-inc values around until the end of the latch which bloats register usage.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278658 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 07:53:03 +00:00
Craig Topper
24088baa9d [X86] PADDUSB/W instructions should be commutable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278654 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 06:31:57 +00:00
Craig Topper
d1a8c19b04 [X86] Mark some of the X86 SDNodes as commutative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278653 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 04:47:30 +00:00
Craig Topper
ed1f4b6522 [X86] X86ISD::FANDN is not commutative or associative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278652 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 04:47:28 +00:00
David Majnemer
937229d0bb [ScopedNoAliasAA] collectMDInDomain should be a free function
collectMDInDomain doesn't use any class members, making it a free
function is not a functional change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278651 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 03:56:06 +00:00
David Majnemer
24f7cd87f7 [ScopedNoAliasAA] Only collect noalias nodes if we have alias.scope nodes
No functional change is intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278646 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 02:23:50 +00:00
David Majnemer
a7273755a8 [ScopedNoAliasAA] Replace !ScopeNodes.size() with ScopeNodes.empty()
No functional change is intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278645 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 02:23:48 +00:00
David Majnemer
28873d7b25 Revert "[ScopedNoAliasAA] Remove an unneccesary set"
This reverts commit r278641.  I'm not sure why but this has upset the
multistage builders...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278644 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 02:23:46 +00:00
David Majnemer
6bd5c84e0b [ScopedNoAliasAA] Remove an unneccesary set
We are trying to prove that one group of operands is a subset of
another.  We did this by populating two Sets and determining that every
element within one was inside the other.

However, this is unnecessary.  We can simply construct a single set and
test if each operand is within it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278641 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-15 00:13:04 +00:00
Sanjay Patel
b3d14d2afd [InstCombine] add test for missing vector icmp fold
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278639 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-14 22:56:46 +00:00
Sanjay Patel
93591d18ed [InstCombine] add tests for vector icmp folds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278637 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-14 22:44:10 +00:00
Sanjay Patel
aafbbf8cdb [InstCombine] add test for potentially missing vector icmp fold
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278636 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-14 22:30:07 +00:00
Sanjay Patel
bc87c37f6b [InstCombine] add test for missing vector icmp fold
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278635 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-14 22:29:27 +00:00
Sanjay Patel
411c4dba0b [InstCombine] add tests for missing vector icmp folds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278634 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-14 22:28:50 +00:00