165733 Commits

Author SHA1 Message Date
Craig Topper
07beb491a5 [X86] Pass the parent SDNode to X86DAGToDAGISel::selectScalarSSELoad to simplify the hasSingleUseFromRoot handling.
Some of the calls to hasSingleUseFromRoot were passing the load itself. If the load's chain result has a user this would count against that. By getting the true parent of the match and ensuring any intermediate between the match and the load have a single use we can avoid this case. isLegalToFold will take care of checking users of the load's data output.

This fixed at least fma-scalar-memfold.ll to succed without the peephole pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334908 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-17 16:29:46 +00:00
Simon Pilgrim
a9e397149a [llvm-mca][X86] Add some avx512f/avx512vl resource test placeholders
There are a lot of instructions to add under these ISAs (and the other AVX512 variants) but this should demonstrate how to test for the EVEX instructions with different maskings

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334907 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-17 16:25:48 +00:00
Sander de Smalen
59cb663e72 [AArch64][SVE] Asm: Support for bitwise operations on predicate vectors.
This patch adds support for instructions performing bitwise operations
on predicate vectors, including AND, BIC, EOR, NAND, NOR, ORN, ORR, and
their status flag setting variants ANDS, BICS, EORS, NANDS, ORNS, ORRS.

This patch also adds several aliases:

  orr  p0.b, p1/z, p1.b, p1.b  => mov  p0.b, p1.b
  orrs p0.b, p1/z, p1.b, p1.b  => movs p0.b, p1.b

  and  p0.b, p1/z, p2.b, p2.b  => mov  p0.b, p1/z, p2.b
  ands p0.b, p1/z, p2.b, p2.b  => movs p0.b, p1/z, p2.b

  eor  p0.b, p1/z, p2.b, p1.b  => not  p0.b, p1/z, p2.b
  eors p0.b, p1/z, p2.b, p1.b  => nots p0.b, p1/z, p2.b



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334906 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-17 10:48:21 +00:00
Sander de Smalen
cac4c4a7c4 [AArch64][SVE] Asm: Support for SEL (vector/predicate) instructions.
Support for SVE's predicated select instructions to select elements
from either vector, both in a data-vector and a predicate-vector
variant.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334905 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-17 10:11:04 +00:00
Jonas Hahnfeld
572d25bd9a [NVPTX] Ignore target-cpu and -features for inlining
We don't want to prevent inlining because of target-cpu and -features
attributes that were added to newer versions of LLVM/Clang: There are
no incompatible functions in PTX, ptxas will throw errors in such cases.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334904 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-17 09:55:20 +00:00
Heejin Ahn
011c97ec87 [WebAssembly] Simple comment fix. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334899 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-17 00:37:56 +00:00
Craig Topper
73b1acb59c [X86] More additions to the load folding tables based on the autogenerated tables.
Including more additions for NotMemoryFoldable to remove some entries from the autogenerated table.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334898 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-16 23:25:50 +00:00
Craig Topper
86126e4b16 [X86] Hide POP16/32/64rmr and PUSH16/32/64rmr instructions from the assembly parser.
These all have a short form encoding that the assembler already prefers. Though that preference seems to only be based on order in the .td fie. Hiding the long form saves space in the table and prevents us from breaking the implicit order based priority.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334897 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-16 23:25:48 +00:00
Craig Topper
ea330bd086 [X86] Fix an inconsistency between AVX512 and AVX/SSE version on a couple instructions.
VMOVPQIto64Zmr is not a 64-bit mode only instruction. But I don't know how to test this because VMOVPQIto64mr should always have priority over it in 32-bit mode since its only advantage is XMM16-XMM31 which aren't usable in 32-bit mode.

VMOVPQIto64Zrr is a 64-bit mode only instruction, but we don't need to explicitly mark it as such because it uses a GR64 register which won't parse in 32-bit mode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334896 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-16 23:25:47 +00:00
Michael Zolotukhin
273aba7517 CorrelatedValuePropagation: Preserve DT.
Summary:
We only modify CFG in a couple of places, and we can preserve DT there
with a little effort.

