OSDN Git Service

android-x86/external-llvm.git
7 years ago[X86][MMX] Test showing failure to create MMX non-temporal store
Simon Pilgrim [Thu, 6 Apr 2017 10:32:30 +0000 (10:32 +0000)]
[X86][MMX] Test showing failure to create MMX non-temporal store

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299640 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[globalisel][tablegen] Move <Target>InstructionSelector declarations to anonymous...
Daniel Sanders [Thu, 6 Apr 2017 09:49:34 +0000 (09:49 +0000)]
[globalisel][tablegen] Move <Target>InstructionSelector declarations to anonymous namespaces

Summary: This resolves the issue of tablegen-erated includes in the headers for non-GlobalISel builds in a simpler way than before.

Reviewers: qcolombet, ab

Reviewed By: ab

Subscribers: igorb, ab, mgorny, dberris, rovka, llvm-commits, kristof.beyls

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299637 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[ARM] Remove a dead ADD during the creation of TBBs
David Green [Thu, 6 Apr 2017 08:32:47 +0000 (08:32 +0000)]
[ARM] Remove a dead ADD during the creation of TBBs

During the optimisation of jump tables in the constant island pass,
an extra ADD could be left over, now dead but not removed.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299634 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[InstSimplify] Add test cases for mixing add/sub i1 with xor of i1. Seems we can...
Craig Topper [Thu, 6 Apr 2017 05:48:06 +0000 (05:48 +0000)]
[InstSimplify] Add test cases for mixing add/sub i1 with xor of i1. Seems we can simplify in one direction but not the other.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299627 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[InstSimplify] Teach SimplifyAddInst and SimplifySubInst that vectors of i1 can be...
Craig Topper [Thu, 6 Apr 2017 05:28:41 +0000 (05:28 +0000)]
[InstSimplify] Teach SimplifyAddInst and SimplifySubInst that vectors of i1 can be treated as Xor too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299626 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[XRay][docs] Fix hyperlink to XRay doc
Dean Michael Berris [Thu, 6 Apr 2017 04:26:26 +0000 (04:26 +0000)]
[XRay][docs] Fix hyperlink to XRay doc

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299624 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[Orc] Add missing header include for r299611.
Lang Hames [Thu, 6 Apr 2017 04:12:47 +0000 (04:12 +0000)]
[Orc] Add missing header include for r299611.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299623 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRevert accidental commit of r299619.
Craig Topper [Thu, 6 Apr 2017 04:04:10 +0000 (04:04 +0000)]
Revert accidental commit of r299619.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299622 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRevert accidental commit of r299618
Craig Topper [Thu, 6 Apr 2017 04:03:34 +0000 (04:03 +0000)]
Revert accidental commit of r299618

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299621 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[IR] Add commutable matchers for Add and Mul to go with the logic operations that...
Craig Topper [Thu, 6 Apr 2017 04:02:33 +0000 (04:02 +0000)]
[IR] Add commutable matchers for Add and Mul to go with the logic operations that are already present. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299620 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agobar
Craig Topper [Thu, 6 Apr 2017 04:02:31 +0000 (04:02 +0000)]
bar

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299619 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agofoo
Craig Topper [Thu, 6 Apr 2017 04:02:28 +0000 (04:02 +0000)]
foo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299618 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[XRay] - Fix spelling error to test commit access.
Keith Wyss [Thu, 6 Apr 2017 03:32:01 +0000 (03:32 +0000)]
[XRay] - Fix spelling error to test commit access.

Just a spelling change in a comment intended to test svn commit access.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299616 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[Orc] Break QueueChannel out into its own header and add a utility,
Lang Hames [Thu, 6 Apr 2017 01:49:21 +0000 (01:49 +0000)]
[Orc] Break QueueChannel out into its own header and add a utility,
createPairedQueueChannels, to simplify channel creation in the RPC unit tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299611 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[Orc] Make orcError return an error_code rather than Error.
Lang Hames [Thu, 6 Apr 2017 01:35:13 +0000 (01:35 +0000)]
[Orc] Make orcError return an error_code rather than Error.

This will allow orcError to be used in convertToErrorCode implementations,
which will help in transitioning Orc RPC to Error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299610 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[lit] Implement timeouts and max_time for process pool testing
Reid Kleckner [Thu, 6 Apr 2017 00:38:28 +0000 (00:38 +0000)]
[lit] Implement timeouts and max_time for process pool testing

This is necessary to pass the lit test suite at llvm/utils/lit/tests.

There are some pre-existing failures here, but now switching to pools
doesn't regress any tests.

I had to change test-data/lit.cfg to import DummyConfig from a module to
fix pickling problems, but I think it'll be OK if we require test
formats to be written in real .py modules outside lit.cfg files.

I also discovered that in some circumstances AsyncResult.wait() will not
raise KeyboardInterrupt in a timely manner, but you can pass a non-zero
timeout to work around this. This makes threading.Condition.wait use a
polling loop that runs through the interpreter, so it's capable of
asynchronously raising KeyboardInterrupt.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299605 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoStringTableBuilder: Don't assert when writing an empty raw string table.
Peter Collingbourne [Thu, 6 Apr 2017 00:10:17 +0000 (00:10 +0000)]
StringTableBuilder: Don't assert when writing an empty raw string table.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299602 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoBitcode: Remove an unused declaration. NFC.
Peter Collingbourne [Wed, 5 Apr 2017 22:49:52 +0000 (22:49 +0000)]
Bitcode: Remove an unused declaration. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299598 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[Bugpoint] Use `unique_ptr` correctly.
Bryant Wong [Wed, 5 Apr 2017 22:23:48 +0000 (22:23 +0000)]
[Bugpoint] Use `unique_ptr` correctly.

