Commit Graph

145903 Commits

Author SHA1 Message Date
Eugene Zelenko
deebf969c5 [MC] Fix MachineLocation constructor broken in r294685 (NFC).
Problem spotted by Frej Drejhammar.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296697 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 22:28:23 +00:00
Amaury Sechet
ae3bacf60b Add test case for mulhi's overflow. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296696 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 22:27:21 +00:00
Victor Leschuk
ea1f54828a [DebugInfo] [DWARFv5] Unique abbrevs for DIEs with different implicit_const values
Take DW_FORM_implicit_const attribute value into account when profiling
DIEAbbrevData.

Currently if we have two similar types with implicit_const attributes and
different values we end up with only one abbrev in .debug_abbrev section.
For example consider two structures: S1 with implicit_const attribute ATTR
and value VAL1 and S2 with implicit_const ATTR and value VAL2.
The .debug_abbrev section will contain only 1 related record:

[N] DW_TAG_structure_type       DW_CHILDREN_yes
        DW_AT_ATTR        DW_FORM_implicit_const  VAL1
        // ....

This is incorrect as struct S2 (with VAL2) will use abbrev record with VAL1.

With this patch we will have two different abbreviations here:

[N] DW_TAG_structure_type       DW_CHILDREN_yes
        DW_AT_ATTR        DW_FORM_implicit_const  VAL1
        // ....

[M] DW_TAG_structure_type       DW_CHILDREN_yes
        DW_AT_ATTR        DW_FORM_implicit_const  VAL2
        // ....


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296691 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 22:13:42 +00:00
Benjamin Kramer
abd2baf207 [DAGCombiner] Remove non-ascii character and reflow comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296690 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 22:10:43 +00:00
Matthias Braun
a9e2ca030f LIU:::Query: Query LiveRange instead of LiveInterval; NFC
- We only need the information from the base class, not the additional
  details in the LiveInterval class.
- Spread more `const`
- Some code cleanup

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296684 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 21:48:12 +00:00
Reid Kleckner
4c3428b604 Elide argument copies during instruction selection
Summary:
Avoids tons of prologue boilerplate when arguments are passed in memory
and left in memory. This can happen in a debug build or in a release
build when an argument alloca is escaped.  This will dramatically affect
the code size of x86 debug builds, because X86 fast isel doesn't handle
arguments passed in memory at all. It only handles the x86_64 case of up
to 6 basic register parameters.

This is implemented by analyzing the entry block before ISel to identify
copy elision candidates. A copy elision candidate is an argument that is
used to fully initialize an alloca before any other possibly escaping
uses of that alloca. If an argument is a copy elision candidate, we set
a flag on the InputArg. If the the target generates loads from a fixed
stack object that matches the size and alignment requirements of the
alloca, the SelectionDAG builder will delete the stack object created
for the alloca and replace it with the fixed stack object. The load is
left behind to satisfy any remaining uses of the argument value. The
store is now dead and is therefore elided. The fixed stack object is
also marked as mutable, as it may now be modified by the user, and it
would be invalid to rematerialize the initial load from it.

Supersedes D28388

Fixes PR26328

Reviewers: chandlerc, MatzeB, qcolombet, inglorion, hans

Subscribers: igorb, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296683 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 21:42:00 +00:00
Adam Nemet
aa64e902dd New tool: opt-stats.py
I am planning to use this tool to find too noisy (missed) optimization
remarks.  Long term it may actually be better to just have another tool that
exports the remarks into an sqlite database and perform queries like this in
SQL.

This splits out the YAML parsing from opt-viewer.py into a new Python module
optrecord.py.

This is the result of the script on the LLVM testsuite:

Total number of remarks        714433

Top 10 remarks by pass:
  inline                         52%
  gvn                            24%
  licm                           13%
  loop-vectorize                  5%
  asm-printer                     3%
  loop-unroll                     1%
  regalloc                        1%
  inline-cost                     0%
  slp-vectorizer                  0%
  loop-delete                     0%

