OSDN Git Service
Jakub Kuderski [Tue, 22 Aug 2017 16:30:21 +0000 (16:30 +0000)]
[ADCE][Dominators] Reapply: Teach ADCE to preserve dominators
Summary:
This patch teaches ADCE to preserve both DominatorTrees and PostDominatorTrees.
This is reapplies the original patch r311057 that was reverted in r311381.
The previous version wasn't using the batch update api for updating dominators,
which in vary rare cases caused assertion failures.
This also fixes PR34258.
Reviewers: dberlin, chandlerc, sanjoy, davide, grosser, brzycki
Reviewed By: davide
Subscribers: grandinj, zhendongsu, llvm-commits, david2050
Differential Revision: https://reviews.llvm.org/D35869
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311467
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Devlieghere [Tue, 22 Aug 2017 16:28:07 +0000 (16:28 +0000)]
[Debug info] Add new DbgValues after looping over DAG
I was contacted by Jesper Antonsson from Ericsson who ran into problems
with r311181 in their test suites with for an out-of-tree target.
Because of the latter I don't have a reproducer, but we definitely don't
want to modify the data structure on which we are iterating inside the
loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311466
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 22 Aug 2017 16:27:00 +0000 (16:27 +0000)]
[x86] auto-generate full checks; NFC
I don't see anything Darwin-specific here, so I made the target generic x86-64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311465
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 22 Aug 2017 16:21:45 +0000 (16:21 +0000)]
[x86] simplify runs and auto-generate full checks
I've replaced the two OS-specific runs with a generic run because
there's no functional difference in the resulting output that
we're checking. Also, the script still doesn't work with a Win
target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311463
91177308-0d34-0410-b5e6-
96231b3b80d8
Erich Keane [Tue, 22 Aug 2017 15:30:43 +0000 (15:30 +0000)]
Emit section information for extern variables
Update IR generated to retain section information for external declarations.
This is related to https://reviews.llvm.org/D36487
Patch By: eandrews
Differential Revision: https://reviews.llvm.org/D36712
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311459
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Tue, 22 Aug 2017 12:46:33 +0000 (12:46 +0000)]
[ARM][AArch64] Add Armv8.3-a unittests
Add Armv8.3-A to the architecture to the TargetParser unittests.
Differential Revision: https://reviews.llvm.org/D36748
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311450
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Tue, 22 Aug 2017 11:08:21 +0000 (11:08 +0000)]
[ARM][AArch64] v8.3-A Javascript Conversion
Armv8.3-A adds instructions that convert a double-precision floating
point number to a signed 32-bit integer with round towards zero,
designed for improving Javascript performance.
Differential Revision: https://reviews.llvm.org/D36785
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311448
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Tue, 22 Aug 2017 11:02:45 +0000 (11:02 +0000)]
[ARM] Avoid creating duplicate ANDs in SelectionDAG
When expanding a BRCOND into a BR_CC, do not create an AND 1
if one already exists.
Review: D36705
Patch by Joel Galenson <jgalenson@google.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311447
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Tue, 22 Aug 2017 11:02:37 +0000 (11:02 +0000)]
[ARM] Call setBooleanContents(ZeroOrOneBooleanContent)
The ARM backend should call setBooleanContents so that it can
use known bits to make some optimizations.
Review: D35821
Patch by Joel Galenson <jgalenson@google.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311446
91177308-0d34-0410-b5e6-
96231b3b80d8
Sjoerd Meijer [Tue, 22 Aug 2017 10:43:51 +0000 (10:43 +0000)]
[SelectionDAG] Add getNode debug messages
This adds debug messages to various functions that create new SDValue nodes.
This is e.g. useful to have during legalization, as otherwise it can prints
legalization info of nodes that did not appear in the dumps before.
Differential Revision: https://reviews.llvm.org/D36984
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311444
91177308-0d34-0410-b5e6-
96231b3b80d8
Sjoerd Meijer [Tue, 22 Aug 2017 09:21:08 +0000 (09:21 +0000)]
[AArch64] Cleanup of HasFullFP16 argument. NFC.
This is a clean up of commit r311154; it's not necessary to pass HasFullFP16 as
an argument, instead just query the DAG.
Differential Revision: https://reviews.llvm.org/D36978
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311438
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 22 Aug 2017 09:20:52 +0000 (09:20 +0000)]
Fix a typo in r311435.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311437
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Bradbury [Tue, 22 Aug 2017 09:11:41 +0000 (09:11 +0000)]
Use report_fatal_error for unsupported calling conventions
The calling convention can be specified by the user in IR. Failing to support
a particular calling convention isn't a programming error, and so relying on
llvm_unreachable to catch and report an unsupported calling convention is not
appropriate.
Differential Revision: https://reviews.llvm.org/D36830
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311435
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Tue, 22 Aug 2017 08:50:56 +0000 (08:50 +0000)]
[lib/Analysis] - Mark personality functions as live.
This is PR33245.
Case I am fixing is next:
Imagine we have 2 BC files, one defines and uses personality routine,
second has only declaration and also uses it.
Previously algorithm computing dead symbols (llvm::computeDeadSymbols) did
not know about personality routines and leaved them dead even if function that
has routine was live.
As a result thinLTOInternalizeAndPromoteGUID() method changed binding for
such symbol to local. Later when LLD tried to link these objects it failed
because one object had undefined global symbol for routine and second
object contained local definition instead of global.
Patch set the live root flag on the corresponding FunctionSummary
for personality routines when we build the per-module summaries
during the compile step.
Differential revision: https://reviews.llvm.org/D36834
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311432
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 22 Aug 2017 05:40:17 +0000 (05:40 +0000)]
[X86] Prevent several calls to ISD::isConstantSplatVector from returning a narrower APInt than the original scalar type
ISD::isConstantSplatVector can shrink to the smallest splat width. But we don't check the size of the resulting APInt at all. This can cause us to misinterpret the results.
This patch just adds a flag to prevent the APInt from changing width.
Fixes PR34271.
Differential Revision: https://reviews.llvm.org/D36996
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311429
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Beckmann [Tue, 22 Aug 2017 03:15:28 +0000 (03:15 +0000)]
Integrate manifest merging library into LLD.
Summary: Now that the llvm-mt manifest merging libraries are complete, we may use them to merge manifests instead of needing to shell out to mt.exe.
Subscribers: mgorny, llvm-commits
Differential Revision: https://reviews.llvm.org/D36255
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311424
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Tue, 22 Aug 2017 01:10:48 +0000 (01:10 +0000)]
dsymutil: don't copy compile units without children from PCM files
rdar://problem/
33830532
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311416
91177308-0d34-0410-b5e6-
96231b3b80d8
George Karpenkov [Mon, 21 Aug 2017 23:25:12 +0000 (23:25 +0000)]
Moving libFuzzer from LLVM to compiler-rt.
This change only removes libFuzzer tests and CMake machinery,
the source copy temporarily remains at the old location.
Differential Revision: https://reviews.llvm.org/D36980
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311405
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Mon, 21 Aug 2017 22:57:06 +0000 (22:57 +0000)]
Re-apply "Introduce FuzzMutate library"
Same as r311392 with some fixes for library dependencies. Thanks to
Chapuni for helping work those out!
Original commit message:
This introduces the FuzzMutate library, which provides structured
fuzzing for LLVM IR, as described in my EuroLLVM 2017 talk. Most of
the basic mutators to inject and delete IR are provided, with support
for most basic operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311402
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Mon, 21 Aug 2017 22:56:18 +0000 (22:56 +0000)]
[RegAlloc] Make sure live-ranges reflect the state of the IR when removing them
When removing a live-range we used to not touch them making debug
prints harder to read because the IR was not matching what the
live-ranges information was saying.
This only affects debug printing and allows to put stronger asserts in
the code (see r308906 for instance).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311401
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 21 Aug 2017 22:56:12 +0000 (22:56 +0000)]
[ValueTracking] Add assertions that the starting Depth in isKnownToBeAPowerOfTwo and ComputeNumSignBitsImpl is not above MaxDepth
The function does an equality check later to terminate the recursion, but that won't work if its starts out too high. Similar assert already exists in computeKnownBits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311400
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 21 Aug 2017 22:40:02 +0000 (22:40 +0000)]
[InstCombine] add udiv/urem tests with constant numerator; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311396
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Mon, 21 Aug 2017 22:28:47 +0000 (22:28 +0000)]
Revert "Re-apply "Introduce FuzzMutate library""
The dependencies for the new library seem to be misconfigured on some
linux configs:
http://bb.pgr.jp/builders/llvm-i686-linux-RA/builds/5435/steps/build_all/logs/stdio
This reverts r311392.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311393
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Mon, 21 Aug 2017 22:25:04 +0000 (22:25 +0000)]
Re-apply "Introduce FuzzMutate library"
Redo r311356 with a fix to avoid std::uniform_int_distribution<bool>.
The bool specialization is undefined according to the standard, even
though libc++ seems to have it.
Original commit message:
This introduces the FuzzMutate library, which provides structured
fuzzing for LLVM IR, as described in my [EuroLLVM 2017 talk][1]. Most
of the basic mutators to inject and delete IR are provided, with
support for most basic operations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311392
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 21 Aug 2017 21:57:52 +0000 (21:57 +0000)]
[InstCombine] add more tests for udiv/urem narrowing; NFC
We don't currently limit these folds with hasOneUse() or shouldChangeType().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311390
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Mon, 21 Aug 2017 21:57:43 +0000 (21:57 +0000)]
[AArch64] Restore the test of conditional branch fusion
Restore the functionality of this test that was broken by
https://reviews.llvm.org/rL306144.
Differential revision: https://reviews.llvm.org/D36807
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311389
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 21 Aug 2017 21:56:11 +0000 (21:56 +0000)]
GlobalISel (AArch64): fix ABI at border between GPRs and SP.
If a struct would end up half in GPRs and half on SP the ABI says it should
actually go entirely on the stack. We were getting this wrong in GlobalISel
before, causing compatibility issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311388
91177308-0d34-0410-b5e6-
96231b3b80d8
Steven Wu [Mon, 21 Aug 2017 21:49:13 +0000 (21:49 +0000)]
[IR] AutoUpgrade ModuleFlagBehavior for PIC and PIE level
Summary:
From r303590, ModuleFlagBehavior for PIC and PIE level is changed from
Error to Max. This will cause bitcode compatibility issue when linking
against a bitcode static archive built with old compiler.
Add an auto-ugprade path to upgrade the the ModuleFlagBehavior in the
old bitcode to match the new one so IRLinker can link them.
Reviewers: tejohnson, mehdi_amini, dexonsmith
Reviewed By: dexonsmith
Subscribers: hans, llvm-commits
Differential Revision: https://reviews.llvm.org/D36556
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311387
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 21 Aug 2017 21:00:45 +0000 (21:00 +0000)]
[InstCombine] Move the checks for pointer types in getMaskedTypeForICmpPair earlier in the function
I don't think there's any reason to have them scattered about and on all 4 operands. We already have an early check that both compares must be the same type. And within a given compare the LHS and RHS must have the same type. Beyond that I don't think there's anyway this function returns anything valid for pointer types. So let's just return early and be done with it.
Differential Revision: https://reviews.llvm.org/D36561
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311383
91177308-0d34-0410-b5e6-
96231b3b80d8
Pirama Arumuga Nainar [Mon, 21 Aug 2017 20:49:44 +0000 (20:49 +0000)]
[Support, Windows] Handle long paths with unix separators
Summary:
The function widenPath() for Windows also normalizes long path names by
iterating over the path's components and calling append(). The
assumption during the iteration that separators are not returned by the
iterator doesn't hold because the iterators do return a separator when
the path has a drive name. Handle this case by ignoring separators
during iteration.
Reviewers: rnk
Subscribers: danalbert, srhines
Differential Revision: https://reviews.llvm.org/D36752
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311382
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Mon, 21 Aug 2017 20:39:18 +0000 (20:39 +0000)]
Revert "Reapply: [ADCE][Dominators] Teach ADCE to preserve dominators"
Summary: This partially reverts commit r311057 since it breaks ADCE. See PR34258.
Reviewers: kuhar
Subscribers: mcrosier, david2050, llvm-commits
Differential Revision: https://reviews.llvm.org/D36979
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311381
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Elliott [Mon, 21 Aug 2017 20:30:44 +0000 (20:30 +0000)]
[ORE] Remove Old Optimization Remark API
Summary: https://bugs.llvm.org/show_bug.cgi?id=33789
Reviewers: anemet
Reviewed By: anemet
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D36972
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311380
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 21 Aug 2017 20:17:19 +0000 (20:17 +0000)]
[PDB] Serialize records into a stack-allocated buffer.
We were using a std::vector<> and resizing to MaxRecordLength,
which is ~64KB. We would then do this repeatedly often many
times in a tight loop, which was causing measurable performance
impact when linking PDBs.
Patch by Alex Telishev
Differential Revision: https://reviews.llvm.org/D36940
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311375
91177308-0d34-0410-b5e6-
96231b3b80d8
George Karpenkov [Mon, 21 Aug 2017 20:12:58 +0000 (20:12 +0000)]
Always compile libFuzzer with no coverage
Do not compile libFuzzer itself with coverage, regardless of LLVM variables
Differential Revision: https://reviews.llvm.org/D36887
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311374
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 21 Aug 2017 20:08:40 +0000 (20:08 +0000)]
[lld/pdb] Speed up construction of publics & globals addr map.
computeAddrMap function calls std::stable_sort with a comparison
function that computes deserialized symbols every time its called.
In the result deserializeAs<PublicSym32> is called 20-30 times per
symbol. It's much faster to calculate it beforehand and pass a
pointer to it to the comparison function.
Patch by Alex Telishev
Differential Revision: https://reviews.llvm.org/D36941
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311373
91177308-0d34-0410-b5e6-
96231b3b80d8
Haicheng Wu [Mon, 21 Aug 2017 20:00:09 +0000 (20:00 +0000)]
[InlineCost] Add cl::opt to allow full inline cost to be computed for debugging purposes.
Currently, the inline cost model will bail once the inline cost exceeds the
inline threshold in order to avoid unnecessary compile-time. However, when
debugging it is useful to compute the full cost, so this command line option
is added to override the default behavior.
I took over this work from Chad Rosier (mcrosier@codeaurora.org).
Differential Revision: https://reviews.llvm.org/D35850
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311371
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 21 Aug 2017 19:56:46 +0000 (19:56 +0000)]
[InlineCost] Add more debug during inline cost computation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311370
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 21 Aug 2017 19:46:46 +0000 (19:46 +0000)]
[BinaryStream] Defaultify copy and move constructors.
The various BinaryStream classes had explicit copy constructors
which resulted in deleted move constructors. This was causing
the internal std::shared_ptr to get copied rather than moved
very frequently, since these classes are often used as return
values.
Patch by Alex Telishev
Differential Revision: https://reviews.llvm.org/D36942
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311368
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 21 Aug 2017 19:13:14 +0000 (19:13 +0000)]
[LibCallSimplifier] try harder to fold memcmp with constant arguments (2nd try)
The 1st try was reverted because it could inf-loop by creating a dead instruction.
Fixed that to not happen and added a test case to verify.
Original commit message:
Try to fold:
memcmp(X, C, ConstantLength) == 0 --> load X == *C
Without this change, we're unnecessarily checking the alignment of the constant data,
so we miss the transform in the first 2 tests in the patch.
I noted this shortcoming of LibCallSimpifier in one of the recent CGP memcmp expansion
patches. This doesn't help the example in:
https://bugs.llvm.org/show_bug.cgi?id=34032#c13
...directly, but it's worth short-circuiting more of these simple cases since we're
already trying to do that.
The benefit of transforming to load+cmp is that existing IR analysis/transforms may
further simplify that code. For example, if the load of the variable is common to
multiple memcmp calls, CSE can remove the duplicate instructions.
Differential Revision: https://reviews.llvm.org/D36922
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311366
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 21 Aug 2017 19:02:06 +0000 (19:02 +0000)]
[InstCombine] Teach foldSelectICmpAnd to recognize a (icmp slt X, 0) and (icmp sgt X, -1) as equivalent to an and with the sign bit of the truncated type
This is similar to what was already done in foldSelectICmpAndOr. Ultimately I'd like to see if we can call foldSelectICmpAnd from foldSelectIntoOp if we detect a power of 2 constant. This would allow us to remove foldSelectICmpAndOr entirely.
Differential Revision: https://reviews.llvm.org/D36498
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311362
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Mon, 21 Aug 2017 17:57:12 +0000 (17:57 +0000)]
Revert "Introduce FuzzMutate library"
Looks like this fails to build with libstdc++.
This reverts r311356
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311358
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Mon, 21 Aug 2017 17:44:36 +0000 (17:44 +0000)]
Introduce FuzzMutate library
This introduces the FuzzMutate library, which provides structured
fuzzing for LLVM IR, as described in my [EuroLLVM 2017 talk][1]. Most
of the basic mutators to inject and delete IR are provided, with
support for most basic operations.
I will follow up with the instruction selection fuzzer, which is
implemented in terms of this library.
[1]: http://llvm.org/devmtg/2017-03//2017/02/20/accepted-sessions.html#2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311356
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Fertile [Mon, 21 Aug 2017 17:35:32 +0000 (17:35 +0000)]
[PPC] Refine checks for emiting TOC restore nop and tail-call eligibility.
For the medium and large code models we only need to check if a call crosses
dso-boundaries when considering tail-call elgibility.
Differential Revision: https://reviews.llvm.org/D34245
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311353
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Elliott [Mon, 21 Aug 2017 16:57:21 +0000 (16:57 +0000)]
Migrate WholeProgramDevirt to new Optimization Remark API
Summary:
This is an attempt to move WholeProgramDevirt to the new remark API.
https://bugs.llvm.org/show_bug.cgi?id=33793
Reviewers: anemet
Reviewed By: anemet
Subscribers: fhahn, llvm-commits
Differential Revision: https://reviews.llvm.org/D36943
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311352
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Mon, 21 Aug 2017 16:51:54 +0000 (16:51 +0000)]
[APFloat] Fix IsInteger() for DoubleAPFloat.
Previously, we would just assert instead.
Differential Revision: https://reviews.llvm.org/D36961
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311351
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 21 Aug 2017 16:47:12 +0000 (16:47 +0000)]
[InstCombine] add tests for memcmp with constant; NFC
This is the baseline (current) version of the tests that would
have been added with the transform in r311333 (reverted at
r311340 due to inf-looping).
Adding these now to aid in testing and minimize the patch if/when
it is reinstated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311350
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Elliott [Mon, 21 Aug 2017 16:45:47 +0000 (16:45 +0000)]
Emit only A Single Opt Remark When Inlining
Summary:
This updates the Inliner to only add a single Optimization
Remark when Inlining, rather than an Analysis Remark and an
Optimization Remark.
Fixes https://bugs.llvm.org/show_bug.cgi?id=33786
Reviewers: anemet, davidxl, chandlerc
Reviewed By: anemet
Subscribers: haicheng, fhahn, mehdi_amini, dblaikie, llvm-commits, eraman
Differential Revision: https://reviews.llvm.org/D36054
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311349
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 21 Aug 2017 16:04:11 +0000 (16:04 +0000)]
[InstCombine] Fix a weakness in canEvaluateZExtd around 'and' instructions
Summary:
If the bitsToClear from the LHS of an 'and' comes back non-zero, but all of those bits are known zero on the RHS, we can reset bitsToClear.
Without this, the 'or' in the modified test case blocks the transform because it has non-zero bits in its RHS in those bits.
Reviewers: spatel, majnemer, davide
Reviewed By: davide
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D36944
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311343
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 21 Aug 2017 16:04:04 +0000 (16:04 +0000)]
[X86] When selecting sse_load_f32/f64 pattern, make sure there's only one use of every node all the way back to the root of the match
Summary: With masked operations, its possible for the operation node like fadd, fsub, etc. to be used by multiple different vselects. Since the pattern matching will start at the vselect, we need to make sure the operation node itself is only used once before we can fold a load. Otherwise we'll end up folding the same load into multiple instructions.
Reviewers: RKSimon, spatel, zvi, igorb
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D36938
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311342
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Mon, 21 Aug 2017 16:00:38 +0000 (16:00 +0000)]
Revert 311208, 311209
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311341
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 21 Aug 2017 15:16:25 +0000 (15:16 +0000)]
revert r311333: [LibCallSimplifier] try harder to fold memcmp with constant arguments
We're getting lots of compile-timeout bot failures like:
http://lab.llvm.org:8011/builders/clang-native-arm-lnt/builds/7119
http://lab.llvm.org:8011/builders/clang-cmake-x86_64-avx2-linux
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311340
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 21 Aug 2017 15:11:39 +0000 (15:11 +0000)]
[InstCombine] add vector tests; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311339
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 21 Aug 2017 14:53:25 +0000 (14:53 +0000)]
[llvm-pdbutil] Add support for dumping detailed module stats.
This adds support for dumping a summary of module symbols
and CodeView debug chunks. This option prints a table for
each module of all of the symbols that occurred in the module
and the number of times it occurred and total byte size. Then
at the end it prints the totals for the entire file.
Additionally, this patch adds the -jmc (just my code) option,
which suppresses modules which are from external libraries or
linker imports, so that you can focus only on the object files
and libraries that originate from your own source code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311338
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 21 Aug 2017 14:34:06 +0000 (14:34 +0000)]
[InstCombine] regenerate test checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311337
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 21 Aug 2017 13:55:49 +0000 (13:55 +0000)]
[LibCallSimplifier] try harder to fold memcmp with constant arguments
Try to fold:
memcmp(X, C, ConstantLength) == 0 --> load X == *C
Without this change, we're unnecessarily checking the alignment of the constant data,
so we miss the transform in the first 2 tests in the patch.
I noted this shortcoming of LibCallSimpifier in one of the recent CGP memcmp expansion
patches. This doesn't help the example in:
https://bugs.llvm.org/show_bug.cgi?id=34032#c13
...directly, but it's worth short-circuiting more of these simple cases since we're
already trying to do that.
The benefit of transforming to load+cmp is that existing IR analysis/transforms may
further simplify that code. For example, if the load of the variable is common to
multiple memcmp calls, CSE can remove the duplicate instructions.
Differential Revision: https://reviews.llvm.org/D36922
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311333
91177308-0d34-0410-b5e6-
96231b3b80d8
Stefan Pintilie [Mon, 21 Aug 2017 13:36:18 +0000 (13:36 +0000)]
[PowerPC] Check if the pre-increment PHI Node already exists
Preparations to use the per-increment are sometimes done in the target
independent pass Loop Strength Reduction. We try to detect them in the PowerPC
specific pass so that they are not done twice and so that we do not add PHIs
that are not required.
Differential Revision: https://reviews.llvm.org/D36736
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311332
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Mon, 21 Aug 2017 10:51:54 +0000 (10:51 +0000)]
[GlobalISel][X86] Support G_BRCOND operation.
Summary: Support G_BRCOND operation. For now don't try to fold cmp/trunc instructions.
Reviewers: zvi, guyblank
Reviewed By: guyblank
Subscribers: rovka, llvm-commits, kristof.beyls
Differential Revision: https://reviews.llvm.org/D34754
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311327
91177308-0d34-0410-b5e6-
96231b3b80d8
Oliver Stannard [Mon, 21 Aug 2017 09:58:37 +0000 (09:58 +0000)]
[AsmParser] Recommit: Hash is not a comment on some targets
Re-committing after r311325 fixed an unintentional use of '#' comments in
clang.
The '#' token is not a comment for all targets (on ARM and AArch64 it marks an
immediate operand), so we shouldn't treat it as such.
Comments are already converted to AsmToken::EndOfStatement by
AsmLexer::LexLineComment, so this check was unnecessary.
Differential Revision: https://reviews.llvm.org/D36405
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311326
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Mon, 21 Aug 2017 09:17:28 +0000 (09:17 +0000)]
[GlobalISel][X86] InstructionSelector, for now use fallback path for LOAD_STACK_GUARD and PHI nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311323
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Mon, 21 Aug 2017 08:59:59 +0000 (08:59 +0000)]
[GlobalISel][X86] LowerCall, for now don't handel ByValue function arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311321
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Zuckerman [Mon, 21 Aug 2017 08:56:39 +0000 (08:56 +0000)]
[InterLeaved] Adding lit test for future work interleaved load strid 3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311320
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 21 Aug 2017 08:45:22 +0000 (08:45 +0000)]
[x86] Teach the "generic" x86 CPU to avoid patterns that are slow on
widely used processors.
This occured to me when I saw that we were generating 'inc' and 'dec'
when for Haswell and newer we shouldn't. However, there were a few "X is
slow" things that we should probably just set.
I've avoided any of the "X is fast" features because most of those would
be pretty serious regressions on processors where X isn't actually fast.
The slow things are likely to be negligible costs on processors where
these aren't slow and a significant win when they are slow.
In retrospect this seems somewhat obvious. Not sure why we didn't do
this a long time ago.
Differential Revision: https://reviews.llvm.org/D36947
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311318
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 21 Aug 2017 08:45:19 +0000 (08:45 +0000)]
[x86] Handle more cases where we can re-use an atomic operation's flags
rather than doing a separate comparison.
This both saves an explicit comparision and avoids the use of `xadd`
which introduces register constraints and other challenges to the
generated code.
The motivating case is from atomic reference counts where `1` is the
sentinel rather than `0` for whatever reason. This can and should be
lowered efficiently on x86 by just using a different flag, however the
x86 code only handled the `0` case.
There remains some further opportunities here that are currently hidden
due to canonicalization. I've included test cases that show these and
FIXMEs. However, I don't at the moment have any production use cases and
they seem substantially harder to address.
Differential Revision: https://reviews.llvm.org/D36945
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311317
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Mon, 21 Aug 2017 08:43:06 +0000 (08:43 +0000)]
[ARM][AArch64] Cortex-A75 and Cortex-A55 support
This patch introduces support for Cortex-A75 and Cortex-A55, Arm's
latest big.LITTLE A-class cores. They implement the ARMv8.2-A
architecture, including the cryptography and RAS extensions, plus
the optional dot product extension. They also implement the RCpc
AArch64 extension from ARMv8.3-A.
Cortex-A75:
https://developer.arm.com/products/processors/cortex-a/cortex-a75
Cortex-A55:
https://developer.arm.com/products/processors/cortex-a/cortex-a55
Differential Revision: https://reviews.llvm.org/D36667
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311316
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Mon, 21 Aug 2017 08:00:54 +0000 (08:00 +0000)]
[Support/Parallel] - Do not use a task group for a very small task.
parallel_for_each_n splits a given task into small pieces of tasks and then
passes them to background threads managed by a thread pool to process them
in parallel. TaskGroup then waits for all tasks to be done, which is done by
TaskGroup's destructor.
In the previous code, all tasks were passed to background threads, and the
main thread just waited for them to finish their jobs. This patch changes
the logic so that the main thread processes a task just like other
worker threads instead of just waiting for workers.
This patch improves the performance of parallel_for_each_n for a task which
is too small that we do not split it into multiple tasks. Previously, such task
was submitted to another thread and the main thread waited for its completion.
That involves multiple inter-thread synchronization which is not cheap for
small tasks. Now, such task is processed by the main thread, so no inter-thread
communication is necessary.
Differential revision: https://reviews.llvm.org/D36607
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311312
91177308-0d34-0410-b5e6-
96231b3b80d8
Coby Tayree [Mon, 21 Aug 2017 07:50:15 +0000 (07:50 +0000)]
[X86] Allow xacquire/xrelease prefixes
Allow those prefixes on assembly code
Differential Revision: https://reviews.llvm.org/D36845
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311309
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 21 Aug 2017 05:29:02 +0000 (05:29 +0000)]
[AVX-512] Don't change which instructions we use for unmasked subvector broadcasts when AVX512DQ is enabled.
There's no functional difference between the AVX512DQ instructions if we're not masking.
This change unifies test checks and removes extra isel entries. Similar was done for subvector insert and extracts recently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311308
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 21 Aug 2017 05:03:28 +0000 (05:03 +0000)]
[AVX512] Add 128->256 vbroadcastf64x2/vbroadcasti64x2 instructions to the EVEX->VEX table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311307
91177308-0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Mon, 21 Aug 2017 00:14:06 +0000 (00:14 +0000)]
[XRay][tools] Support new kinds of instrumentation map entries
Summary:
When extracting the instrumentation map from a binary, we should be able
to recognize the new kinds of instrumentation sleds we've been emitting
with the compiler using -fxray-instrument. This change adds a test for
all the kinds of sleds we currently support (sans the tail-call sled,
which is a bit harder to force in a simple prebuilt input).
Reviewers: kpw, dblaikie
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D36819
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311305
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sun, 20 Aug 2017 23:17:11 +0000 (23:17 +0000)]
Revert r311077: [LV] Using VPlan ...
This causes LLVM to assert fail on PPC64 and crash / infloop in other
cases. Filed http://llvm.org/PR34248 with reproducer attached.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311304
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 20 Aug 2017 21:38:28 +0000 (21:38 +0000)]
[InstCombine] Add a test case for a weakness in canEvaluateZExtd. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311303
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 20 Aug 2017 19:47:00 +0000 (19:47 +0000)]
[AVX512] Add a test to check what happens when a load is referenced by two different masked scalar intrinsics with the same op inputs, but different masking node.
We're missing some single use checks in the sse_load_f32/f64 handling that cause us to replicate the load.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311300
91177308-0d34-0410-b5e6-
96231b3b80d8
Kuba Mracek [Sun, 20 Aug 2017 18:31:30 +0000 (18:31 +0000)]
Fix archive-update.test after r311296.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311299
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 20 Aug 2017 18:30:24 +0000 (18:30 +0000)]
[AVX-512] Use a scalar load pattern for FPCLASSSS/FPCLASSSD patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311297
91177308-0d34-0410-b5e6-
96231b3b80d8
Kuba Mracek [Sun, 20 Aug 2017 18:18:44 +0000 (18:18 +0000)]
Remove uses of "%T" from test/Object/archive-* tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311296
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 20 Aug 2017 17:30:32 +0000 (17:30 +0000)]
[NVPTX] Reduce copypasta.
No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311295
91177308-0d34-0410-b5e6-
96231b3b80d8
Kuba Mracek [Sun, 20 Aug 2017 17:05:22 +0000 (17:05 +0000)]
Get rid of even more "%T" expansions, see <https://reviews.llvm.org/D35396>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311294
91177308-0d34-0410-b5e6-
96231b3b80d8
Kuba Mracek [Sun, 20 Aug 2017 17:00:08 +0000 (17:00 +0000)]
Get rid of some more "%T" expansions, see <https://reviews.llvm.org/D35396>.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311293
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 20 Aug 2017 15:13:39 +0000 (15:13 +0000)]
[MachO] Use Twines more efficiently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311291
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 20 Aug 2017 14:34:44 +0000 (14:34 +0000)]
[Mem2Reg] Modernize code a bit.
No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311290
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 20 Aug 2017 13:03:48 +0000 (13:03 +0000)]
Move helper classes into anonymous namespaces.
No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311288
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 20 Aug 2017 13:03:32 +0000 (13:03 +0000)]
[dlltool] Make memory buffer ownership less weird.
There's no reason to destroy them in a global destructor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311287
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Sun, 20 Aug 2017 12:34:29 +0000 (12:34 +0000)]
Changed basic cost of store operation on X86
Store operation takes 2 UOps on X86 processors. The exact cost calculation affects several optimization passes including loop unroling.
This change compensates performance degradation caused by https://reviews.llvm.org/D34458 and shows improvements on some benchmarks.
Differential Revision: https://reviews.llvm.org/D35888
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311285
91177308-0d34-0410-b5e6-
96231b3b80d8
Aditya Kumar [Sun, 20 Aug 2017 10:32:41 +0000 (10:32 +0000)]
[Loop Vectorize] Added a separate metadata
Added a separate metadata to indicate when the loop
has already been vectorized instead of setting width and count to 1.
Patch written by Divya Shanmughan and Aditya Kumar
Differential Revision: https://reviews.llvm.org/D36220
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311281
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Sun, 20 Aug 2017 09:25:22 +0000 (09:25 +0000)]
[GlobalISel][X86] Support call ABI.
Summary: Support call ABI. For now only Linux C and X86_64_SysV calling conventions supported. Variadic function not supported.
Reviewers: zvi, guyblank, oren_ben_simhon
Reviewed By: oren_ben_simhon
Subscribers: rovka, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D34602
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311279
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Sun, 20 Aug 2017 07:14:40 +0000 (07:14 +0000)]
[GlobalISel][X86] Support asimetric copy from/to GPR physical register.
Usually this case generated by ABI lowering, it requare to performe trancate/anyext.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311278
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Bradbury [Sun, 20 Aug 2017 06:58:43 +0000 (06:58 +0000)]
[RISCV] Trivial whitespace fix in RISCVInstPrinter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311277
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Bradbury [Sun, 20 Aug 2017 06:57:27 +0000 (06:57 +0000)]
[RISCV] Fix two abuses of llvm_unreachable
Replace with report_fatal_error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311276
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Bradbury [Sun, 20 Aug 2017 06:55:14 +0000 (06:55 +0000)]
[RISCV] Set HasRelocationAddend for RISCVELFObjectWriter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311275
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Elliott [Sun, 20 Aug 2017 06:55:10 +0000 (06:55 +0000)]
Revert "Emit only A Single Opt Remark When Inlining"
Reverting due to clang build failure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311274
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Elliott [Sun, 20 Aug 2017 06:43:34 +0000 (06:43 +0000)]
Emit only A Single Opt Remark When Inlining
Summary:
This updates the Inliner to only add a single Optimization
Remark when Inlining, rather than an Analysis Remark and an
Optimization Remark.
Fixes https://bugs.llvm.org/show_bug.cgi?id=33786
Reviewers: anemet, davidxl, chandlerc
Reviewed By: anemet
Subscribers: haicheng, fhahn, mehdi_amini, dblaikie, llvm-commits, eraman
Differential Revision: https://reviews.llvm.org/D36054
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311273
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Sun, 20 Aug 2017 06:26:22 +0000 (06:26 +0000)]
[GlobalIsel] Fix undefined behavior if Action not set (release), it aslo crashing in debug mode.
Differential Revision: https://reviews.llvm.org/D34978
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311272
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Elliott [Sun, 20 Aug 2017 01:30:45 +0000 (01:30 +0000)]
Keep Optimization Remark Yaml in NewPM
Summary:
The New Pass Manager infrastructure was forgetting to keep around the optimization remark yaml file that the compiler might have been producing. This meant setting the option to '-' for stdout worked, but setting it to a filename didn't give file output (presumably it was deleted because compilation didn't explicitly keep it). This change just ensures that the file is kept if compilation succeeds.
So far I have updated one of the optimization remark output tests to add a version with the new pass manager. It is my intention for this patch to also include changes to all tests that use `-opt-remark-output=` but I wanted to get the code patch ready for review while I was making all those changes.
Fixes https://bugs.llvm.org/show_bug.cgi?id=33951
Reviewers: anemet, chandlerc
Reviewed By: anemet, chandlerc
Subscribers: javed.absar, chandlerc, fhahn, llvm-commits
Differential Revision: https://reviews.llvm.org/D36906
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311271
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 19 Aug 2017 23:35:50 +0000 (23:35 +0000)]
[x86] Fix an even stranger corner case where we have multiple levels of
cmov self-refrencing.
Pointed out by Amjad Aboud in code review, test case minorly simplified
from the one he posted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311267
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 19 Aug 2017 23:21:22 +0000 (23:21 +0000)]
[X86] Merge all of the vecload and alignedload predicates into single predicates.
We can load the memory VT and check for natural alignment. This also adds a new preferNonTemporalLoad helper that checks the correct subtarget feature based on the load size.
This shrinks the isel table by at least 5000 bytes by allowing more reordering and combining to occur.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311266
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 19 Aug 2017 23:21:21 +0000 (23:21 +0000)]
[X86] Converge alignedstore/alignedstore256/alignedstore512 to a single predicate.
We can read the memoryVT and get its store size directly from the SDNode to check its alignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311265
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 19 Aug 2017 22:02:02 +0000 (22:02 +0000)]
[AVX512] Use alignedstore256 in a pattern that's emitting a 256-bit movaps from an extract subvector operation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311263
91177308-0d34-0410-b5e6-
96231b3b80d8
Victor Leschuk [Sat, 19 Aug 2017 21:05:08 +0000 (21:05 +0000)]
Set init value for ScalarEvolution::BackedgeTakenInfo::MaxOrZero
Otherwise it can be used uninitialized in move ctor.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311262
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Sat, 19 Aug 2017 20:26:51 +0000 (20:26 +0000)]
[ARM] Factorize the calculation of WhichResult in isV*Mask. NFC.
Differential Revision: https://reviews.llvm.org/D36930
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311260
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Sat, 19 Aug 2017 19:47:48 +0000 (19:47 +0000)]
[ARM] Check the right order for halves of VZIP/VUZP if both parts are used
This is the exact same fix as in SVN r247254. In that commit, the fix was
applied only for isVTRNMask and isVTRN_v_undef_Mask, but the same issue
is present for VZIP/VUZP as well.
This fixes PR33921.
Differential Revision: https://reviews.llvm.org/D36899
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311258
91177308-0d34-0410-b5e6-
96231b3b80d8