Moving Modules into `testMergedProgram` is incorrect (and causes segmentation
faults) since all callers expect to retain ownership. This is evidenced by the
later calls to `unique_ptr<Module>::get` in the same function.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299596 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86 TTI] Implement LSV hook
Keno Fischer [Wed, 5 Apr 2017 20:51:38 +0000 (20:51 +0000)]
[X86 TTI] Implement LSV hook

Summary:
LSV wants to know the maximum size that can be loaded to a vector register.
On X86, this always matches the maximum register width. Implement this
accordingly and add a test to make sure that LSV can vectorize up to the
maximum permissible width on X86.

Reviewers: delena, arsenm

Reviewed By: arsenm

Subscribers: wdng, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299589 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRemove accidental debug printf. Follow up to r299583.
Ivan Krasin [Wed, 5 Apr 2017 20:07:43 +0000 (20:07 +0000)]
Remove accidental debug printf. Follow up to r299583.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299584 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRevert r299536. [AMDGPU] SDWA peephole: enable by default.
Ivan Krasin [Wed, 5 Apr 2017 19:58:12 +0000 (19:58 +0000)]
Revert r299536. [AMDGPU] SDWA peephole: enable by default.

Reason: breaks multiple bots:

http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/3988
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap/builds/1173

Original Review URL: https://reviews.llvm.org/D31671

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299583 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[Hexagon] Use -mattr to select HVX mode in a testcase, NFC
Krzysztof Parzyszek [Wed, 5 Apr 2017 19:46:37 +0000 (19:46 +0000)]
[Hexagon] Use -mattr to select HVX mode in a testcase, NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299582 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMemorySSA: Remove MemorySSA walker caching.
Daniel Berlin [Wed, 5 Apr 2017 19:01:58 +0000 (19:01 +0000)]
MemorySSA: Remove MemorySSA walker caching.

Summary:
Remove all the caching the clobber walker does, and that the
caching walker does.  With the patch to enable storing clobbering
access results for stores, i can find no improvement with the cache
turned on (and a number of degradations, both time and memory, from
the cost of caching.  For a large program i have, we do millions of
lookups and inserts with zero hits).

I haven't tried to rename or simplify the walker otherwise yet.

(Appreciate some perf testing on this past my own testing)

Reviewers: george.burgess.iv, davide

Subscribers: Prazek, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299578 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[llvm-readobj] Only print the real size of the note
Petr Hosek [Wed, 5 Apr 2017 18:55:50 +0000 (18:55 +0000)]
[llvm-readobj] Only print the real size of the note

Note payloads are padded to a multiple of 4 bytes in size, but the size
of the string that should be print can be smaller e.g. the n_descsz
field in gold's version note is 9, so that's the whole size of the
string that should be printed. The padding is part of the format of a
SHT_NOTE section or PT_NOTE segment, but it's not part of the note
itself.

Printing the extra null bytes may confuse some tools, e.g. when the
llvm-readobj is sent to grep, it treats the output as binary because
it contains a null byte.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299576 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[DAGCombine] Support FMF contract in fused multiple-and-sub too
Adam Nemet [Wed, 5 Apr 2017 17:58:48 +0000 (17:58 +0000)]
[DAGCombine] Support FMF contract in fused multiple-and-sub too

This is a follow-on to r299096 which added support for fmadd.

Subtract does not have the case where with two multiply operands we commute in
order to fuse with the multiply with the fewer uses.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299572 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[DAGCombine] Remove commented-out code from r299096
Adam Nemet [Wed, 5 Apr 2017 17:58:44 +0000 (17:58 +0000)]
[DAGCombine] Remove commented-out code from r299096

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299571 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[InstCombine] add fold for icmp with or mask of low bits (PR32542)
Sanjay Patel [Wed, 5 Apr 2017 17:57:05 +0000 (17:57 +0000)]
[InstCombine] add fold for icmp with or mask of low bits (PR32542)

We already have these 'and' folds:

// X & -C == -C -> X >  u ~C
// X & -C != -C -> X <= u ~C
//   iff C is a power of 2

...but we were missing the 'or' siblings.

http://rise4fun.com/Alive/n6

This should improve:
https://bugs.llvm.org/show_bug.cgi?id=32524
...but there are 2 or more other pieces to fix still.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299570 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[ExecutionDepsFix] Don't recurse over the CFG
Keno Fischer [Wed, 5 Apr 2017 17:42:56 +0000 (17:42 +0000)]
[ExecutionDepsFix] Don't recurse over the CFG

Summary:
Use an explicit work queue instead, to avoid accidentally
causing stack overflows for input with very large CFGs.

Reviewed By: mehdi_amini
Differential Revision: https://reviews.llvm.org/D31681

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299569 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[InstCombine] fix formatting and variable names; NFCI
Sanjay Patel [Wed, 5 Apr 2017 17:38:34 +0000 (17:38 +0000)]
[InstCombine] fix formatting and variable names; NFCI