Top 10 remarks:
  gvn/LoadClobbered              20%
  inline/Inlined                 19%
  inline/CanBeInlined            18%
  inline/NoDefinition             9%
  licm/LoadWithLoopInvariantAddressInvalidated  6%
  licm/Hoisted                    6%
  asm-printer/InstructionCount    3%
  inline/TooCostly                3%
  gvn/LoadElim                    3%
  loop-vectorize/MissedDetails    2%

Beside some refactoring, I also changed optrecords not to use context to
access global data (max_hotness).  Because of the separate module this would
have required splitting context into two.  However it's not possible to access
the optrecord context from the SourceFileRenderer when calling back to
Remark.RelativeHotness.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296682 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 21:35:00 +00:00
Zachary Turner
22bd547eb3 Re-enable BinaryStreamTest.StreamReaderObject.
This was failing because I was using memcmp to compare two
objects that included padding bytes, which were uninitialized.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296681 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 21:30:06 +00:00
Craig Topper
c662d06e26 [APInt] Optimize APInt creation from uint64_t
Summary:
This patch moves the clearUnusedBits calls into the two different initialization paths for APInt from a uint64_t. This allows the compiler to better optimize the clearing of the unused bits for the single word case. And it puts the clearing for the multi word case into the initSlowCase function to save code. In the common case of initializing with 0 this allows the clearing to be completely optimized out for the single word case.

On my local x86 build this is showing a ~45kb reduction in the size of the opt binary.

Reviewers: RKSimon, hans, majnemer, davide, MatzeB

Reviewed By: hans

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296677 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 21:06:18 +00:00
Matthias Braun
14feb94314 LIU::Query: Remove unused getter; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296676 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 21:02:56 +00:00
Matthias Braun
a64f8b6c8a LIU::Query: Remove always false member+getter; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296675 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 21:02:52 +00:00
Matthias Braun
502404cf08 LiveIntervalUnion: Remove unused functions; NFC
Remove two unused functions that are in fact bad API and should not be
called anyway.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296674 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 21:02:47 +00:00
Sanjay Patel
db610dd62d [InstCombine] use -instnamer and auto-generate complete checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296673 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 20:59:56 +00:00
Zachary Turner
6256a696c1 Disable BinaryStreamTest.StreamReaderObject.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296672 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 20:58:28 +00:00
Sanjay Patel
49ddd6627f [x86] add vector tests for more coverage of D30502; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296671 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 20:31:23 +00:00
Nemanja Ivanovic
e2f9d30428 Improve scheduling with branch coalescing
This patch adds a MachineSSA pass that coalesces blocks that branch
on the same condition.

Committing on behalf of Lei Huang.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296670 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 20:29:34 +00:00
Nirav Dave
e4dc80fc4b [DAG] Prevent Stale nodes from entering worklist
Add check that deleted nodes do not get added to worklist. This can
occur when a node's operand is simplified to an existing node.

This fixes PR32108.

Reviewers: jyknight, hfinkel, chandlerc

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296668 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 20:19:38 +00:00
Nirav Dave
9b8fd98aad Add test cases for merging stores of multiply used stores
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296667 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 20:18:14 +00:00
Krzysztof Parzyszek
b907366aa3 [RDF] Replace {} with explicit constructor, since not all compilers like it
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296666 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 19:59:28 +00:00
Daniel Berlin
894edf6642 NewGVN: Add debug counter for value numbering
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296665 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 19:59:26 +00:00
Paul Robinson
859385d79e [DWARF] Print leading zeros in type signature
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296663 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 19:43:29 +00:00
Krzysztof Parzyszek
858e806724 [RDF] Add recursion limit to getAllReachingDefsRec
For large programs this function can take significant amounts of time.
Let it abort gracefully when the program is too complex.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296662 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 19:30:42 +00:00
Zachary Turner
ed2fd5866d [PDB] Fix and re-enable BinaryStreamArray test.
This was due to the test stream choosing an arbitrary partition
index for introducing the discontinuity rather than choosing
an index that would be correctly aligned for the type of data.