Reviewers: davide, vsk

Subscribers: hiraditya, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334895 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-16 18:57:31 +00:00
Florian Hahn
5e8f334dfa [Dominators] Change getNode parameter type to const NodeT * (NFC).
DominatorTreeBase::getNode does not modify its parameter and this change
allows callers that only have access to const pointers to use it without
casting.

Reviewers: kuhar, dblaikie, chandlerc

Reviewed By: dblaikie

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334892 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-16 14:47:05 +00:00
Benjamin Kramer
c011f6948e Fix namespaces. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334890 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-16 13:37:52 +00:00
Florian Hahn
6b5cc84779 Revert r334887, as GCC 4.8 does not have is_trivially_copy_constructible & co
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334889 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-16 13:00:33 +00:00
Florian Hahn
e15abbe6b0 [SmallSet] Avoid using is_trivially_XXX<>::value which is C++17
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334888 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-16 12:50:32 +00:00
Florian Hahn
348096519e [SmallSet] Add SmallSetIterator.
This patch adds a simple const_iterator implementation for SmallSet by
delegating to either a SmallVector::const_iterator or
std::set::const_iterator, depending on which storage is used by the
SmallSet.

Reviewers: dblaikie, craig.topper

Reviewed By: dblaikie

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334887 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-16 12:36:19 +00:00
Stanislav Mekhanoshin
ec4b3c5670 [AMDGPU] setcc (select cc, CT, CF), CF, eq | ne -> xor cc, -1 | cc
This is the common case in the BE when we serialize condition and then
rematerialize it. Use either original or inverted condition.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334882 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-16 03:46:59 +00:00
Nirav Dave
885e8cb371 Avoid needing to walk out legalization tables. NFCI.
Relanding after fixing expensive check from modifying tables.

To avoid redundant work, during DAG legalization we keep tables
mapping pre-legalized SDValues to post-legalized SDValues and a
SDValue-to-SDValue map to enable fast node replacements. However, as
the keys are nodes which may be reused it is possible that an entry in
a table refers to a now deleted node N (that should have been renamed
by the value replacement map) while a new node N' exists. If N' is
then replaced that entry would be wrong. Previously we avoided this by
when potentially violating this property, walking every table and
updating all node pointers. This is very expensive but hopefully rare
occurance.

This patch assigns each instance of a SDValue used in legalization a
unique id and uses these ids in the legalization tables. This avoids
any such aliasing issue, avoiding the full table search and allowing
more aggressive incremental table pruning.

In some cases this is a 1000x speedup to compilation.

Reviewers: jyknight, echristo, bogner, tra

Reviewed By: bogner

Subscribers: dberris, grandinj, hiraditya, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334880 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-16 02:51:29 +00:00
Justin Lebar
cfc2fa9b55 Revert "[SCEV] Use LLVM_MARK_AS_BITMASK_ENUM in SCEV." -- breaks MSVC builds.
This reverts D48237.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334878 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-16 00:14:10 +00:00
Justin Lebar
e743a53c30 Revert "[SCEV] Simplify some flags expressions." -- dependent revision breaks MSVC builds.
This reverts D48238.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334877 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-16 00:13:57 +00:00
Michael Berg
f4fa78a051 Utilize new SDNode flag functionality to expand current support for fma
Summary: This patch originated from D47388 and is a proper subset of the originating changes, containing only the fmf optimization guard extensions.

Reviewers: spatel, hfinkel, wristow, arsenm, javed.absar, rampitec, nhaehnle, nemanjai

Reviewed By: rampitec, nhaehnle

Subscribers: tpr, nemanjai, wdng

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334876 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-16 00:03:06 +00:00
Justin Lebar
dc96bffe35 [SCEV] Simplify some flags expressions.
Summary:
Sending for presubmit review out of an abundance of caution; it would be
bad to mess this up.