There must be some opportunity to refactor big chunks of nearly duplicated code in FoldOrOfICmps / FoldAndOfICmps.
Also, none of this works with vectors, but it should.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299568 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AMDGPU][MC] Fix for Bug 28158 + LIT tests
Dmitry Preobrazhensky [Wed, 5 Apr 2017 17:26:45 +0000 (17:26 +0000)]
[AMDGPU][MC] Fix for Bug 28158 + LIT tests

Added support of the following instructions:
- s_cbranch_cdbgsys
- s_cbranch_cdbgsys_and_user
- s_cbranch_cdbgsys_or_user
- s_cbranch_cdbguser
- s_setkill

Reviewers: vpykhtin

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299567 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMemorySSA: Fix and use optimized_def_chain
Daniel Berlin [Wed, 5 Apr 2017 17:26:25 +0000 (17:26 +0000)]
MemorySSA: Fix and use optimized_def_chain

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299566 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[lit] Revert to old execution strategy while I debug these pickling errors
Reid Kleckner [Wed, 5 Apr 2017 17:16:37 +0000 (17:16 +0000)]
[lit] Revert to old execution strategy while I debug these pickling errors

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299565 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[lit] Use Python 3 style print to satisfy some bots
Reid Kleckner [Wed, 5 Apr 2017 17:05:31 +0000 (17:05 +0000)]
[lit] Use Python 3 style print to satisfy some bots

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299564 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoARMFrameLowering: Slight cleanups; NFC
Matthias Braun [Wed, 5 Apr 2017 16:58:41 +0000 (16:58 +0000)]
ARMFrameLowering: Slight cleanups; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299562 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[lit] Use process pools for test execution by default
Reid Kleckner [Wed, 5 Apr 2017 16:44:56 +0000 (16:44 +0000)]
[lit] Use process pools for test execution by default

Summary:
This drastically reduces lit test execution startup time on Windows. Our
previous strategy was to manually create one Process per job and manage
the worker pool ourselves. Instead, let's use the worker pool provided
by multiprocessing.  multiprocessing.Pool(jobs) returns almost
immediately, and initializes the appropriate number of workers, so they
can all start executing tests immediately. This avoids the ramp-up
period that the old implementation suffers from.  This appears to speed
up small test runs.

Here are some timings of the llvm-readobj tests on Windows using the
various execution strategies:

 # multiprocessing.Pool:
$ for i in `seq 1 3`; do tim python ./bin/llvm-lit.py -sv ../llvm/test/tools/llvm-readobj/ --use-process-pool |& grep real: ; done
real: 0m1.156s
real: 0m1.078s
real: 0m1.094s

 # multiprocessing.Process:
$ for i in `seq 1 3`; do tim python ./bin/llvm-lit.py -sv ../llvm/test/tools/llvm-readobj/ --use-processes |& grep real: ; done
real: 0m6.062s
real: 0m5.860s
real: 0m5.984s

 # threading.Thread:
$ for i in `seq 1 3`; do tim python ./bin/llvm-lit.py -sv ../llvm/test/tools/llvm-readobj/ --use-threads |& grep real: ; done
real: 0m9.438s
real: 0m10.765s
real: 0m11.079s

I kept the old code to launch processes in case this change doesn't work
on all platforms that LLVM supports, but at some point I would like to
remove both the threading and old multiprocessing execution strategies.

Reviewers: modocache, rafael

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299560 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[ARM] Try to re-enable MachineBranchProb.ll for ARM/AArch64
Renato Golin [Wed, 5 Apr 2017 16:27:11 +0000 (16:27 +0000)]
[ARM] Try to re-enable MachineBranchProb.ll for ARM/AArch64

Commit r298799 changed code that made the XFAIL on MachineBranchProb.ll
irrelevant, but some configurations still failed. I can't reproduce it
locally, so I'm hoping that enabling this will tell me if some
configurations will really fail or if they were just too slow.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299558 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[InstCombine] add tests for missing icmp fold (PR32524)
Sanjay Patel [Wed, 5 Apr 2017 16:21:38 +0000 (16:21 +0000)]
[InstCombine] add tests for missing icmp fold (PR32524)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299557 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AMDGPU][MC] Fix for Bug 28167 + LIT tests
Dmitry Preobrazhensky [Wed, 5 Apr 2017 16:08:21 +0000 (16:08 +0000)]
[AMDGPU][MC] Fix for Bug 28167 + LIT tests

Corrected src0 for v_writelane_b32:
- Enabled inline constants and literals for SI/CI (VOP2)
- Enabled inline constants for VI (VOP3)

Reviewers: vpykhtin, arsenm

https://reviews.llvm.org/D31463

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299555 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[SystemZ] Prevent Merging Bitcast with non-normal loads
Nirav Dave [Wed, 5 Apr 2017 15:42:48 +0000 (15:42 +0000)]
[SystemZ] Prevent Merging Bitcast with non-normal loads

Fixes PR32505.

Reviewers: uweigand, jonpa

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299552 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[yaml2obj] Factor out error handling code.
Davide Italiano [Wed, 5 Apr 2017 15:18:16 +0000 (15:18 +0000)]
[yaml2obj] Factor out error handling code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299551 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[llvm-ar] Remove unneeded std::, NFCI.
Davide Italiano [Wed, 5 Apr 2017 15:05:05 +0000 (15:05 +0000)]
[llvm-ar] Remove unneeded std::, NFCI.

