151268 Commits

Author SHA1 Message Date
Rafael Espindola
fd486726d1 Don't repeat name in comments. 80 columns. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306548 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28 14:59:30 +00:00
John Brawn
5ae42c7d63 [ARM] Improve if-conversion for M-class CPUs without branch predictors
The current heuristic in isProfitableToIfCvt assumes we have a branch predictor,
and so gives the wrong answer in some cases when we don't. This patch adds a
subtarget feature to indicate that a subtarget has no branch predictor, and
changes the heuristic in isProfitableToiIfCvt when it's present. This gives a
slight overall improvement in a set of embedded benchmarks on Cortex-M4 and
Cortex-M33.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306547 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28 14:11:15 +00:00
Simon Pilgrim
2a3af68111 [X86] Added BSWAP tests for illegal i64/i128/i256 'wide' scalar integers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306546 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28 14:07:50 +00:00
Simon Pilgrim
234fff26f1 [X86][SSE] Dropped -mcpu from vector bswap tests
Use triple and attribute only for consistency 

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306545 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28 13:59:15 +00:00
Daniel Sanders
93efc10cbc [globalisel][tablegen] Multiple 80-col corrections.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306544 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28 13:50:04 +00:00
Michael Zuckerman
3d557de741 [X86][LLVM][test]Expanding Supports lowerInterleavedStore() in X86InterleavedAccess test.
Exapnding the test to include AVX target. 
Adding base tast (to trunk) for Store strid=4 vf=32. 



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306543 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28 13:42:45 +00:00
Easwaran Raman
4459676489 Create inliner params based on size and opt levels.
Differential revision: https://reviews.llvm.org/D34309

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306542 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28 13:33:49 +00:00
Teresa Johnson
457765feeb Add zero-length check to memcpy/memset load store loop expansion
Summary:
I was testing using this expansion logic in other cases besides
NVPTX, and found some runtime failures due to the lack of a check
for a zero length memcpy/memset before the loop. There is already
such a check in the memmove expansion code though.

Reviewers: hfinkel

Subscribers: jholewinski, wdng, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306541 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28 13:07:37 +00:00
Igor Breger
79b4061151 [GlobalISel][X86] Test G_CONSTANT i32 0 TableGen'erated selection.NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306537 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28 12:43:21 +00:00
Nikolai Bozhenov
f90583eadc Revert r306528
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306536 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28 12:15:13 +00:00
Igor Breger
31bb0eb518 [GlobalISel][X86] Support bitwise operations : G_AND, G_OR, G_XOR
Summary: Support G_AND, G_OR, G_XOR for i8/i16/i32/i64. Selection done via TableGen'erated code.

Reviewers: zvi, guyblank, aymanmus, m_zuckerman

Reviewed By: aymanmus

Subscribers: rovka, kristof.beyls, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306533 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28 11:39:04 +00:00
Michael Zuckerman
fd3c664b13 Reverting commit 306414 on behalf of @gadi.haber
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306532 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28 11:23:31 +00:00
Simon Pilgrim
a06118f48b [X86][AVX2] Dropped -mcpu from avx2 arithmetic/intrinsics tests
Use triple and attribute only for consistency 

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306531 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28 10:54:54 +00:00
Petar Jovanovic
32d37d6720 [X86] Correct dwarf unwind information in function epilogue
CFI instructions that set appropriate cfa offset and cfa register are now
inserted in emitEpilogue() in X86FrameLowering.

Majority of the changes in this patch:

1. Ensure that CFI instructions do not affect code generation.
2. Enable maintaining correct information about cfa offset and cfa register
in a function when basic blocks are reordered, merged, split, duplicated.

These changes are target independent and described below.

Changed CFI instructions so that they:

1. are duplicable
2. are not counted as instructions when tail duplicating or tail merging
3. can be compared as equal

Add information to each MachineBasicBlock about cfa offset and cfa register
that are valid at its entry and exit (incoming and outgoing CFI info). Add
support for updating this information when basic blocks are merged, split,
duplicated, created. Add a verification pass (CFIInfoVerifier) that checks
that outgoing cfa offset and register of predecessor blocks match incoming
values of their successors.

Incoming and outgoing CFI information is used by a late pass
(CFIInstrInserter) that corrects CFA calculation rule for a basic block if
needed. That means that additional CFI instructions get inserted at basic
block beginning to correct the rule for calculating CFA. Having CFI
instructions in function epilogue can cause incorrect CFA calculation rule
for some basic blocks. This can happen if, due to basic block reordering,
or the existence of multiple epilogue blocks, some of the blocks have wrong
cfa offset and register values set by the epilogue block above them.

