Commit Graph

136766 Commits

Author SHA1 Message Date
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
Sanjay Patel
9e679db4f1 [InstCombine] remove unnecessary function attributes from tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278633 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-14 21:48:21 +00:00
Sanjay Patel
6eea5bde3c [InstCombine] add tests for missing vector icmp folds
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278632 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-14 21:36:22 +00:00
Sanjay Patel
4865e7bd91 [InstCombine] add test for missing vector icmp fold
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278631 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-14 21:05:08 +00:00
Sanjay Patel
3bf3ce9256 [InstCombine] add test for missing vector icmp fold
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278630 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-14 20:39:42 +00:00
Craig Topper
98df2b17a8 [AVX-512] Mark VPMADDWD as commutable to match SSE/AVX version.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278629 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-14 17:57:22 +00:00
Craig Topper
8cbb186f8c [AVX-512] Add masked commutable floating point max/min instructions to folding tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278628 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-14 17:57:19 +00:00
Craig Topper
48894694d5 [AVX-512] Add masked logical operations to memory folding tables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278627 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-14 17:57:16 +00:00
Igor Breger
1a3669b36e [AVX512] Fix VFPCLASSSD/VFPCLASSSS intrinsic lowering. The i1 result should be zero extended according to SPEC.
Differential Revision: http://reviews.llvm.org/D23489

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278626 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-14 13:58:57 +00:00
Igor Breger
96cefd6f44 autogenerate checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278624 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-14 09:34:39 +00:00
Igor Breger
bf57b01543 [AVX512] Fix insertelement i1 lowering.
1. Use shuffle to insert element i1 into vector. The previous implementation was incorrect ( dest_bit OR src_bit , it doesn't clear the bit if src_bit=0 )
2. Improve shuffle i1 vector, use CVT2MASK if supported instead TRUNCATE.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278623 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-14 05:25:07 +00:00
Saleem Abdulrasool
5724bf57e1 Revert "gold: add a cast to appease std::max NFC"
This was fixed differently by Teresa and this should no longer be needed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@278622 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-14 05:07:20 +00:00