This makes it more consistent with other exit() calls in llvm-ar
(and the tools in general).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299549 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[llvm-ar] errors go on stderr and not on stdout.
Davide Italiano [Wed, 5 Apr 2017 14:52:17 +0000 (14:52 +0000)]
[llvm-ar] errors go on stderr and not on stdout.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299548 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRespect CMAKE_INSTALL_MANDIR for sphinx generated manpages
Jonathan Roelofs [Wed, 5 Apr 2017 14:49:46 +0000 (14:49 +0000)]
Respect CMAKE_INSTALL_MANDIR for sphinx generated manpages

This is a re-work of r297516, which was reverted in r297545.

https://reviews.llvm.org/D30906

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299547 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[yaml2obj] Improve error message when output file cannot be opened.
Davide Italiano [Wed, 5 Apr 2017 14:44:00 +0000 (14:44 +0000)]
[yaml2obj] Improve error message when output file cannot be opened.

Patch by Sam Clegg!

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299546 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[LV] Make test case more robust
Matthew Simpson [Wed, 5 Apr 2017 14:34:13 +0000 (14:34 +0000)]
[LV] Make test case more robust

This test case depends on the loop being vectorized without forcing the
vectorization factor. If the profitability ever changes in the future (due to
cost model improvements), the test may no longer work as intended. Instead of
checking the resulting IR, we should just check the instruction costs. The
costs will be computed regardless if vectorization is profitable.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299545 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[DAGCombiner] add and use TLI hook to convert and-of-seteq / or-of-setne to bitwise...
Sanjay Patel [Wed, 5 Apr 2017 14:09:39 +0000 (14:09 +0000)]
[DAGCombiner] add and use TLI hook to convert and-of-seteq / or-of-setne to bitwise logic+setcc (PR32401)

This is a generic combine enabled via target hook to reduce icmp logic as discussed in:
https://bugs.llvm.org/show_bug.cgi?id=32401

It's likely that other targets will want to enable this hook for scalar transforms,
and there are probably other patterns that can use bitwise logic to reduce comparisons.

Note that we are missing an IR canonicalization for these patterns, and we will probably
prefer the pair-of-compares form in IR (shorter, more likely to fold).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299542 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[DAGCombiner] Don't make a BUILD_VECTOR with operands of illegal type.
Jonas Paulsson [Wed, 5 Apr 2017 13:45:37 +0000 (13:45 +0000)]
[DAGCombiner]  Don't make a BUILD_VECTOR with operands of illegal type.

When DAGCombiner visits a SIGN_EXTEND_INREG of a BUILD_VECTOR with
constant operands, a new BUILD_VECTOR node will be created transformed
constants.

Llvm-stress found a case where the new BUILD_VECTOR had constant operands
of an illegal type, because the (legal) element type is in fact not a legal
scalar type.

This patch changes this so that the new BUILD_VECTOR has the same operand
type as the old one.

Review: Eli Friedman, Nirav Dave
https://bugs.llvm.org//show_bug.cgi?id=32422

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299540 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[InstCombine] add tests for missing add canonicalization; NFC
Sanjay Patel [Wed, 5 Apr 2017 13:33:10 +0000 (13:33 +0000)]
[InstCombine] add tests for missing add canonicalization; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299539 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[globalisel][tablegen] Fix patterns involving multiple ComplexPatterns.
Daniel Sanders [Wed, 5 Apr 2017 13:14:03 +0000 (13:14 +0000)]
[globalisel][tablegen] Fix patterns involving multiple ComplexPatterns.

Summary:
Temporaries are now allocated to operands instead of predicates and this
allocation is used to correctly pair up the rendered operands with the
matched operands.

Previously, ComplexPatterns were allocated temporaries independently in the
Src Pattern and Dst Pattern, leading to mismatches. Additionally, the Dst
Pattern failed to account for the allocated index and therefore always used
temporary 0, 1, ... when it should have used base+0, base+1, ...

Thanks to Aditya Nandakumar for noticing the bug.

Depends on D30539

Reviewers: ab, t.p.northover, qcolombet, rovka, aditya_nandakumar

Reviewed By: rovka

Subscribers: igorb, dberris, kristof.beyls, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299538 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AMDGPU] SDWA peephole: enable by default
Sam Kolton [Wed, 5 Apr 2017 12:00:45 +0000 (12:00 +0000)]
[AMDGPU] SDWA peephole: enable by default

Reviewers: vpykhtin, rampitec, arsenm

Subscribers: qcolombet, kzhuravl, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299536 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoFix WebAssembly after r299529.
Alexander Kornienko [Wed, 5 Apr 2017 11:50:43 +0000 (11:50 +0000)]
Fix WebAssembly after r299529.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299535 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86][SSE] Renamed combine to make it clear that it only handles the vector shift...
Simon Pilgrim [Wed, 5 Apr 2017 10:44:42 +0000 (10:44 +0000)]
[X86][SSE] Renamed combine to make it clear that it only handles the vector shift by immediate opcodes. NFCI

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299532 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AArch64] Crypto requires FP.
James Molloy [Wed, 5 Apr 2017 10:44:38 +0000 (10:44 +0000)]
[AArch64] Crypto requires FP.