Reviewers: sanjoy

Subscribers: hiraditya, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334875 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-15 23:52:11 +00:00
Justin Lebar
5802a4a49f [SCEV] Use LLVM_MARK_AS_BITMASK_ENUM in SCEV.
Summary:
Obviates the need for mask/clear/setFlags helpers.

There are some expressions here which can be simplified, but to keep
this easy to review, I have not simplified them in this patch.

No functional change.

Reviewers: sanjoy

Subscribers: hiraditya, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334874 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-15 23:51:57 +00:00
Daniel Sanders
a2824b68e6 [globalisel][tablegen] Add support for C++ predicates on PatFrags and use it to support BFC on ARM.
So far, we've only handled special cases of PatFrag like ImmLeaf. This patch
adds support for the remaining cases using similar mechanisms.

Like most C++ code from SelectionDAG, GISel and DAGISel expect to operate on
different types and representations and as such the code is not compatible
between the two. It's therefore necessary to add an alternative implementation
in the GISelPredicateCode field.

The target test for this feature could easily be done with IntImmLeaf and this
would save on a little boilerplate. The reason I've chosen to implement this
using PatFrag.GISelPredicateCode and not IntImmLeaf is because I was unable to
find a rule that was blocked solely by lack of support for PatFrag predicates. I
found that the ones I investigated as being likely candidates for the test
were further blocked by other things.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334871 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-15 23:13:43 +00:00
Francis Visoiu Mistrih
c8f69e3a9e Revert r334729 "[DAG] Avoid needing to walk out legalization tables. NFCI."
This reverts commit r334729.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334869 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-15 23:05:41 +00:00
Francis Visoiu Mistrih
b3fd12d913 Revert r334731 "Avoid unused variable in non-assert builds."
This reverts commit r334731.

It breaks EXPENSIVE_CHECKS bots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334868 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-15 23:05:40 +00:00
Craig Topper
9dda3f52a1 [X86] Add more instructions to the hasUndefRegUpdate list.
Not sure any of these matter today because I don't think we ever produce them with IMPLICIT_DEF as an input. But by listing them we don't be suprised in the future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334867 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-15 22:25:04 +00:00
Benjamin Kramer
3874a4ab05 [BPI] Remove unnecessary std::list
vector is sufficient here. No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334865 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-15 21:06:43 +00:00
Cameron McInally
b7012eca07 [FPEnv] Expand constrained FP POWI
Modify ExpandStrictFPOp(...) to handle nodes that have scalar
operands. 

Also, add a Strict FMA test and do some other light cleanup in the
Strict FP code.

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334863 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-15 20:57:55 +00:00
Michael Berg
97de3c8816 Utilize new SDNode flag functionality to expand current support for fdiv
Summary: This patch originated from D46562 and is a proper subset, with some issues addressed.

Reviewers: spatel, hfinkel, wristow, arsenm

Reviewed By: spatel

Subscribers: wdng, nhaehnle

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334862 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-15 20:44:55 +00:00
Matt Morehouse
9fcdc89784 [SanitizerCoverage] Add associated metadata to pc-tables.
Summary:
Using associated metadata rather than llvm.used allows linkers to
perform dead stripping with -fsanitize-coverage=pc-table.  Unfortunately
in my local tests, LLD was the only linker that made use of this metadata.

Partially addresses https://bugs.llvm.org/show_bug.cgi?id=34636 and fixes
https://github.com/google/sanitizers/issues/971.

Reviewers: eugenis

Reviewed By: eugenis

