OSDN Git Service
Sanjay Patel [Thu, 6 Dec 2018 23:53:58 +0000 (23:53 +0000)]
[DAGCombiner] don't bother saving a SDLoc for a node that's dead; NFCI
We shouldn't care about the debug location for a node that
we're creating, but attaching the root of the pattern should
be the best effort. (If this is not true, then we are doing
it wrong all over the SDAG).
This is no-functional-change-intended, and there are no
regression test diffs...and that's what I expected. But
there's a similar line above this diff, where those
assumptions apparently do not hold.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348550
91177308-0d34-0410-b5e6-
96231b3b80d8
Nikita Popov [Thu, 6 Dec 2018 23:50:32 +0000 (23:50 +0000)]
[DemandedBits][BDCE] Support vectors of integers
DemandedBits and BDCE currently only support scalar integers. This
patch extends them to also handle vector integer operations. In this
case bits are not tracked for individual vector elements, instead a
bit is demanded if it is demanded for any of the elements. This matches
the behavior of computeKnownBits in ValueTracking and
SimplifyDemandedBits in InstCombine.
The getDemandedBits() method can now only be called on instructions that
have integer or vector of integer type. Previously it could be called on
any sized instruction (even if it was not particularly useful). The size
of the return value is now always the scalar size in bits (while
previously it was the type size in bits).
Differential Revision: https://reviews.llvm.org/D55297
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348549
91177308-0d34-0410-b5e6-
96231b3b80d8
Nikita Popov [Thu, 6 Dec 2018 23:50:19 +0000 (23:50 +0000)]
[BDCE] Add tests for BDCE applied to vector instructions; NFC
These are baseline tests for D55297.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348548
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 6 Dec 2018 23:39:28 +0000 (23:39 +0000)]
[DAGCombiner] more clean up in hoistLogicOpWithSameOpcodeHands(); NFC
This code can still misbehave.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348547
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Thu, 6 Dec 2018 22:40:05 +0000 (22:40 +0000)]
Run `git ls-files '*.gn' '*.gni' | xargs -n 1 gn format`.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348539
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Thu, 6 Dec 2018 22:36:16 +0000 (22:36 +0000)]
[gn build] merge r348505.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348537
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 6 Dec 2018 22:26:59 +0000 (22:26 +0000)]
[X86] Directly create ADC/SBB nodes instead of using ADD/SUB with (and SETCC_CARRY, 1)
This addresses a FIXME and avoids depending on an isel pattern match I think. I've remove the isel patterns too since he have no lit tests left that cover them. Hopefully that really means they are unused.
I'm trying to decide if we need SETCC_CARRY. This removes one of its usages.
Differential Revision: https://reviews.llvm.org/D55355
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348536
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 6 Dec 2018 22:10:44 +0000 (22:10 +0000)]
[DAGCombiner] don't group bswap with casts in logic hoisting fold
This was probably organized as it was because bswap is a unary op.
But that's where the similarity to the other opcodes ends. We should
not limit this transform to scalars, and we should not try it if
either input has other uses. This is another step towards trying to
clean this whole function up to prevent it from causing infinite loops
and memory explosions.
Earlier commits in this series:
rL348501
rL348508
rL348518
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348534
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 6 Dec 2018 21:56:30 +0000 (21:56 +0000)]
[x86] add test for vector bitwise-logic-of-bswaps; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348530
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 6 Dec 2018 20:02:47 +0000 (20:02 +0000)]
[DAGCombiner] reduce indent; NFC
Unlike some of the folds in hoistLogicOpWithSameOpcodeHands()
above this shuffle transform, this has the expected hasOneUse()
checks in place.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348523
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Thu, 6 Dec 2018 19:55:38 +0000 (19:55 +0000)]
[DagCombiner][X86] Simplify a ConcatVectors of a scalar_to_vector with undef.
This patch introduces a new DAGCombiner rule to simplify concat_vectors nodes:
concat_vectors( bitcast (scalar_to_vector %A), UNDEF)
--> bitcast (scalar_to_vector %A)
This patch only partially addresses PR39257. In particular, it is enough to fix
one of the two problematic cases mentioned in PR39257. However, it is not enough
to fix the original test case posted by Craig; that particular case would
probably require a more complicated approach (and knowledge about used bits).
Before this patch, we used to generate the following code for function PR39257
(-mtriple=x86_64 , -mattr=+avx):
vmovsd (%rdi), %xmm0 # xmm0 = mem[0],zero
vxorps %xmm1, %xmm1, %xmm1
vblendps $3, %xmm0, %xmm1, %xmm0 # xmm0 = xmm0[0,1],xmm1[2,3]
vmovaps %ymm0, (%rsi)
vzeroupper
retq
Now we generate this:
vmovsd (%rdi), %xmm0 # xmm0 = mem[0],zero
vmovaps %ymm0, (%rsi)
vzeroupper
retq
As a side note: that VZEROUPPER is completely redundant...
I guess the vzeroupper insertion pass doesn't realize that the definition of
%xmm0 from vmovsd is already zeroing the upper half of %ymm0. Note that on
%-mcpu=btver2, we don't get that vzeroupper because pass vzeroupper insertion
%pass is disabled.
Differential Revision: https://reviews.llvm.org/D55274
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348522
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 6 Dec 2018 19:18:56 +0000 (19:18 +0000)]
[DAGCombiner] don't hoist logic op if operands have other uses, part 2
The PPC test with 2 extra uses seems clearly better by avoiding this transform.
With 1 extra use, we also prevent an extra register move (although that might
be an RA problem). The general rule should be to only make a change here if
it is always profitable. The x86 diffs are all neutral.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348518
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 6 Dec 2018 19:17:28 +0000 (19:17 +0000)]
Fix Wdocumentation warning. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348517
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 6 Dec 2018 19:05:19 +0000 (19:05 +0000)]
[PowerPC] add tests for hoisting bitwise logic; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348516
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian Prantl [Thu, 6 Dec 2018 18:44:48 +0000 (18:44 +0000)]
Reapply "Adapt gcov to changes in CFE."
This reverts commit r348203 and reapplies D55085 with an additional
GCOV bugfix to make the change NFC for relative file paths in .gcno files.
Thanks to Ilya Biryukov for additional testing!
Original commit message:
Update Diagnostic handling for changes in CFE.
The clang frontend no longer emits the current working directory for
DIFiles containing an absolute path in the filename: and will move the
common prefix between current working directory and the file into the
directory: component.
https://reviews.llvm.org/D55085
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348512
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Thu, 6 Dec 2018 18:25:37 +0000 (18:25 +0000)]
[AArch64] Fix Exynos predicate
Fix predicate for arithmetic instructions with shift and/or extend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348510
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 6 Dec 2018 18:16:32 +0000 (18:16 +0000)]
[DAGCombiner] don't hoist logic op if operands have other uses
The AVX512 diffs are neutral, but the bswap test shows a clear overreach in
hoistLogicOpWithSameOpcodeHands(). If we don't check for other uses, we can
increase the instruction count.
This could also fight with transforms trying to go in the opposite direction
and possibly blow up/infinite loop. This might be enough to solve the bug
noted here:
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-
20181203/608593.html
I did not add the hasOneUse() checks to all opcodes because I see a perf
regression for at least one opcode. We may decide that's irrelevant in the
face of potential compiler crashing, but I'll see if I can salvage that first.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348508
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 6 Dec 2018 18:06:10 +0000 (18:06 +0000)]
[x86] add test for hoistLogicOpWithSameOpcodeHands with extra uses; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348506
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Thu, 6 Dec 2018 17:49:15 +0000 (17:49 +0000)]
[PDB] Move some code around. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348505
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Thu, 6 Dec 2018 17:42:35 +0000 (17:42 +0000)]
[gn build] Process .def.in files in llvm/Config and add lib/Target/BUILD.gn
Tweak write_cmake_config.py to also handle variable references looking @FOO@
(matching CMake's configure_file() function), and make it replace '\' 'n' in
values with a newline literal since there's no good portable way of passing a
real newline literal on a command line.
Use that to process all the .def.in files in llvm/include/Config and add
llvm/lib/Target/BUILD.gn, which (indirectly, through llvm-c/Target.h) includes
them.
Differential Revision: https://reviews.llvm.org/D55184
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348503
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 6 Dec 2018 17:08:03 +0000 (17:08 +0000)]
[DAGCombiner] refactor function that hoists bitwise logic; NFCI
Added FIXME and TODO comments for lack of safety checks.
This function is a suspect in out-of-memory errors as discussed in
the follow-up thread to r347917:
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-
20181203/608593.html
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348501
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Thu, 6 Dec 2018 16:55:00 +0000 (16:55 +0000)]
Support skewed stream arrays.
VarStreamArray was built on the assumption that it is backed by a
StreamRef, and offset 0 of that StreamRef is the first byte of the first
record in the array.
This is a logical and intuitive assumption, but unfortunately we have
use cases where it doesn't hold. Specifically, a PDB module's symbol
stream is prefixed by 4 bytes containing a magic value, and the first
byte of record data in the array is actually at offset 4 of this byte
sequence.
Previously, we would just truncate the first 4 bytes and then construct
the VarStreamArray with the resulting StreamRef, so that offset 0 of the
underlying stream did correspond to the first byte of the first record,
but this is problematic, because symbol records reference other symbol
records by the absolute offset including that initial magic 4 bytes. So
if another record wants to refer to the first record in the array, it
would say "the record at offset 4".
This led to extremely confusing hacks and semantics in loading code, and
after spending 30 minutes trying to get some math right and failing, I
decided to fix this in the underlying implementation of VarStreamArray.
Now, we can say that a stream is skewed by a particular amount. This
way, when we access a record by absolute offset, we can use the same
values that the records themselves contain, instead of having to do
fixups.
Differential Revision: https://reviews.llvm.org/D55344
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348499
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 6 Dec 2018 16:29:14 +0000 (16:29 +0000)]
[X86] Refactored IsSplatVector to use switch. NFCI.
Initial step towards making the function more generic (and probably move into SelectionDAG).
This is necessary to avoid massive codegen bloat for PR38243 (Add modulo rotate support to LowerRotate).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348498
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Bataev [Thu, 6 Dec 2018 16:25:35 +0000 (16:25 +0000)]
[DEBUGINFO, NVPTX] Disable emission of ',debug' option if only debug directives are allowed.
Summary:
If the output of debug directives only is requested, we should drop
emission of ',debug' option from the target directive. Required for
supporting of nvprof profiler.
Reviewers: echristo
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D46061
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348497
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexandros Lamprineas [Thu, 6 Dec 2018 16:11:58 +0000 (16:11 +0000)]
[GVN] Don't perform scalar PRE on GEPs
Partial Redundancy Elimination of GEPs prevents CodeGenPrepare from
sinking the addressing mode computation of memory instructions back
to its uses. The problem comes from the insertion of PHIs, which
confuse CGP and make it bail.
I've autogenerated the check lines of an existing test and added a
store instruction to demonstrate the motivation behind this change.
The store is now using the gep instead of a phi.
Differential Revision: https://reviews.llvm.org/D55009
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348496
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexey Bataev [Thu, 6 Dec 2018 16:02:09 +0000 (16:02 +0000)]
[DEBUGINFO, NVPTX]Emit last debugging directives.
Summary:
We may end up with not emitted debug directives at the end of the module
emission. Patch fixes this problem emitting those last directives the
end of the module emission.
Reviewers: echristo
Subscribers: jholewinski, llvm-commits
Differential Revision: https://reviews.llvm.org/D54320
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348495
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 6 Dec 2018 15:39:25 +0000 (15:39 +0000)]
DAGCombiner::visitINSERT_VECTOR_ELT - pull out repeated VT.getVectorNumElements(). NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348494
91177308-0d34-0410-b5e6-
96231b3b80d8
Diogo N. Sampaio [Thu, 6 Dec 2018 15:39:17 +0000 (15:39 +0000)]
[NFC][AArch64] Split out backend features
This patch splits backend features currently
hidden behind architecture versions.
For example, currently the only way to activate
complex numbers extension is targeting an v8.3
architecture, where after the patch this extension
can be added separately.
This refactoring is required by the new command lines proposal:
http://lists.llvm.org/pipermail/llvm-dev/2018-September/126346.html
Reviewers: DavidSpickett, olista01, t.p.northover
Subscribers: kristof.beyls, bryanpkc, javed.absar, pbarrio
Differential revision: https://reviews.llvm.org/D54633
--
It was reverted in rL348249 due a build bot failure in one of the
regression tests:
http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/14386
The problem seems to be that FileCheck behaves
different in windows and linux. This new patch
splits the test file in multiple,
and does more exact pattern matching attempting
to circumvent the issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348493
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Thu, 6 Dec 2018 15:13:44 +0000 (15:13 +0000)]
[ARM][NFC] Adding another test for armcgp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348489
91177308-0d34-0410-b5e6-
96231b3b80d8
Nicolai Haehnle [Thu, 6 Dec 2018 14:33:40 +0000 (14:33 +0000)]
AMDGPU: Generate VALU ThreeOp Integer instructions
Summary:
Original patch by: Fabian Wahlster <razor@singul4rity.com>
Change-Id: I148f692a88432541fad468963f58da9ddf79fac5
Reviewers: arsenm, rampitec
Subscribers: kzhuravl, jvesely, wdng, yaxunl, dstuttard, tpr, t-tye, b-sumner, llvm-commits
Differential Revision: https://reviews.llvm.org/D51995
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348488
91177308-0d34-0410-b5e6-
96231b3b80d8
Valery Pykhtin [Thu, 6 Dec 2018 14:20:02 +0000 (14:20 +0000)]
[AMDGPU] Partial revert of rL348371: Turn on the DPP combiner by default
Turn the combiner back off as there're failures until the issue is fixed.
Differential revision: https://reviews.llvm.org/D55314
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348487
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 6 Dec 2018 14:02:02 +0000 (14:02 +0000)]
Fix -Wcovered-switch-default warning. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348486
91177308-0d34-0410-b5e6-
96231b3b80d8
Ilya Biryukov [Thu, 6 Dec 2018 13:21:01 +0000 (13:21 +0000)]
Revert "[LoopSimplifyCFG] Delete dead in-loop blocks"
This reverts commit r348457.
The original commit causes clang to crash when doing an instrumented
build with a new pass manager. Reverting to unbreak our integrate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348484
91177308-0d34-0410-b5e6-
96231b3b80d8
Markus Lavin [Thu, 6 Dec 2018 13:20:27 +0000 (13:20 +0000)]
Test commit: Removed trailing space in .txt file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348483
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Thu, 6 Dec 2018 12:58:58 +0000 (12:58 +0000)]
[ARM][NFC] Added extra arm-cgp test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348482
91177308-0d34-0410-b5e6-
96231b3b80d8
Clement Courbet [Thu, 6 Dec 2018 10:07:12 +0000 (10:07 +0000)]
[X86][NFC] Convert memcpy/memset tests to update_llc_test_checks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348477
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Thu, 6 Dec 2018 09:26:14 +0000 (09:26 +0000)]
[ARM GlobalISel] Nothing is legal for Thumb
...yet!
A lot of the current code should be shared for arm and thumb mode, but
until we add tests and work out some of the details (e.g. checking the
correct subtarget feature for G_SDIV) it's safer to bail out as early as
possible for thumb targets.
This should have arguably been part of r348347, which allowed Thumb
functions to be handled by the IR Translator.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348472
91177308-0d34-0410-b5e6-
96231b3b80d8
Clement Courbet [Thu, 6 Dec 2018 08:48:06 +0000 (08:48 +0000)]
[X86][NFC] Add more tests for memset.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348465
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Thu, 6 Dec 2018 08:42:57 +0000 (08:42 +0000)]
[llvm-dwarfdump] - Simplify the test case.
The test was fully rewritten for simplification.
New test code was suggested by David Blaikie.
Differential revision: https://reviews.llvm.org/D55261
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348464
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Thu, 6 Dec 2018 08:14:24 +0000 (08:14 +0000)]
[InstCombine] foldICmpWithLowBitMaskedVal(): don't miscompile -1 vector elts
I was finally able to quantify what i thought was missing in the fix,
it was vector constants. If we have a scalar (and %x, -1),
it will be instsimplified before we reach this code,
but if it is a vector, we may still have a -1 element.
Thus, we want to avoid the fold if *at least one* element is -1.
Or in other words, ignoring the undef elements, no sign bits
should be set. Thus, m_NonNegative().
A follow-up for rL348181
https://bugs.llvm.org/show_bug.cgi?id=39861
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348462
91177308-0d34-0410-b5e6-
96231b3b80d8
Roman Lebedev [Thu, 6 Dec 2018 08:11:20 +0000 (08:11 +0000)]
[NFC][InstCombine] Add more miscompile tests for foldICmpWithLowBitMaskedVal()
We also have to me aware of vector constants. If at least one element
is -1, we can't transform.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348461
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Thu, 6 Dec 2018 07:00:02 +0000 (07:00 +0000)]
[X86] Remove some leftover code for handling an i1 setcc type. NFC
We should only need to handle i8 now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348460
91177308-0d34-0410-b5e6-
96231b3b80d8
Max Kazantsev [Thu, 6 Dec 2018 05:45:02 +0000 (05:45 +0000)]
[LoopSimplifyCFG] Delete dead in-loop blocks
This patch teaches LoopSimplifyCFG to delete loop blocks that have
become unreachable after terminator folding has been done.
Differential Revision: https://reviews.llvm.org/D54023
Reviewed By: anna
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348457
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Thu, 6 Dec 2018 03:32:50 +0000 (03:32 +0000)]
InstCombine: Add some missing tests for scalarization
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348456
91177308-0d34-0410-b5e6-
96231b3b80d8
Jake Ehrlich [Thu, 6 Dec 2018 02:03:53 +0000 (02:03 +0000)]
[llvm-objcopy] Change --only-keep to --only-section
I just hard core goofed when I wrote this and created a different name
for no good reason. I'm failry aware of most "fresh" users of llvm-objcopy
(that is, users which are not using it as a drop in replacement for GNU
objcopy) and can say that only "-j" is being used by such people so this
patch should strictly increase compatibility and not remove it.
Differential Revision: https://reviews.llvm.org/D52180
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348446
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Thu, 6 Dec 2018 01:40:23 +0000 (01:40 +0000)]
AArch64: Fix invalid CCMP emission
The code emitting AND-subtrees used to check whether any of the operands
was an OR in order to figure out if the result needs to be negated.
However the OR could be hidden in further subtrees and not immediately
visible.
Change the code so that canEmitConjunction() determines whether the
result of the generated subtree needs to be negated. Cleanup emission
logic to use this. I also changed the code a bit to make all negation
decisions early before we actually emit the subtrees.
This fixes http://llvm.org/PR39550
Differential Revision: https://reviews.llvm.org/D54137
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348444
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Thu, 6 Dec 2018 00:52:54 +0000 (00:52 +0000)]
Add objc.* ARC intrinsics and codegen them to their runtime methods.
Reviewers: erik.pilkington, ahatanak
Differential Revision: https://reviews.llvm.org/D55233
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348441
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Thu, 6 Dec 2018 00:26:21 +0000 (00:26 +0000)]
[MachineOutliner][NFC] Move yet another std::vector out of a loop
Once again, following the wisdom of the LLVM Programmer's Manual.
I think that's enough refactoring for today. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348439
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Thu, 6 Dec 2018 00:04:03 +0000 (00:04 +0000)]
[MachineOutliner][NFC] Move std::vector out of loop
See http://llvm.org/docs/ProgrammersManual.html#vector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348433
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Thu, 6 Dec 2018 00:01:51 +0000 (00:01 +0000)]
[MachineOutliner][NFC] Remove IntegerInstructionMap from InstructionMapper
Refactoring.
This map was only used when we used a string of integers to output the outlined
sequence. Since it's no longer used for anything, there's no reason to keep it
around.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348432
91177308-0d34-0410-b5e6-
96231b3b80d8
Amara Emerson [Wed, 5 Dec 2018 23:53:30 +0000 (23:53 +0000)]
[GlobalISel] Introduce G_BUILD_VECTOR, G_BUILD_VECTOR_TRUNC and G_CONCAT_VECTOR opcodes.
These opcodes are intended to subsume some of the capability of G_MERGE_VALUES,
as it was too powerful and thus complex to add deal with throughout the GISel
pipeline.
G_BUILD_VECTOR creates a vector value from a sequence of uniformly typed
scalar values. G_BUILD_VECTOR_TRUNC is a special opcode for handling scalar
operands which are larger than the destination vector element type, and
therefore does an implicit truncate.
G_CONCAT_VECTOR creates a vector by concatenating smaller, uniformly typed,
vectors together.
These will be used in a subsequent commit. This commit just adds the initial
infrastructure.
Differential Revision: https://reviews.llvm.org/D53594
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348430
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Wed, 5 Dec 2018 23:39:07 +0000 (23:39 +0000)]
[MachineOutliner][NFC] Remove buildCandidateList and replace with findCandidates
More refactoring.
Since the pruning logic has changed, and the candidate list is gone,
everything can be sunk into findCandidates.
We no longer need to keep track of the length of the longest substring, so we
can drop all of that logic as well.
After this, we just find all of the candidates and move to outlining.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348428
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Wed, 5 Dec 2018 23:24:22 +0000 (23:24 +0000)]
[MachineOutliner][NFC] Candidates don't need to be shared_ptrs anymore
More refactoring.
After the changes to the pruning logic, and removing CandidateList, there's
no reason for Candiates to be shared_ptrs (or pointers at all).
std::shared_ptr<Candidate> -> Candidate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348427
91177308-0d34-0410-b5e6-
96231b3b80d8
David L. Jones [Wed, 5 Dec 2018 23:13:50 +0000 (23:13 +0000)]
Revert r347934 "[SCEV] Guard movement of insertion point for loop-invariants"
This change caused SEGVs in instcombine. (The r347934 change seems to me to be a
precipitating cause, not a root cause. Details are on the llvm-commits thread
for r347934.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348426
91177308-0d34-0410-b5e6-
96231b3b80d8
Heejin Ahn [Wed, 5 Dec 2018 23:10:09 +0000 (23:10 +0000)]
[WebAssembly] Change event section code to 13
Summary:
We decided to change the event section code from 12 to 13 as new
`DataCount` section in the bulk memory operations proposal will take the
code 12 instead.
Reviewers: sbc100
Subscribers: dschuff, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D55343
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348424
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 5 Dec 2018 23:09:33 +0000 (23:09 +0000)]
[InstCombine] remove dead code from visitExtractElement
Extracting from a splat constant is always handled by InstSimplify.
Move the test for this from InstCombine to InstSimplify to make
sure that stays true.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348423
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Wed, 5 Dec 2018 22:50:26 +0000 (22:50 +0000)]
[MachineOutliner][NFC] Remove CandidateList, since it's now unused.
After removing the pruning logic, there's no reason to populate a list of
Candidates. Remove CandidateList and update comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348422
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Wed, 5 Dec 2018 22:47:25 +0000 (22:47 +0000)]
Fix buildbot capture warning
A bot didn't like my lambda. This ought to fix it.
Example:
http://lab.llvm.org:8011/builders/lld-x86_64-win7/builds/30139/steps/build%20lld/logs/stdio
error C3493: 'AlreadyRemoved' cannot be implicitly captured because no default
capture mode has been specified
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348421
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Wed, 5 Dec 2018 22:27:38 +0000 (22:27 +0000)]
[MachineOutliner][NFC] Simplify and unify pruning/outlining logic
Since we're now performing outlining per OutlinedFunction rather than per
Candidate, we can simply outline each candidate as it shows up.
Instead of having a pruning phase, instead, we'll outline entire functions.
Then we'll update the UnsignedVec we mapped to reflect the deletion. If any
candidate is in a space that's marked dirty, then we'll drop it.
This lets us remove the pruning logic entirely, and greatly simplifies the
code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348420
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 5 Dec 2018 21:57:51 +0000 (21:57 +0000)]
[InstCombine] reduce duplication in visitExtractElementInst; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348418
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 5 Dec 2018 21:56:13 +0000 (21:56 +0000)]
[InstCombine] add/move tests for extractelement; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348417
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 5 Dec 2018 21:42:17 +0000 (21:42 +0000)]
ThinLTO: Do not import debug info for imported global constants
It looks like this isn't necessary (in any tests I've done, it results
in the global being described with no location or value in the imported
side - while it's still fully described in the place it's imported from)
& results in significant/pathological debug info growth to home these
location-less global variable descriptions on the import side.
This is a rather pressing/important issue to address - this regressed
executable size for one example I'm looking at by 15%, object size is probably
similar though I haven't measured it, and a 22x increase in the number of CUs
in the cu_index in split DWARF DWP files, creating a similarly large regression
in the time it takes llvm-symbolizer to run on such binaries.
Reviewers: tejohnson, evgeny777
Differential Revision: https://reviews.llvm.org/D55309
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348416
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Wed, 5 Dec 2018 21:36:04 +0000 (21:36 +0000)]
[MachineOutliner] Outline functions by order of benefit
Mostly NFC, only change is the order of outlined function names.
Loop over the outlined functions instead of walking the candidate list.
This is a bit easier to understand. It's far more natural to create a function,
then replace all of its occurrences with calls than the other way around.
The functions outlined after this do not change, but their names will be
decided by their benefit. E.g, OUTLINED_FUNCTION_0 will now always be the
most beneficial function, rather than the first one seen.
This makes it easier to enforce an ordering on the outlined functions. So,
this also adds a test to make sure that the ordering works as expected.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348414
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 5 Dec 2018 21:14:51 +0000 (21:14 +0000)]
[Hexagon] Add intrinsics for Hexagon V66
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348413
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 5 Dec 2018 21:01:07 +0000 (21:01 +0000)]
[Hexagon] Add instruction definitions for Hexagon V66
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348411
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 5 Dec 2018 20:18:09 +0000 (20:18 +0000)]
[Hexagon] Foundation of support for Hexagon V66
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348407
91177308-0d34-0410-b5e6-
96231b3b80d8
Aditya Nandakumar [Wed, 5 Dec 2018 20:14:52 +0000 (20:14 +0000)]
[GISel]: Provide standard interface to observe changes in GISel passes
https://reviews.llvm.org/D54980
This provides a standard API across GISel passes to observe and notify
passes about changes (insertions/deletions/mutations) to MachineInstrs.
This patch also removes the recordInsertion method in MachineIRBuilder
and instead provides method to setObserver.
Reviewed by: vkeles.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348406
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Wed, 5 Dec 2018 19:35:37 +0000 (19:35 +0000)]
[CodeExtractor] Do not marked outlined calls which may resume EH as noreturn
Treat terminators which resume exception propagation as returning instructions
(at least, for the purposes of marking outlined functions `noreturn`). This is
to avoid inserting traps after calls to outlined functions which unwind.
rdar://
46129950
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348404
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 5 Dec 2018 19:32:19 +0000 (19:32 +0000)]
[X86][SSE] Fix a copy+paste typo that was folding the sext/zext of partial vectors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348403
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Wed, 5 Dec 2018 18:42:57 +0000 (18:42 +0000)]
[AArch64] Reword description of feature (NFC)
Reword the description of the feature that enables custom handling of cheap
instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348398
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Wed, 5 Dec 2018 18:34:51 +0000 (18:34 +0000)]
[llvm-mca] Simplify test (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348395
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Wed, 5 Dec 2018 18:30:06 +0000 (18:30 +0000)]
[llvm-mca] Sort test run lines (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348393
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Wed, 5 Dec 2018 18:17:40 +0000 (18:17 +0000)]
[MachineOutliner][NFC] Use getOccurrenceCount() in getNotOutlinedCost()
Some more gardening.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348392
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Wed, 5 Dec 2018 18:12:52 +0000 (18:12 +0000)]
[MachineOutliner][NFC] Make getters in MachineOutliner.h const
Just some refactoring. A few of the getters in OutlinedFunction weren't const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348391
91177308-0d34-0410-b5e6-
96231b3b80d8
Jessica Paquette [Wed, 5 Dec 2018 17:57:33 +0000 (17:57 +0000)]
[MachineOutliner][NFC] Don't create outlined sequence from integer mapping
Some gardening/refactoring.
It's cleaner to copy the instructions into the MachineFunction using the first
candidate instead of going to the mapper.
Also, by doing this we can remove the Seq member from OutlinedFunction entirely.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348390
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Desaulniers [Wed, 5 Dec 2018 17:46:24 +0000 (17:46 +0000)]
[gold-plugin] allow function/data sections to be toggleable
Summary:
r336838 allowed these to be toggleable.
r336858 reverted r336838.
r336943 made the generation of these sections conditional on LDPO_REL.
This commit brings back the toggle-ability. You can specify:
-plugin-opt=-function-sections
-plugin-opt=-data-sections
For your linker flags to disable the changes made in r336943.
Without toggling r336943 off, arm64 linux kernels linked with gold-plugin
see significant boot time regressions, but with r336943 outright reverted
x86_64 linux kernels linked with gold-plugin fail to boot.
Reviewers: pcc, void
Reviewed By: pcc
Subscribers: javed.absar, kristof.beyls, llvm-commits, srhines
Differential Revision: https://reviews.llvm.org/D55291
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348389
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Wed, 5 Dec 2018 17:34:59 +0000 (17:34 +0000)]
AMDGPU: Fix using old address spaces in some tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348385
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 5 Dec 2018 17:10:30 +0000 (17:10 +0000)]
[DAGCombiner] don't try to extract a fraction of a vector binop and crash (PR39893)
Because we're potentially peeking through a bitcast in this transform,
we need to use overall bitwidths rather than number of elements to
determine when it's safe to proceed.
Should fix:
https://bugs.llvm.org/show_bug.cgi?id=39893
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348383
91177308-0d34-0410-b5e6-
96231b3b80d8
Christian Bruel [Wed, 5 Dec 2018 16:48:00 +0000 (16:48 +0000)]
Allow norecurse attribute on functions that have debug infos.
Summary: debug intrinsics might be marked norecurse to enable the caller function to be norecurse and optimized if needed. This avoids code gen optimisation differences when -g is used, as in globalOpt.cpp:processInternalGlobal checks.
Reviewers: chandlerc, jmolloy, aprantl
Reviewed By: aprantl
Subscribers: aprantl, llvm-commits
Differential Revision: https://reviews.llvm.org/D55187
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348381
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Wed, 5 Dec 2018 16:23:27 +0000 (16:23 +0000)]
[X86] Add test case to show missed opportunity to combine a concat_vector into a scalar_to_vector. NFC
This is a test for D55274.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348380
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gesiak [Wed, 5 Dec 2018 15:56:09 +0000 (15:56 +0000)]
Revert "[IR] Add NODISCARD to attribute functions"
Revert https://reviews.llvm.org/D55217 due to warnings-turned-into-errors in
AMGPU targets. I'll fix the warnings first, then re-commit this patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348375
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 5 Dec 2018 15:42:11 +0000 (15:42 +0000)]
[SLH] Fix a nasty bug in SLH.
Whenever we effectively take the address of a basic block we need to
manually update that basic block to reflect that fact or later passes
such as tail duplication and tail merging can break the invariants of
the code. =/ Sadly, there doesn't appear to be any good way of
automating this or even writing a reasonable assert to catch it early.
The change seems trivially and obviously correct, but sadly the only
really good test case I have is 1000s of basic blocks. I've tried
directly writing a test case that happens to make tail duplication do
something that crashes later on, but this appears to require an
*amazingly* complex set of conditions that I've not yet reproduced.
The change is technically covered by the tests because we mark the
blocks as having their address taken, but that doesn't really count as
properly testing the functionality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348374
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Wed, 5 Dec 2018 15:41:13 +0000 (15:41 +0000)]
[SLH] Regenerate tests with --no_x86_scrub_rip to restore the higher
fidelity checking of RIP-based references to basic blocks and other
labels.
These labels are super important for SLH tests so we should keep them
readable in the test cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348373
91177308-0d34-0410-b5e6-
96231b3b80d8
Brian Gesiak [Wed, 5 Dec 2018 15:33:55 +0000 (15:33 +0000)]
[IR] Add NODISCARD to attribute functions
Summary:
Many functions on `llvm::AttributeList` and `llvm::AttributeSet` are
documented with "returns a new {list,set} because attribute
{lists,sets} are immutable." This documentation can be aided by the
addition of an attribute, `LLVM_NODISCARD`. Adding this prevents
unsuspecting users of the API from expecting
`AttributeList::setAttributes` from modifying the underlying list.
At the very least, it would have saved me a few hours of debugging, since I
had been doing just that! I had a bug in my program where I was calling
`setAttributes` but then passing in the unmutated `AttributeList`.
I tried adding LLVM_NODISCARD and confirmed that it would have made my bug
immediately obvious.
Reviewers: rnk, javed.absar
Reviewed By: rnk
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D55217
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348372
91177308-0d34-0410-b5e6-
96231b3b80d8
Valery Pykhtin [Wed, 5 Dec 2018 15:21:17 +0000 (15:21 +0000)]
[AMDGPU]: Turn on the DPP combiner by default
Differential revision: https://reviews.llvm.org/D55314
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348371
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 5 Dec 2018 15:04:00 +0000 (15:04 +0000)]
[InstCombine] simplify icmps with same operands based on dominating cmp
The tests here are based on the motivating cases from D54827.
More background:
1. We don't get these cases in general with SimplifyCFG because the root
of the pattern match is an icmp, not a branch. I'm not sure how often
we encounter this pattern vs. the seemingly more likely case with
branches, but I don't see evidence to leave the minimal pattern
unoptimized.
2. This has a chance of increasing compile-time because we're using a
ValueTracking call to handle the match. The motivating cases could be
handled with a simpler pair of calls to isImpliedTrueByMatchingCmp/
isImpliedFalseByMatchingCmp, but I saw that we have a more
comprehensive wrapper around those, so we might as well use it here
unless there's evidence that it's significantly slower.
3. Ideally, we'd handle the fold to constants in InstSimplify, but as
with the existing code here, we could extend this to handle cases
where the result is not a constant, but a new combined predicate.
That would mean splitting the logic across the 2 passes and possibly
duplicating the pattern-matching cost.
4. As mentioned in D54827, this seems like the kind of thing that should
be handled in Correlated Value Propagation, but that pass is currently
limited to dealing with instructions with constant operands, so extending
this bit of InstCombine is the smallest/easiest way to get these patterns
optimized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348367
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 5 Dec 2018 14:46:37 +0000 (14:46 +0000)]
[X86][SSE] Begun adding modulo rotate support to LowerRotate
Prep work for PR38243 - mainly adding comments on where we need to add modulo support (doing so at the moment causes massive codegen regressions).
I've also consistently added support for modulo folding for uniform constants (although at the moment we have no way to trigger this) and removed the old assertions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348366
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Wed, 5 Dec 2018 13:22:56 +0000 (13:22 +0000)]
[llvm-rc] Support not expressions.
Patch by Jacek Caban!
Differential Revision: https://reviews.llvm.org/D55242
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348363
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 5 Dec 2018 12:20:05 +0000 (12:20 +0000)]
[TargetLowering] Remove ISD::ANY_EXTEND/ANY_EXTEND_VECTOR_INREG opcodes from SimplifyDemandedVectorElts
These have no test coverage and the KnownZero flags can't be guaranteed unlike SIGN/ZERO_EXTEND cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348361
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 5 Dec 2018 11:55:33 +0000 (11:55 +0000)]
[DAG] Add fshl/fshr tblgen opcodes
Missed off from https://reviews.llvm.org/D54698
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348358
91177308-0d34-0410-b5e6-
96231b3b80d8
Michal Gorny [Wed, 5 Dec 2018 11:15:50 +0000 (11:15 +0000)]
[test] Skip ThinLTO cache tests requiring atime setting on NetBSD
Skip the ThinLTO cache tests on NetBSD. They require 'touch' being
able to alter atime of files, while NetBSD inhibits atime updates
when filesystem is mounted noatime.
Differential Revision: https://reviews.llvm.org/D55273
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348355
91177308-0d34-0410-b5e6-
96231b3b80d8
Michal Gorny [Wed, 5 Dec 2018 11:15:46 +0000 (11:15 +0000)]
[test] Split strip-preserve-time.test, and skip atime test on NetBSD
Split timestamp preservation tests into atime and mtime test, and skip
the former on NetBSD. When the filesystem is mounted noatime, NetBSD
not only inhibits implicit atime updates but also prevents setting atime
via utime(), causing the test to fail.
Differential Revision: https://reviews.llvm.org/D55271
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348354
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 5 Dec 2018 11:12:12 +0000 (11:12 +0000)]
[SelectionDAG] Initial support for FSHL/FSHR funnel shift opcodes (PR39467)
This is an initial patch to add a minimum level of support for funnel shifts to the SelectionDAG and to begin wiring it up to the X86 SHLD/SHRD instructions.
Some partial legalization code has been added to handle the case for 'SlowSHLD' where we want to expand instead and I've added a few DAG combines so we don't get regressions from the existing DAG builder expansion code.
Differential Revision: https://reviews.llvm.org/D54698
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348353
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Wed, 5 Dec 2018 11:06:29 +0000 (11:06 +0000)]
[MC] - Fix build bot.
Error was:
/home/buildslave/slave_as-bldslv8/lld-perf-testsuite/llvm/lib/MC/MCFragment.cpp:241:22: error: field 'Offset' will be initialized after field 'LayoutOrder' [-Werror,-Wreorder]
Atom(nullptr), Offset(~UINT64_C(0)), LayoutOrder(0) {
http://lab.llvm.org:8011/builders/lld-perf-testsuite/builds/9628/steps/build-bin%2Flld/logs/stdio
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348351
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 5 Dec 2018 10:45:44 +0000 (10:45 +0000)]
Remove superfluous comments. NFCI.
As requested in D54698.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348350
91177308-0d34-0410-b5e6-
96231b3b80d8
George Rimar [Wed, 5 Dec 2018 10:43:58 +0000 (10:43 +0000)]
Recommit r348243 - "[llvm-mc] - Do not crash when referencing undefined debug sections."
The patch triggered an unrelated msan issue: LayoutOrder variable was not initialized.
(http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-fast/builds/26794/steps/check-llvm%20msan/logs/stdio)
It was fixed.
Original commit message:
MC has code that pre-creates few debug sections:
https://github.com/llvm-mirror/llvm/blob/master/lib/MC/MCObjectFileInfo.cpp#L396
If users code has a reference to such section but does not redefine it,
MC code currently asserts, because still thinks they are normally defined.
The patch fixes the issue.
Differential revision: https://reviews.llvm.org/D55173
----
Modified : /llvm/trunk/lib/MC/ELFObjectWriter.cpp
Added : /llvm/trunk/test/MC/ELF/undefined-debug.s
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348349
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Wed, 5 Dec 2018 10:37:45 +0000 (10:37 +0000)]
[TargetLowering] SimplifyDemandedVectorElts - don't alter DemandedElts mask
Fix potential issue with the ISD::INSERT_VECTOR_ELT case tweaking the DemandedElts mask instead of using a local copy - so later uses of the mask use the tweaked version.....
Noticed while investigating adding zero/undef folding to SimplifyDemandedVectorElts and the altered DemandedElts mask was causing mismatches.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348348
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Wed, 5 Dec 2018 10:35:28 +0000 (10:35 +0000)]
[ARM GlobalISel] Implement call lowering for Thumb2
The only things that are different from arm are:
* different opcodes for calls and returns
* Thumb calls take predicate operands
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348347
91177308-0d34-0410-b5e6-
96231b3b80d8
Alina Sbirlea [Wed, 5 Dec 2018 10:16:21 +0000 (10:16 +0000)]
[LICM] *Actually* disable ControlFlowHoisting.
Summary:
The remaining code paths that ControlFlowHoisting introduced that were
not disabled, increased compile time by 3x for some benchmarks.
The time is spent in DominatorTree updates.
Reviewers: john.brawn, mkazantsev
Subscribers: sanjoy, jlebar, llvm-commits
Differential Revision: https://reviews.llvm.org/D55313
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348345
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Wed, 5 Dec 2018 08:35:30 +0000 (08:35 +0000)]
HowToBuildWithPGO.rst: Fix a few details in the manual steps
Differential revision: https://reviews.llvm.org/D55268
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@348342
91177308-0d34-0410-b5e6-
96231b3b80d8