Patch by Violeta Vukobrat.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306529 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28 10:21:17 +00:00
Nikolai Bozhenov
455327abba [ValueTracking] Enabling existing ValueTracking patch by default.
The original patch was an improvement to IR ValueTracking on non-negative
integers. It has been checked in to trunk (D18777, r284022). But was disabled by
default due to performance regressions.
Perf impact has improved. The patch would be enabled by default.

Reviewers: reames

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

Patch by: Olga Chupina <olga.chupina@intel.com>


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306528 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28 10:08:08 +00:00
Nikolai Bozhenov
5b91c92a71 [InstCombine] Canonicalize clamp of float types to minmax in fast mode.
Summary:
This commit allows matchSelectPattern to recognize clamp of float
arguments in the presence of FMF the same way as already done for
integers.

This case is a little different though. With integers, given the
min/max pattern is recognized, DAGBuilder starts selecting MIN/MAX
"automatically". That is not the case for float, because for them only
full FMINNAN/FMINNUM/FMAXNAN/FMAXNUM ISD nodes exist and they do care
about NaNs. On the other hand, some backends (e.g. X86) have only
FMIN/FMAX nodes that do not care about NaNS and the former NAN/NUM
nodes are illegal thus selection is not happening. So I decided to do
such kind of transformation in IR (InstCombiner) instead of
complicating the logic in the backend.

Reviewers: spatel, jmolloy, majnemer, efriedma, craig.topper

Reviewed By: efriedma

Subscribers: hiraditya, javed.absar, n.bozhenov, llvm-commits

Patch by Andrei Elovikov <andrei.elovikov@intel.com>

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306525 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28 09:26:20 +00:00
Nikolai Bozhenov
cd701a9011 Add tests to document current InstCombine behavior for clamp pattern.
Summary:
This commit adds the tests for clamp pattern as a prerequisite of
D33186 to make the impact of that fix more clear and also to document
current behavior.

Reviewers: spatel, jmolloy

Reviewed By: spatel

Subscribers: n.bozhenov, llvm-commits

Patch by Andrei Elovikov <andrei.elovikov@intel.com>

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306524 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28 09:22:58 +00:00
George Rimar
39b79bcf89 [DebugInfo] - Removed trailing whitespaces. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306518 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28 08:26:57 +00:00
George Rimar
c9c94f42b1 Recommit "[ELF] - Add ability for DWARFContextInMemory to exit early when any error happen."
With fix in include folder character case:
#include "llvm/Codegen/AsmPrinter.h" -> #include "llvm/CodeGen/AsmPrinter.h"

Original commit message:

Change introduces error reporting policy for DWARFContextInMemory.
New callback provided by client is able to handle error on it's
side and return Halt or Continue.

That allows to either keep current behavior when parser prints all errors
but continues parsing object or implement something very different, like
stop parsing on a first error and report an error in a client style.

Differential revision: https://reviews.llvm.org/D34328


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306517 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28 08:21:19 +00:00
Kristof Beyls
f41c3c9239 [ARM] Make -mcpu=generic schedule for an in-order core (Cortex-A8).
The benchmarking summarized in
http://lists.llvm.org/pipermail/llvm-dev/2017-May/113525.html showed
this is beneficial for a wide range of cores.

As is to be expected, quite a few small adaptations are needed to the
regressions tests, as the difference in scheduling results in:
- Quite a few small instruction schedule differences.
- A few changes in register allocation decisions caused by different
 instruction schedules.
- A few changes in IfConversion decisions, due to a difference in
 instruction schedule and/or the estimated cost of a branch mispredict.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306514 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28 07:07:03 +00:00
George Rimar
61e059d171 Revert r306512 "[ELF] - Add ability for DWARFContextInMemory to exit early when any error happen."
It broke BB:

[13/106] 13 0.022 Generating VCSRevision.h
[25/106] 24 1.209 Building CXX object unittests/DebugInfo/DWARF/CMakeFiles/DebugInfoDWARFTests.dir/DWARFDebugInfoTest.cpp.o
FAILED: unittests/DebugInfo/DWARF/CMakeFiles/DebugInfoDWARFTests.dir/DWARFDebugInfoTest.cpp.o 
/home/bb/bin/g++  -DGTEST_HAS_RTTI=0 -DLLVM_BUILD_GLOBAL_ISEL -D_DEBUG -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iunittests/DebugInfo/DWARF -I../llvm-project/llvm/unittests/DebugInfo/DWARF -Iinclude -I../llvm-project/llvm/include -I../llvm-project/llvm/utils/unittest/googletest/include -I../llvm-project/llvm/utils/unittest/googlemock/include -fPIC -fvisibility-inlines-hidden -m32 -std=c++11 -Wall -W -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wno-maybe-uninitialized -Wdelete-non-virtual-dtor -Wno-comment -ffunction-sections -fdata-sections -O3    -UNDEBUG  -Wno-variadic-macros -fno-exceptions -fno-rtti -MD -MT unittests/DebugInfo/DWARF/CMakeFiles/DebugInfoDWARFTests.dir/DWARFDebugInfoTest.cpp.o -MF unittests/DebugInfo/DWARF/CMakeFiles/DebugInfoDWARFTests.dir/DWARFDebugInfoTest.cpp.o.d -o unittests/DebugInfo/DWARF/CMakeFiles/DebugInfoDWARFTests.dir/DWARFDebugInfoTest.cpp.o -c ../llvm-project/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
../llvm-project/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp:18:37: fatal error: llvm/Codegen/AsmPrinter.h: No such file or directory
 #include "llvm/Codegen/AsmPrinter.h"
                                     ^