Subscribers: Dor1s, hiraditya, llvm-commits, kcc

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334858 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-15 20:12:58 +00:00
Geoff Berry
f1d55911bf Update my information in the CREDITS file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334857 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-15 20:02:11 +00:00
Sean Fertile
a24485376e [PowerPC] Add support for high and higha symbol modifiers on tls modifers.
Enables using the high and high-adjusted symbol modifiers on thread local
storage modifers in powerpc assembly. Needed to be able to support 64 bit
thread-pointer and dynamic-thread-pointer access sequences.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334856 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-15 19:47:16 +00:00
Sean Fertile
80cb547d11 [PPC64] Support "symbol@high" and "symbol@higha" symbol modifers.
Add support for the "@high" and "@higha" symbol modifiers in powerpc64 assembly.
The modifiers represent accessing the segment consiting of bits 16-31 of a
64-bit address/offset.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334855 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-15 19:47:11 +00:00
Diego Caballero
3a32fa4e62 Move redundant-vf2-cost.ll test to X86 directory
redundant-vf2-cost.ll is X86 specific. Moved from
test/Transforms/LoopVectorize/redundant-vf2-cost.ll to
test/Transforms/LoopVectorize/X86/redundant-vf2-cost.ll



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334854 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-15 18:46:03 +00:00
Simon Pilgrim
a292a77493 [llvm-mca][x86] Add Generic cpu resource tests
Added a Generic x86 cpu set of resource tests to allow us to check all ISAs.

We currently use SandyBridge as our generic CPU model, but it's better if we actually duplicate these tests for if/when we change the model, it also means we don't end up polluting the SandyBridge folder with tests for ISAs it doesn't support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334853 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-15 18:35:25 +00:00
Tomasz Krupa
a36133dda7 [X86] Lowering sqrt intrinsics to native IR
Summary: Complementary patch to lowering sqrt intrinsics in Clang.

Reviewers: craig.topper, spatel, RKSimon, DavidKreitzer, uriel.k

Reviewed By: craig.topper

Subscribers: tkrupa, mike.dvoretsky, llvm-commits

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334849 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-15 18:05:24 +00:00
Craig Topper
2665835577 [X86] Prevent folding stack reloads into instructions in hasUndefRegUpdate.
An earlier commit prevented folds from the peephole pass by checking for IMPLICIT_DEF. But later in the pipeline IMPLICIT_DEF just becomes and Undef flag on the input register so we need to check for that case too.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334848 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-15 17:56:17 +00:00
Krzysztof Parzyszek
69ccb71234 Remove <undef> from rematerialized full register
When coalescing a small register into a subregister of a larger register,
if the larger register is rematerialized, the function updateRegDefUses
can add an <undef> flag to the rematerialized definition (since it's
treating it as only definining the coalesced subregister). While with that
assumption doing so is not incorrect, make sure to remove the flag later
on after the call to updateRegDefUses.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334845 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-15 16:58:22 +00:00
Joseph Tremoulet
52d8fd61ea [InstCombine] Avoid iteration/mutation conflict
Summary:
When iterating users of a multiply in processUMulZExtIdiom, the
call to setOperand in the truncation case may replace the use
being visited; make sure the iterator has been advanced before
doing that replacement.

Reviewers: majnemer, davide

Reviewed By: davide

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334844 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-15 16:52:40 +00:00
Sander de Smalen
4b7915e49a [AArch64][SVE] Asm: Support for CPY SIMD/FP and GPR instructions.
Predicated splat/copy of SIMD/FP register or general purpose
register to SVE vector, along with MOV-aliases.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334842 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-15 16:39:46 +00:00
Jordan Rose
187c713c75 Avoid copying PrettyStackTrace messages an extra time on Apple OSs
We were unnecessarily going from SmallString to std::string just to
get a null-terminated C string. So just...don't do that. Crash
slightly faster!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334841 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-15 16:35:31 +00:00
Diego Caballero
ff160b6333 [LV] Prevent LV to run cost model twice for VF=2
This is a minor fix for LV cost model, where the cost for VF=2 was
computed twice when the vectorization of the loop was forced without
specifying a VF.

Reviewers: xusx595, hsaito, fhahn, mkuper