So if FP is disabled, crypto should also be disabled.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299531 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAdd MCContext argument to MCAsmBackend::applyFixup for error reporting
Alex Bradbury [Wed, 5 Apr 2017 10:16:14 +0000 (10:16 +0000)]
Add MCContext argument to MCAsmBackend::applyFixup for error reporting

A number of backends (AArch64, MIPS, ARM) have been using
MCContext::reportError to report issues such as out-of-range fixup values in
their TgtAsmBackend. This is great, but because MCContext couldn't easily be
threaded through to the adjustFixupValue helper function from its usual
callsite (applyFixup), these backends ended up adding an MCContext* argument
and adding another call to applyFixup to processFixupValue. Adding an
MCContext parameter to applyFixup makes this unnecessary, and even better -
applyFixup can take a reference to MCContext rather than a potentially null
pointer.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299529 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[LAA] Correctly return a half-open range in expandBounds
James Molloy [Wed, 5 Apr 2017 09:24:26 +0000 (09:24 +0000)]
[LAA] Correctly return a half-open range in expandBounds

This is a latent bug that's been hanging around for a while. For a loop-invariant
pointer, expandBounds would return the range {Ptr, Ptr}, but this was interpreted
as a half-open range, not a closed range. So we ended up planting incorrect
bounds checks. Even worse, they were tautological, so we ended up incorrectly
executing the optimized loop.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299526 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[coroutines] Add syntax coloring to examples in Coroutines.rst
Gor Nishanov [Wed, 5 Apr 2017 05:26:26 +0000 (05:26 +0000)]
[coroutines] Add syntax coloring to examples in Coroutines.rst

Subscribers: EricWF

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299517 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[ObjCArc] Do not dereference an invalidated iterator.
Akira Hatanaka [Wed, 5 Apr 2017 03:44:09 +0000 (03:44 +0000)]
[ObjCArc] Do not dereference an invalidated iterator.

Fix a bug in ARC contract pass where an iterator that pointed to a
deleted instruction was dereferenced.

It appears that tryToContractReleaseIntoStoreStrong was incorrectly
assuming that a call to objc_retain would not immediately follow a call
to objc_release.

rdar://problem/25276306

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299507 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[RuntimeDyld] Remove an unused static member left over from r299449.
Lang Hames [Wed, 5 Apr 2017 01:43:59 +0000 (01:43 +0000)]
[RuntimeDyld] Remove an unused static member left over from r299449.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299497 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoThinLTOBitcodeWriter: handle aliases first in filterModule
Bob Haarman [Wed, 5 Apr 2017 00:42:07 +0000 (00:42 +0000)]
ThinLTOBitcodeWriter: handle aliases first in filterModule

Summary: This change fixes a "local linkage requires default visibility" assert when attempting to build LLVM with ThinLTO on Windows.

Reviewers: pcc, tejohnson, mehdi_amini

Reviewed By: pcc

Subscribers: llvm-commits, Prazek

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299491 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86] Relax assert in broadcast-of-subvector lowering.
Ahmed Bougacha [Wed, 5 Apr 2017 00:14:39 +0000 (00:14 +0000)]
[X86] Relax assert in broadcast-of-subvector lowering.

Before r294774, there was a problem when lowering broadcasts to use
128-bit subvectors.

When we looked through a bitcast to find the broadcast input, we'd keep
using the original type, so you'd end up with things like:
  (v8f32 (broadcast
    (v4f32 (extract_subvector
      (v8i32 V),
      ...))
    ))

r294774 fixed it to always emit subvectors with the scalar type of the
original source.

It also introduced some asserts, to check that we use scalars with
the same size, and vectors with the same number of elements.

The scalar size equality is checked earlier when looking through bitcasts,
and is a useful assert.

However, the number of elements don't have to be identical: we're always
going to extract a 128-bit subvector, and we can have different size
inputs if we looked through a concat_vector to find a 256-bit source.

Relax the overzealous assert.

Replace it with a check of the original source vector being 256 or 512
bits.  If it's 128 bits, we can't extract_subvector from it.

Fixes PR32371.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299490 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAllow targets to opt-in to codegen in SCC order
Matt Arsenault [Tue, 4 Apr 2017 23:44:46 +0000 (23:44 +0000)]
Allow targets to opt-in to codegen in SCC order

Decouple this setting from EnableIRPA.

To support function calls on AMDGPU, it is necessary to
report the global register usage throughout the kernel's
call graph, so callees need to be handled first.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299487 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRe-apply MemorySSA: Add support for caching clobbering access in
Daniel Berlin [Tue, 4 Apr 2017 23:43:10 +0000 (23:43 +0000)]
Re-apply MemorySSA: Add support for caching clobbering access in
stores with some fixes.

Summary:
This enables us to cache the clobbering access for stores, despite the
fact that we can't rewrite the use-def chains themselves.

Early testing shows that, after this change, for larger testcases, it
will be a significant net positive (memory and time) to remove the
walker caching.

Reviewers: george.burgess.iv, davide

Subscribers: Prazek, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299486 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRevert "MemorySSA: Add support for caching clobbering access in stores"
Daniel Berlin [Tue, 4 Apr 2017 23:43:04 +0000 (23:43 +0000)]
Revert "MemorySSA: Add support for caching clobbering access in stores"