compilation terminated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306513 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28 07:06:17 +00:00
George Rimar
75f572053a [ELF] - Add ability for DWARFContextInMemory to exit early when any error happen.
Change introduces error reporting policy for DWARFContextInMemory.
New callback provided by client is able to handle error on it's
side and return Halt or Continue.

That allows to either keep current behavior when parser prints all errors
but continues parsing object or implement something very different, like
stop parsing on a first error and report an error in a client style.

Differential revision: https://reviews.llvm.org/D34328

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306512 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28 06:57:20 +00:00
Craig Topper
7da83c803e [InstCombine] Add test case demonstrating that we don't handle icmp eq (trunc (lshr(X, cst1)), cst->icmp (and X, mask), cst when the shift type is larger than 64-bits. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306510 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28 06:45:36 +00:00
Craig Topper
48aca4075c Revert r306508 "[InstCombine] Add test case demonstrating that we don't handle icmp eq (trunc (lshr(X, cst1)), cst->icmp (and X, mask), cst when the shift type is larger than 64-bits. NFC"
I accidentally had a extra change in there.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306509 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28 06:43:58 +00:00
Craig Topper
13501a8d08 [InstCombine] Add test case demonstrating that we don't handle icmp eq (trunc (lshr(X, cst1)), cst->icmp (and X, mask), cst when the shift type is larger than 64-bits. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306508 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28 06:42:48 +00:00
Hiroshi Inoue
215f133d73 Add missing library dependency to fix build break in llvm-lto2
error message
CMakeFiles/llvm-lto2.dir/llvm-lto2.cpp.o: In function `dumpSymtab(int, char**)':
llvm-lto2.cpp:(.text._ZL10dumpSymtabiPPc+0x238): undefined reference to `llvm::getBitcodeFileContents(llvm::MemoryBufferRef)'
collect2: error: ld returned 1 exit status



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306507 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28 06:14:30 +00:00
Max Kazantsev
499abe3053 [IRCE][NFC] Better get SCEV for 1 in calculateSubRanges
A slightly more efficient way to get constant, we avoid resolving in getSCEV and excessive
invocations, and we don't create a ConstantInt if 'true' branch is taken.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306503 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28 04:57:45 +00:00
Nirav Dave
af639e8d6c Revert "[DAG] Fold FrameIndex offset into BaseIndexOffset analysis. NFCI."
This reverts commit r306498 which appears to cause a compilrt-rt test failures

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306501 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28 03:20:04 +00:00
Stanislav Mekhanoshin
8b38a13919 [AMDGPU] Add pattern for v_alignbit_b32 with immediate
If immediate in shift is less than 32 we can use alignbit too.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306500 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28 02:52:39 +00:00
Stanislav Mekhanoshin
a5e3faf5db Allow to truncate left shift with non-constant shift amount
That is pretty common for clang to produce code like
(shl %x, (and %amt, 31)). In this situation we can still perform
trunc (shl) into shl (trunc) conversion given the known value
range of shift amount.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306499 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28 02:37:11 +00:00
Nirav Dave
64a075b52c [DAG] Fold FrameIndex offset into BaseIndexOffset analysis. NFCI.
Pull FrameIndex comparision reasoning from DAGCombiner::isAlias to
general BaseIndexOffset.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306498 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28 02:09:50 +00:00
Kyle Butt
fa84770d20 Inlining: Don't re-map simplified cloned instructions.
When simplifying an instruction that has been re-mapped, it should never
simplify to an instruction in the original function. In the edge case
where we are inlining a function into itself, the existing code led to
incorrect behavior. Replace the incorrect code with an assert verifying
that we never expect simplification to produce an instruction in the old
function, unless the functions are the same.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306495 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28 01:41:25 +00:00
Joel Jones
59d9d429cc [TableGen] Improve Debug Output for --debug-only=subtarget-emitter NFCI
Add headers for each section of output, with white space and "+++" to
improve readability.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306492 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28 00:06:40 +00:00
Peter Collingbourne
24b479ea29 Add missing library dependency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306491 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-28 00:05:27 +00:00
Mandeep Singh Grang
85e0946267 [COFF, ARM64] Add support for Windows ARM64 COFF format
Summary:
This is the llvm part of the initial implementation to support Windows ARM64 COFF format.
I will gradually add more functionality in subsequent patches.