Reviewed By: hsaito, xusx595

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334840 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-15 16:21:35 +00:00
Sander de Smalen
df60d71070 [AArch64][SVE] Asm: Support for INC/DEC (scalar) instructions.
Increment/decrement scalar register by (scaled) element count given by
predicate pattern, e.g. 'incw x0, all, mul #4'.

Reviewers: rengolin, fhahn, SjoerdMeijer, samparker, javed.absar

Reviewed By: SjoerdMeijer

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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334838 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-15 15:47:44 +00:00
Matt Arsenault
bd0b6b0e98 AMDGPU: Add combine for short vector extract_vector_elts
Try to access pieces 4 bytes at a time. This helps
various hasOneUse extract_vector_elt combines, such
as load width reductions.

Avoids test regressions in a future commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334836 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-15 15:31:36 +00:00
Matt Arsenault
9e41f5314e AMDGPU: Make v4i16/v4f16 legal
Some image loads return these, and it's awkward working
around them not being legal.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334835 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-15 15:15:46 +00:00
Paul Semel
064db4306c [llvm-readobj] Add -string-dump (-p) option
This option prints the section content as a string.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334834 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-15 14:15:02 +00:00
Roman Lebedev
6fe55f4897 [MCA] Add -summary-view option
Summary:
While that is indeed a quite interesting summary stat,
there are cases where it does not really add anything
other than consuming extra lines.

Declutters the output of D48190.

Reviewers: RKSimon, andreadb, courbet, craig.topper

Reviewed By: andreadb

Subscribers: javed.absar, gbedwell, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334833 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-15 14:01:43 +00:00
Roman Lebedev
cedc64e771 [MCA][x86][NFC] Add tests for -register-file-stats, -scheduler-stats
Summary:
There does not seem to be any other tests for this.
Split off from D47676.

Reviewers: RKSimon, craig.topper, courbet, andreadb

Reviewed By: andreadb

Subscribers: javed.absar, gbedwell, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334832 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-15 14:01:35 +00:00
Sander de Smalen
4ba09bb387 [AArch64][SVE] Asm: Support for FADD, FMUL and FMAX immediate instructions.
Reviewers: rengolin, fhahn, SjoerdMeijer, samparker, javed.absar

Reviewed By: javed.absar

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334831 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-15 13:57:51 +00:00
Bjorn Pettersson
0ac3f0a4d9 Re-apply "[DebugInfo] Check size of variable in ConvertDebugDeclareToDebugValue"
This is r334704 (which was reverted in r334732) with a fix for
types like x86_fp80. We need to use getTypeAllocSizeInBits and
not getTypeStoreSizeInBits to avoid dropping debug info for
such types.

Original commit msg:
> Summary:
> Do not convert a DbgDeclare to DbgValue if the store
> instruction only refer to a fragment of the variable
> described by the DbgDeclare.
>
> Problem was seen when for example having an alloca for an
> array or struct, and there were stores to individual elements.
> In the past we inserted a DbgValue intrinsics for each store,
> just as if the store wrote the whole variable.
>
> When handling store instructions we insert a DbgValue that
> indicates that the variable is "undefined", as we do not know
> which part of the variable that is updated by the store.
>
> When ConvertDebugDeclareToDebugValue is used with a load/phi
> instruction we assert that the referenced value is large enough
> to cover the whole variable. Afaict this should be true for all
> scenarios where those methods are used on trunk. If the assert
> blows in the future I guess we could simply skip to insert a
> dbg.value instruction.
>
> In the future I think we should examine which part of the variable
> that is accessed, and add a DbgValue instrinsic with an appropriate
> DW_OP_LLVM_fragment expression.
>
> Reviewers: dblaikie, aprantl, rnk
>
> Reviewed By: aprantl
>
> Subscribers: JDevlieghere, llvm-commits
>
> Tags: #debug-info
>
> Differential Revision: https://reviews.llvm.org/D48024

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@334830 91177308-0d34-0410-b5e6-96231b3b80d8
2018-06-15 13:48:55 +00:00