This reverts revision r299322.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299485 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[MC] Set defaults based on section names and support name suffixes
Petr Hosek [Tue, 4 Apr 2017 23:32:45 +0000 (23:32 +0000)]
[MC] Set defaults based on section names and support name suffixes

Set correct default flags and section type based on its name for .text,
.data, .bss, .init_array, .fini_array, .preinit_array, .tdata, and .tbss
and support section name suffixes for .data.*, .rodata.*, .text.*,
.bss.*, .tdata.* and .tbss.* which matches the behavior of GAS.

Fixes PR31888.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299484 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AArch64] Avoid partial register deps on insertelt of load into lane 0.
Ahmed Bougacha [Tue, 4 Apr 2017 22:55:53 +0000 (22:55 +0000)]
[AArch64] Avoid partial register deps on insertelt of load into lane 0.

This improves upon r246462: that prevented FMOVs from being emitted
for the cross-class INSERT_SUBREGs by disabling the formation of
INSERT_SUBREGs of LOAD.  But the ld1.s that we started selecting
caused us to introduce partial dependencies on the vector register.

Avoid that by using SCALAR_TO_VECTOR: it's a first-class citizen that
is folded away by many patterns, including the scalar LDRS that we
want in this case.

Credit goes to Adam for finding the issue!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299482 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoChange section flag character for SHF_LINK_ORDER to "o".
Evgeniy Stepanov [Tue, 4 Apr 2017 22:35:08 +0000 (22:35 +0000)]
Change section flag character for SHF_LINK_ORDER to "o".

GAS uses "m" as a compatibility alias for "M" (SHF_MERGE).

"o" is free, except on ia64, where it already means SHF_LINK_ORDER.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299479 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[InstCombine] Add test cases for various add/subtracts of constants(scalar, splat...
Craig Topper [Tue, 4 Apr 2017 22:22:30 +0000 (22:22 +0000)]
[InstCombine] Add test cases for various add/subtracts of constants(scalar, splat, and vector) with phis and selects. Improvements coming in a future commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299476 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[lit] Add a minimum export implementation.
Rafael Espindola [Tue, 4 Apr 2017 22:20:18 +0000 (22:20 +0000)]
[lit] Add a minimum export implementation.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299475 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[InstCombine] rename variable for easier reading; NFC
Sanjay Patel [Tue, 4 Apr 2017 22:06:03 +0000 (22:06 +0000)]
[InstCombine] rename variable for easier reading; NFC

We usually give constants a 'C' somewhere in the name...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299474 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[InstCombine] Turn subtract of vectors of i1 into xor like we do for scalar i1. Match...
Craig Topper [Tue, 4 Apr 2017 21:44:56 +0000 (21:44 +0000)]
[InstCombine] Turn subtract of vectors of i1 into xor like we do for scalar i1. Matches what we already do for add.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299472 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AArch64] Add missing schedinfo, check completeness for Falkor.
Balaram Makam [Tue, 4 Apr 2017 21:15:53 +0000 (21:15 +0000)]
[AArch64] Add missing schedinfo, check completeness for Falkor.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299468 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[ExecutionDepsFix] Don't revisit true dependencies
Keno Fischer [Tue, 4 Apr 2017 20:30:47 +0000 (20:30 +0000)]
[ExecutionDepsFix] Don't revisit true dependencies

If an instruction has a true dependency, it makes sense for to use that
register for any undef read operands in the same instruction (we'll have
to wait for that register to become available anyway). This logic
was already implemented. However, the code would then still try to
revisit that instruction and break the dependency (and always fail,
since by definition a true dependency has to be live before the
instruction). Avoid revisiting such instructions as a performance
optimization. No functional change.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299467 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[InstCombine] Support folding and/or/xor with a constant vector RHS into selects...
Craig Topper [Tue, 4 Apr 2017 20:26:25 +0000 (20:26 +0000)]
[InstCombine] Support folding and/or/xor with a constant vector RHS into selects and phis

Currently we only fold with ConstantInt RHS. This generalizes to any Constant RHS.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299466 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AArch64][Fuchsia] Allow -mcmodel=kernel for --target=aarch64-fuchsia
Petr Hosek [Tue, 4 Apr 2017 19:51:53 +0000 (19:51 +0000)]
[AArch64][Fuchsia] Allow -mcmodel=kernel for --target=aarch64-fuchsia

This mode is just like -mcmodel=small except that it moves the
thread pointer from TPIDR_EL0 to TPIDR_EL1.

Patch by Roland McGrath.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299462 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[InstCombine] Add test cases for missing combines of phis with and/or/xor with consta...
Craig Topper [Tue, 4 Apr 2017 19:31:21 +0000 (19:31 +0000)]
[InstCombine] Add test cases for missing combines of phis with and/or/xor with constant argument. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299460 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoImplement host CPU detection for AArch64
Yi Kong [Tue, 4 Apr 2017 19:06:04 +0000 (19:06 +0000)]
Implement host CPU detection for AArch64

This shares detection logic with ARM(32), since AArch64 capable CPUs may
also run in 32-bit system mode.