Reviewers: ruiu, rnk, t.p.northover, compnerd

Reviewed By: ruiu, compnerd

Subscribers: aemerson, mgorny, javed.absar, llvm-commits, kristof.beyls

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306490 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-27 23:58:19 +00:00
Peter Collingbourne
a4799adf39 Object: Teach irsymtab::read() to try to use the irsymtab that we wrote to disk.
Fixes PR27551.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306488 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-27 23:50:24 +00:00
Peter Collingbourne
fdc1250177 Bitcode: Write the irsymtab to disk.
Differential Revision: https://reviews.llvm.org/D33973

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306487 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-27 23:50:11 +00:00
Peter Collingbourne
0293dd1939 Object: Add version and producer fields to the irsymtab header. NFCI.
These will be necessary in order to handle upgrades from old bitcode
files.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306486 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-27 23:49:58 +00:00
Sanjay Patel
dbbccbae97 [CGP] add specialization for memcmp expansion with only one basic block
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306485 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-27 23:15:01 +00:00
Easwaran Raman
ef9aa5a6ad [NewPM/Inliner] Reduce threshold for cold callsites in the non-PGO case
Differential Revision: https://reviews.llvm.org/D34312

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306484 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-27 23:11:18 +00:00
Tim Northover
5af1d0751a GlobalISel: add some more sanity-checking to MachineInstrBuilder. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306481 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-27 22:45:35 +00:00
Florian Hahn
240a1f8074 [AArch64] Inline callee if its target-features are a subset of the caller
Summary:
Similar to X86, it should be safe to inline callees if their target-features
are a subset of the caller. This change matches GCC's inlining behavior
with respect to attributes [1].

[1] https://gcc.gnu.org/onlinedocs/gcc/AArch64-Function-Attributes.html#AArch64-Function-Attributes

Reviewers: kristof.beyls, javed.absar, rengolin, t.p.northover

Reviewed By: t.p.northover

Subscribers: aemerson, eraman, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306478 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-27 22:27:32 +00:00
Geoff Berry
607969f748 [EarlyCSE][MemorySSA] Enable MemorySSA in function-simplification pass of EarlyCSE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306477 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-27 22:25:02 +00:00
Eugene Zelenko
44e80299e5 [Analysis] Revert r306472 changes in LoopInfo headers to fix broken builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306476 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-27 22:20:38 +00:00
Aditya Nandakumar
69d966c000 [GISel]: Add G_FEXP, G_FEXP2 opcodes
Also add IRTranslator support.
https://reviews.llvm.org/D34710

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306475 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-27 22:19:32 +00:00
Rafael Espindola
c9c63328af clang-format a file.
It had a few inconsistent indentations that made a followup patch
hard to read.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306474 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-27 22:14:20 +00:00
Dehao Chen
c9d2291c96 re-commit r306336: Enable vectorizer-maximize-bandwidth by default.
Differential Revision: https://reviews.llvm.org/D33341


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306473 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-27 22:05:58 +00:00
Eugene Zelenko
01187b342a [Analysis] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306472 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-27 21:52:05 +00:00
Sanjay Patel
ca9df19568 [CGP] eliminate a sub instruction in memcmp expansion
As noted in D34071, there are some IR optimization opportunities that could be 
handled by normal IR passes if this expansion wasn't happening so late in CGP.

Regardless of that, it seems wasteful to knowingly produce suboptimal IR here, 
so I'm proposing this change:
  %s = sub i32 %x, %y
  %r = icmp ne %s, 0
    =>
  %r = icmp ne %x, %y

Changing the predicate to 'eq' mimics what InstCombine would do, so that's just
an efficiency improvement if we decide this expansion should happen sooner.

The fact that the PowerPC backend doesn't eliminate the 'subf.' might be 
something for PPC folks to investigate separately.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306471 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-27 21:46:34 +00:00
Tim Northover
96470fe7e9 GlobalISel: verify that a COPY is trivial when created.
Without this check, COPY instructions can actually be one of the generic casts
in disguise. That's confusing and bad.

At some point during ISel this restriction has to be relaxed since the fully
selected instructions will usually use COPY for those purposes. Right now I
think it's possible that relaxation occurs during RegBankSelect (hence the
change there). I'm not convinced that's where it belongs long-term though.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306470 91177308-0d34-0410-b5e6-96231b3b80d8
2017-06-27 21:41:40 +00:00