Also added an assertion into FixedStreamArray so that this will
be caught on all bots in the future, and not just the UBSan bot.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296661 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 19:29:11 +00:00
Paul Robinson
ae89bb139d Reorder fields for better packing. (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296660 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 19:26:41 +00:00
Bob Haarman
955228a2c6 enable building with LTO on Windows using clang-cl and lld
Summary: With clang-cl gaining support for link-time optimization, we can now enable builds using LTO when using clang-cl and lld on Windows. To do this, we must not pass the -flto flag to the linker; lld-link does not understand it, but will perform LTO automatically when it encounters bitcode files. We also don't pass /Brepro when using LTO - the compiler doesn't generate object files for LTO, so passing the flag would only result in a warning about it being unused.

Reviewers: rnk, ruiu, hans

Reviewed By: hans

Subscribers: mgorny, mehdi_amini, llvm-commits

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296658 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 19:22:18 +00:00
Paul Robinson
1bde0aeeb3 Alphabetize some cases (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296655 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 19:01:47 +00:00
Hans Wennborg
4024478081 Revert r296575 "[SLP] Fixes the bug due to absence of in order uses of scalars which needs to be available"
It caused miscompiles, e.g. in Chromium (PR32109).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296654 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 18:57:16 +00:00
Paul Robinson
08636254c0 [DWARF] Default lower bound should respect requested DWARF version.
DWARF may define a default lower-bound for arrays in languages defined
in a particular DWARF version.  But the logic to suppress an
unnecessary lower-bound attribute was looking at the hard-coded
default DWARF version, not the version that had been requested.

Also updated the list with all languages defined in DWARF v5.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296652 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 18:32:37 +00:00
Artur Pilipenko
a4e52312e8 [DAGCombiner] Support {a|s}ext, {a|z|s}ext load nodes in load combine
Resubmit r295336 after the bug with non-zero offset patterns on BE targets is fixed (r296336).

Support {a|s}ext, {a|z|s}ext load nodes as a part of load combine patters.

Reviewed By: filcab

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296651 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 18:12:29 +00:00
Krzysztof Parzyszek
34045f5186 [Hexagon] Fix testcase accidentally broken by r296645
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296647 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 17:53:42 +00:00
Krzysztof Parzyszek
0d19bb2cca [Hexagon] Fix lowering of formal arguments of type i1
On Hexagon, values of type i1 are passed in registers of type i32,
even though i1 is not a legal value for these registers. This is a
special case and needs special handling to maintain consistency of
the lowering information.

This fixes PR32089.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296645 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 17:30:10 +00:00
Zachary Turner
ece82f9d23 [PDB] Re-add BinaryStreamTest.
This re-adds all the binary stream tests.  This was reverted due
to some misaligned reads.  For now the offending test is
disabled while I investigate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296643 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 17:22:36 +00:00
Hans Wennborg
ac59e4b3b9 [GVNHoist] Don't hoist unsafe scalars at -Oz (PR31729)
Based on Aditya Kumar's patch:

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296642 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 17:15:08 +00:00
Vedant Kumar
e6c13ecad7 Remove unittests/DebugInfo/PDB/BinaryStreamTest.cpp (from r296555)
It breaks the ToT UBSan bots:

/Users/vk/Desktop/llvm/include/llvm/DebugInfo/MSF/BinaryStreamArray.h:246:12: runtime error: reference binding to misaligned address 0x7f925540939a for type 'const int', which requires 4 byte alignment
0x7f925540939a: note: pointer points here
 05 00  00 00 01 00 00 00 02 00  00 00 03 00 00 00 00 00  00 00 00 00 00 00 00 00  70 98 50 06 01 00
              ^
0  DebugInfoPDBTests                   0x0000000106263cbd llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 45
1  DebugInfoPDBTests                   0x00000001062628ff llvm::sys::RunSignalHandlers() + 159
2  DebugInfoPDBTests                   0x0000000106264593 SignalHandler(int) + 179
3  libsystem_platform.dylib            0x0000000107bb3fba _sigtramp + 26
4  libsystem_pthread.dylib             0x0000000107bd82c8 _pthread_keys + 9720
5  libsystem_c.dylib                   0x0000000107947f83 abort + 127
6  libclang_rt.ubsan_osx_dynamic.dylib 0x0000000106bb5fc2 __sanitizer::Abort() + 66
7  DebugInfoPDBTests                   0x000000010613f880 llvm::FixedStreamArrayIterator<int>::operator+=(long) + 0
8  DebugInfoPDBTests                   0x000000010613f615 llvm::FixedStreamArrayIterator<int>::operator*() const + 37
9  DebugInfoPDBTests                   0x000000010613f3cb std::__1::enable_if<__is_forward_iterator<llvm::FixedStreamArrayIterator<int> >::value, void>::type std::__1::vector<int, std::__1::allocator<int> >::__construct_at_end<llvm::FixedStreamArrayIterator<int> >(llvm::FixedStreamArrayIterator<int>, llvm::FixedStreamArrayIterator<int>, unsigned long) + 251
10 DebugInfoPDBTests                   0x000000010613f292 std::__1::vector<int, std::__1::allocator<int> >::vector<llvm::FixedStreamArrayIterator<int> >(llvm::FixedStreamArrayIterator<int>, std::__1::enable_if<(__is_forward_iterator<llvm::FixedStreamArrayIterator<int> >::value) && (is_constructible<int, std::__1::iterator_traits<llvm::FixedStreamArrayIterator<int> >::reference>::value), llvm::FixedStreamArrayIterator<int> >::type) + 226
11 DebugInfoPDBTests                   0x000000010613ddb7 std::__1::vector<int, std::__1::allocator<int> >::vector<llvm::FixedStreamArrayIterator<int> >(llvm::FixedStreamArrayIterator<int>, std::__1::enable_if<(__is_forward_iterator<llvm::FixedStreamArrayIterator<int> >::value) && (is_constructible<int, std::__1::iterator_traits<llvm::FixedStreamArrayIterator<int> >::reference>::value), llvm::FixedStreamArrayIterator<int> >::type) + 87
12 DebugInfoPDBTests                   0x000000010613d4af (anonymous namespace)::BinaryStreamTest_StreamReaderIntegerArray_Test::TestBody() + 1279
13 DebugInfoPDBTests                   0x00000001062780f3 testing::Test::Run() + 179
14 DebugInfoPDBTests                   0x0000000106279594 testing::TestInfo::Run() + 308
15 DebugInfoPDBTests                   0x000000010627a6a3 testing::TestCase::Run() + 307
16 DebugInfoPDBTests                   0x00000001062849d4 testing::internal::UnitTestImpl::RunAllTests() + 756
17 DebugInfoPDBTests                   0x0000000106284558 testing::UnitTest::Run() + 152
18 DebugInfoPDBTests                   0x0000000106266fa5 main + 117
19 libdyld.dylib                       0x00000001078506a5 start + 1
zsh: abort      ./unittests/DebugInfo/PDB/DebugInfoPDBTests

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296641 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 17:10:03 +00:00
Zachary Turner
952e6397e2 [PDB] Remove use of std error codes.
I already created a BinaryStreamError class for this purpose,
so update the code to use that on the remaining occurrences
of errc values.

This should also address the issue which led to r296583.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296640 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 17:02:41 +00:00
Diana Picus
1896046c88 clang-format r296631
Apparently I forgot to run it after fixing up some things...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296634 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 15:54:21 +00:00
Diana Picus
efd69e6ab5 [ARM] GlobalISel: Lower call params that need extensions
Lower i1, i8 and i16 call parameters by extending them before storing them on
the stack. Also make sure we encode the correct, extended size in the
corresponding memory operand, and that we compute the correct stack size in the
end.

The latter is a bit more complicated because we used to compute the stack size
in the getStackAddress method, based on the Size and Offset of the parameters.
However, if the last parameter is sign extended, we'd be using the wrong,
non-extended size, and we'd end up with a smaller stack than we need to hold the
extended value. Instead of hacking this up based on the value of Size in
getStackAddress, we move our stack size handling logic to assignArg, where we
have access to the CCState which knows everything we could possibly want to know
about the stack. This way we don't need to duplicate any knowledge or resort to
any ugly hacks.

On this same occasion, update the IRTranslator test to check the sizes of the
stores everywhere, not just for sign extended paramteres.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296631 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 15:35:14 +00:00
Sanjay Patel
b87c498ab7 [x86] auto-generate checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296629 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 14:46:59 +00:00
Sanjay Patel
37e01851bd [x86] regenerate checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296628 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 14:41:57 +00:00
Igor Laevsky
f789f6f9d7 [DeadStoreElimination] Check function modref behavior before considering memory clobbered
Differential Revision: https://reviews.llvm.org/D29996



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296625 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 14:38:29 +00:00
Simon Dardis
2747964727 [mips] Drop unneeded REQUIRES line in test. NFCI
rL296111 provides the proper fix.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296622 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 14:31:09 +00:00
Sanjay Patel
ee5d29b31c [PPC] add tests for select-of-constants with binop; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296621 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 14:26:49 +00:00
Igor Laevsky
b89bfffbf9 [BasicAA] Take attributes into account when requesting modref info for a call site
Differential Revision: https://reviews.llvm.org/D29989



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296617 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 13:19:51 +00:00
Alexey Bataev
8d23745f59 [SLP] Preserve IR flags when vectorizing horizontal reductions.
Summary:
The SLP vectorizer should propagate IR-level optimization hints/flags
(nsw, nuw, exact, fast-math) when converting scalar horizontal
reductions instructions into vectors, just like for other vectorized
instructions.
It doe not include IR propagation for extra arguments, we need to handle
original scalar operations for extra args to propagate correct flags.

Reviewers: mkuper, mzolotukhin, hfinkel

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296614 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 12:43:39 +00:00
Alexey Bataev
b25d8fc2fa [SLP] Preserve IR flags for extra args.
Summary:
We should preserve IR flags for extra args. These IR flags should be
taken from original scalar operations, not from the reduction
operations.

Reviewers: mkuper, mzolotukhin, hfinkel

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296613 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 12:22:33 +00:00
Oliver Stannard
ccd868acd6 [ARM] Fix bash-ism in test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296610 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 11:11:06 +00:00
Oliver Stannard
b6dfd8e2c3 [ARM] Fix parsing of special register masks
This parsing code was incorrectly checking for invalid characters, so an
invalid instruction like:
  msr spsr_w, r0
would be emitted as:
  msr spsr_cxsf, r0

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296607 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 10:51:04 +00:00
Alexey Bataev
145ace26f5 [SLP] Fix for PR32038: extra add of PHI node when it is not required.
Summary:
If horizontal reduction tree starts from the binary operation that is
used in PHI node, but this PHI is not used in horizontal reduction, we
may end up with extra addition of this PHI node after vectorization.
Here is an example:
```
%phi = phi i32 [ %tmp, %end], ...
...
%tmp = add i32 %tmp1, %tmp2
end:
```
after vectorization we always have something like:

```
%phi = phi i32 [ %tmp, %end], ...
...
%red = extractelement <8 x 32> %vec.red, 0
%tmp = add i32 %red, %phi
end:
```
even if `%phi` is not used in reduction tree. Patch considers these PHI
nodes as extra arguments and considers them in the final result iff they
really used in reduction.

Reviewers: mkuper, hfinkel, mzolotukhin

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296606 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 10:50:44 +00:00
Ayman Musa
5abd133c8d [X86] Fix creating vreg def after use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296601 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 10:20:48 +00:00
Serge Pavlov
82d2de36f5 Process tilde in llvm::sys::path::native
Windows does not treat `~` as a reference to home directory, so the call
to `llvm::sys::path::native` on, say, `~/somedir` produces `~\somedir`,
which has different meaning than the original path. With this change
tilde is expanded on Windows to user profile directory. Such behavior
keeps original meaning of the path and is consistent with the algorithm
of `llvm::sys::path::home_directory`.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@296590 91177308-0d34-0410-b5e6-96231b3b80d8
2017-03-01 09:38:15 +00:00