We observe weird /proc/cpuinfo output for MSM8992 and MSM8994, where
they report all CPU cores as one single model, depending on which CPU
core the kernel is running on. As a workaround, we hardcode the known
CPU part name for these SoCs.

For big.LITTLE systems, this patch would only return the part name of
the first core (usually the little core). Proper support will be added
in a follow-up change.

Differential Revision: D31675

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299458 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoVerifier: Check some amdgpu calling convention restrictions
Matt Arsenault [Tue, 4 Apr 2017 18:43:11 +0000 (18:43 +0000)]
Verifier: Check some amdgpu calling convention restrictions

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299457 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AArch64] Refine Falkor Machine Model - Part 2
Balaram Makam [Tue, 4 Apr 2017 18:42:14 +0000 (18:42 +0000)]
[AArch64] Refine Falkor Machine Model - Part 2

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299456 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86][inline-asm] Add support for MS 'EVEN' directive
Coby Tayree [Tue, 4 Apr 2017 17:57:23 +0000 (17:57 +0000)]
[X86][inline-asm] Add support for MS 'EVEN' directive

MS assembly syntax provide us with the 'EVEN' directive as a synonymous to at&t '.even'.
This patch include the (small, simple) changes need to allow it.

Test is provided at the following (clang-side) review:
https://reviews.llvm.org/D27418

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299453 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[InstCombine] Add more test cases for missing combines of selects with and/or/xor...
Craig Topper [Tue, 4 Apr 2017 17:48:08 +0000 (17:48 +0000)]
[InstCombine] Add more test cases for missing combines of selects with and/or/xor with constant argument. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299450 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[RuntimeDyld] Make RuntimeDyld honor the ProcessAllSections flag.
Lang Hames [Tue, 4 Apr 2017 17:03:49 +0000 (17:03 +0000)]
[RuntimeDyld] Make RuntimeDyld honor the ProcessAllSections flag.

When the ProcessAllSections flag (introduced in r204398) is set RuntimeDyld is
supposed to make a call to the client's memory manager for every section in each
object that is loaded. Due to some missing checks, this was not happening in all
cases. This patch adds the missing cases, and fixes the Orc unit test that
verifies correct behavior for ProcessAllSections (The unit test had been
silently bailing out due to an ordering issue: a change in the test order meant
that this unit-test was running before the native target was registered. This
issue has also been fixed in this patch).

This fixes <rdar://problem/22789965>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299449 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[x86] remove dead select-of-constants transform; NFCI
Sanjay Patel [Tue, 4 Apr 2017 16:54:58 +0000 (16:54 +0000)]
[x86] remove dead select-of-constants transform; NFCI

https://reviews.llvm.org/D30537 / https://reviews.llvm.org/rL296977 added these transforms
and other related transforms to the generic DAGCombiner (with a hook that x86 sets to true),
so these patterns should not exist by the time we reach the target-specific combiner hook.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299448 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[PGO] Memory intrinsic calls optimization based on profiled size
Rong Xu [Tue, 4 Apr 2017 16:42:20 +0000 (16:42 +0000)]
[PGO] Memory intrinsic calls optimization based on profiled size

This patch optimizes two memory intrinsic operations: memset and memcpy based
on the profiled size of the operation. The high level transformation is like:
  mem_op(..., size)
  ==>
  switch (size) {
    case s1:
       mem_op(..., s1);
       goto merge_bb;
    case s2:
       mem_op(..., s2);
       goto merge_bb;
    ...
    default:
       mem_op(..., size);
       goto merge_bb;
    }
  merge_bb:

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299446 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAMDGPU: Remove legacy export intrinsic
Matt Arsenault [Tue, 4 Apr 2017 16:34:39 +0000 (16:34 +0000)]
AMDGPU: Remove legacy export intrinsic

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299444 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAMDGPU: Remove legacy image intrinsics
Matt Arsenault [Tue, 4 Apr 2017 16:34:35 +0000 (16:34 +0000)]
AMDGPU: Remove legacy image intrinsics

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299443 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86][MS-compatability]Allow named synonymous for MS-assembly operators
Coby Tayree [Tue, 4 Apr 2017 14:43:23 +0000 (14:43 +0000)]
[X86][MS-compatability]Allow named synonymous for MS-assembly operators

This patch enhances X86AsmParser's immediate expression parsing abilities, to include a named synonymous for selected binary/unary bitwise operators: {and,shl,shr,or,xor,not}, ultimately achieving better MS-compatability
MASM reference:
https://msdn.microsoft.com/en-us/library/94b6khh4.aspx

Differential Revision: D31277

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299439 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoStrip trailing whitespace
Simon Pilgrim [Tue, 4 Apr 2017 14:40:53 +0000 (14:40 +0000)]
Strip trailing whitespace

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299438 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[globalisel][tablegen] Fix non-determinism introduced in r299430.
Daniel Sanders [Tue, 4 Apr 2017 14:27:06 +0000 (14:27 +0000)]
[globalisel][tablegen] Fix non-determinism introduced in r299430.

This should fix the last issue on llvm-clang-x86_64-expensive-checks-win.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299436 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[globalisel][tablegen] Try to make MSVC happy with r299430
Daniel Sanders [Tue, 4 Apr 2017 13:52:00 +0000 (13:52 +0000)]
[globalisel][tablegen] Try to make MSVC happy with r299430

Fix other cases of 'const StringRef' creeping back in at the same time.

This should fix the llvm-clang-x86_64-expensive-checks-win buildbot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299433 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86][LLVM] Converting __mm{|256|512}_movm_epi{8|16|32|64} LLVMIR call into generic...
Michael Zuckerman [Tue, 4 Apr 2017 13:32:14 +0000 (13:32 +0000)]
[X86][LLVM] Converting __mm{|256|512}_movm_epi{8|16|32|64} LLVMIR call into generic intrinsics.

This patch is a part one of two reviews, one for the clang and the other for LLVM.
The patch deletes the back-end intrinsics and adds support for them in the auto upgrade.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299432 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[tablegen][globalisel] Add support for nested instruction matching.
Daniel Sanders [Tue, 4 Apr 2017 13:25:23 +0000 (13:25 +0000)]
[tablegen][globalisel] Add support for nested instruction matching.

Summary:
Lift the restrictions that prevented the tree walking introduced in the
previous change and add support for patterns like:
  (G_ADD (G_MUL (G_SEXT $src1), (G_SEXT $src2)), $src3) -> SMADDWrrr $dst, $src1, $src2, $src3
Also adds support for G_SEXT and G_ZEXT to support these cases.

One particular aspect of this that I should draw attention to is that I've
tried to be overly conservative in determining the safety of matches that
involve non-adjacent instructions and multiple basic blocks. This is intended
to be used as a cheap initial check and we may add a more expensive check in
the future. The current rules are:
* Reject if any instruction may load/store (we'd need to check for intervening
  memory operations.
* Reject if any instruction has implicit operands.
* Reject if any instruction has unmodelled side-effects.
See isObviouslySafeToFold().

Reviewers: t.p.northover, javed.absar, qcolombet, aditya_nandakumar, ab, rovka

Reviewed By: ab

Subscribers: igorb, dberris, llvm-commits, kristof.beyls

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299430 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[mips] Deal with empty blocks in the mips hazard scheduler
Simon Dardis [Tue, 4 Apr 2017 11:28:53 +0000 (11:28 +0000)]
[mips] Deal with empty blocks in the mips hazard scheduler

This patch teaches the hazard scheduler how to handle empty blocks
when search for the next real instruction when dealing with forbidden
slots.

Reviewers: slthakur

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299427 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[X86] Add 64 bit pattern matching for PSADBW
Oren Ben Simhon [Tue, 4 Apr 2017 10:23:18 +0000 (10:23 +0000)]
[X86] Add 64 bit pattern matching for PSADBW

PSADBW pattern currently supports the 32 bit IR pattern and only GLT (greather than) comparison.
The patch extends the pattern to catch also 64 bit IR pattern and includes all other comparison types (not only GLT).

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299425 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAlign all scalar numbers to LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR
Jonas Hahnfeld [Tue, 4 Apr 2017 06:02:32 +0000 (06:02 +0000)]
Align all scalar numbers to LLVM_YAML_IS_FLOW_SEQUENCE_VECTOR

Otherwise, yamlize in YAMLTraits.h might be wrongly defined.
This makes some AMDGPU tests fail when LLVM_LINK_LLVM_DYLIB is set.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299415 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[InstCombine] Use setAllBits in place of getAllOnesValue since we know the bitwidths...
Craig Topper [Tue, 4 Apr 2017 05:03:02 +0000 (05:03 +0000)]
[InstCombine] Use setAllBits in place of getAllOnesValue since we know the bitwidths are the same. NFCI

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299413 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoInstCombine: Use the InstSimplify hook for shufflevector
Zvi Rackover [Tue, 4 Apr 2017 04:47:57 +0000 (04:47 +0000)]
InstCombine: Use the InstSimplify hook for shufflevector

Summary: Start using the recently added InstSimplify hook for shuffles in the respective InstCombine visitor.

Reviewers: spatel, RKSimon, craig.topper, majnemer

Reviewed By: majnemer

Subscribers: majnemer, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299412 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[PDB] Save one type record copy
Reid Kleckner [Tue, 4 Apr 2017 00:56:34 +0000 (00:56 +0000)]
[PDB] Save one type record copy

Summary:
The TypeTableBuilder provides stable storage for type records. We don't
need to copy all of the bytes into a flat vector before adding it to the
TpiStreamBuilder.

This makes addTypeRecord take an ArrayRef<uint8_t> and a hash code to go
with it, which seems like a simplification.

Reviewers: ruiu, zturner, inglorion

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299406 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[codeview] Cope with unsorted streams in type merging
Reid Kleckner [Mon, 3 Apr 2017 23:58:15 +0000 (23:58 +0000)]
[codeview] Cope with unsorted streams in type merging

Summary:
MASM can produce type streams that are not topologically sorted. It can
even produce type streams with circular references, but those are not
common in practice.

Reviewers: inglorion, ruiu

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299403 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[Fuzzer] Flush std::cout before aborting in CxxStringEqTest
Reid Kleckner [Mon, 3 Apr 2017 23:00:25 +0000 (23:00 +0000)]
[Fuzzer] Flush std::cout before aborting in CxxStringEqTest

On Windows, abort() does not appear to flush std::cout. Should fix red
sanitizer-windows bot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299398 91177308-0d34-0410-b5e6-96231b3b80d8