OSDN Git Service
Eugene Leviant [Tue, 21 Nov 2017 11:01:28 +0000 (11:01 +0000)]
[MI scheduler] Fix VADD and VSUB in cortex-a57 model
This patch fixes instregex for interger vector add/sub instructions
Differential revision: https://reviews.llvm.org/D40254
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318749
91177308-0d34-0410-b5e6-
96231b3b80d8
Coby Tayree [Tue, 21 Nov 2017 10:32:42 +0000 (10:32 +0000)]
[x86][icelake]BITALG
vpopcnt{b,w}
Differential Revision: https://reviews.llvm.org/D40213
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318748
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Tue, 21 Nov 2017 10:17:02 +0000 (10:17 +0000)]
[ARM GlobalISel] Add comment for r318398. NFC.
Mention the purpose of the BICri tests added by r318398, as requested in
post-commit review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318747
91177308-0d34-0410-b5e6-
96231b3b80d8
Coby Tayree [Tue, 21 Nov 2017 10:04:28 +0000 (10:04 +0000)]
[x86][icelake]VNNI
Introducing Vector Neural Network Instructions, consisting of:
vpdpbusd{s}
vpdpwssd{s}
Differential Revision: https://reviews.llvm.org/D40208
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318746
91177308-0d34-0410-b5e6-
96231b3b80d8
Coby Tayree [Tue, 21 Nov 2017 09:48:44 +0000 (09:48 +0000)]
[x86][icelake]vbmi2
introducing vbmi2, consisting of
vpcompress{b,w}
vpexpand{b,w}
vpsh{l,r}d{w,d,q}
vpsh{l,r}dv{w,d,q}
Differential Revision: https://reviews.llvm.org/D40206
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318745
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Tue, 21 Nov 2017 09:41:01 +0000 (09:41 +0000)]
SLPVectorizer.cpp: Avoid std::stable_sort(properlyDominates()).
properlyDominates() shouldn't be used as sort key. It causes different output between stdlibc++ and libc++.
Instead, I introduced RPOT. In most cases, it works for CSE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318743
91177308-0d34-0410-b5e6-
96231b3b80d8
Coby Tayree [Tue, 21 Nov 2017 09:30:33 +0000 (09:30 +0000)]
[x86][icelake]vpclmulqdq introduction
an icelake promotion of pclmulqdq
Differential Revision: https://reviews.llvm.org/D40101
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318741
91177308-0d34-0410-b5e6-
96231b3b80d8
Coby Tayree [Tue, 21 Nov 2017 09:11:41 +0000 (09:11 +0000)]
[x86][icelake]VAES introduction
an icelake promotion of AES
Differential Revision: https://reviews.llvm.org/D40078
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318740
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Bradbury [Tue, 21 Nov 2017 08:23:08 +0000 (08:23 +0000)]
[RISCV] Use register X0 (ZERO) for constant 0
The obvious approach of defining a pattern like the one below actually doesn't
work:
`def : Pat<(i32 0), (i32 X0)>;`
As was noted when Lanai made this change (https://reviews.llvm.org/rL288215),
attempting to handle the constant 0 in tablegen leads to assertions due to a
physical register being used where a virtual register is expected.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318738
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Bradbury [Tue, 21 Nov 2017 08:11:03 +0000 (08:11 +0000)]
[RISCV] Support and tests for a variety of additional LLVM IR constructs
Previous patches primarily ensured that codegen was possible for the standard
RISC-V instructions. However, there are a number of IR inputs that wouldn't be
appropriately lowered. This patch both adds test cases and supports lowering
for a number of these cases:
* Improved sext/zext/trunc support
* Support for setcc variants that don't map directly to RISC-V instructions
* Lowering mul, and hence support for external symbols
* addc, adde, subc, sube
* mulhs, srem, mulhu, urem, udiv, sdiv
* {srl,sra,shl}_parts
* brind
* br_jt
* bswap, ctlz, cttz, ctpop
* rotl, rotr
* BlockAddress operands
Differential Revision: https://reviews.llvm.org/D29938
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318737
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Bradbury [Tue, 21 Nov 2017 07:51:32 +0000 (07:51 +0000)]
[RISCV] Implement lowering of ISD::SELECT
Although ISD::SELECT_CC is a more natural match for RISCVISD::SELECT_CC (and
ultimately the integer RISC-V conditional branch instructions), we choose to
expand ISD::SELECT_CC and lower ISD::SELECT. The appropriate compare+branch
will be created in the case where an ISD::SELECT condition value is created by
an ISD::SETCC node, which operates on XLen types. Other datatypes such as
floating point don't have conditional branch instructions, and lowering
ISD::SELECT allows more flexibility for handling these cases.
Differential Revision: https://reviews.llvm.org/D29937
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318735
91177308-0d34-0410-b5e6-
96231b3b80d8
Dean Michael Berris [Tue, 21 Nov 2017 07:16:57 +0000 (07:16 +0000)]
[XRay] Use optimistic logging model for FDR mode
Summary:
Before this change, the FDR mode implementation relied on at thread-exit
handling to return buffers back to the (global) buffer queue. This
introduces issues with the initialisation of the thread_local objects
which, even through the use of pthread_setspecific(...) may eventually
call into an allocation function. Similar to previous changes in this
line, we're finding that there is a huge potential for deadlocks when
initialising these thread-locals when the memory allocation
implementation is also xray-instrumented.
In this change, we limit the call to pthread_setspecific(...) to provide
a non-null value to associate to the key created with
pthread_key_create(...). While this doesn't completely eliminate the
potential for the deadlock(s), it does allow us to still clean up at
thread exit when we need to. The change is that we don't need to do more
work when starting and ending a thread's lifetime. We also have a test
to make sure that we actually can safely recycle the buffers in case we
end up re-using the buffer(s) available from the queue on multiple
thread entry/exits.
This change cuts across both LLVM and compiler-rt to allow us to update
both the XRay runtime implementation as well as the library support for
loading these new versions of the FDR mode logging. Version 2 of the FDR
logging implementation makes the following changes:
* Introduction of a new 'BufferExtents' metadata record that's outside
of the buffer's contents but are written before the actual buffer.
This data is associated to the Buffer handed out by the BufferQueue
rather than a record that occupies bytes in the actual buffer.
* Removal of the "end of buffer" records. This is in-line with the
changes we described above, to allow for optimistic logging without
explicit record writing at thread exit.
The optimistic logging model operates under the following assumptions:
* Threads writing to the buffers will potentially race with the thread
attempting to flush the log. To avoid this situation from occuring,
we make sure that when we've finalized the logging implementation,
that threads will see this finalization state on the next write, and
either choose to not write records the thread would have written or
write the record(s) in two phases -- first write the record(s), then
update the extents metadata.
* We change the buffer queue implementation so that once it's handed
out a buffer to a thread, that we assume that buffer is marked
"used" to be able to capture partial writes. None of this will be
safe to handle if threads are racing to write the extents records
and the reader thread is attempting to flush the log. The optimism
comes from the finalization routine being required to complete
before we attempt to flush the log.
This is a fairly significant semantics change for the FDR
implementation. This is why we've decided to update the version number
for FDR mode logs. The tools, however, still need to be able to support
older versions of the log until we finally deprecate those earlier
versions.
Reviewers: dblaikie, pelikan, kpw
Subscribers: llvm-commits, hiraditya
Differential Revision: https://reviews.llvm.org/D39526
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318733
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 21 Nov 2017 06:28:15 +0000 (06:28 +0000)]
[X86] Simplify type constraints for AVX2 masked gather.
We don't need separate 32 and 64 node types. We can use SDTCisInt and SDTCisSameSizeAs to ensure the mask size the result type and is integer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318732
91177308-0d34-0410-b5e6-
96231b3b80d8
Serguei Katkov [Tue, 21 Nov 2017 06:03:43 +0000 (06:03 +0000)]
Revert "[CGP] Enable complex addr mode (2nd attempt)"
Revert the patch rl318728 causing buildbot hangs-ups.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318731
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 21 Nov 2017 06:01:20 +0000 (06:01 +0000)]
[X86] Simplify the predicates for avx2 masked gather patterns.
We don't need a dyn_cast and we only need to check the type of the index. The base ptr is guaranteed to be scalar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318730
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 21 Nov 2017 05:35:45 +0000 (05:35 +0000)]
move static function. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318729
91177308-0d34-0410-b5e6-
96231b3b80d8
Serguei Katkov [Tue, 21 Nov 2017 05:31:47 +0000 (05:31 +0000)]
[CGP] Enable complex addr mode (2nd attempt)
2nd attempt to enable complex addr modes after
fix of the crash by rL318638.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318728
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaxun Liu [Tue, 21 Nov 2017 02:29:54 +0000 (02:29 +0000)]
[AMDGPU] Fix DAGTypeLegalizer::SplitInteger for shift amount type
DAGTypeLegalizer::SplitInteger uses default pointer size as shift amount constant type,
which causes less performant ISA in amdgcn---amdgiz target since the default pointer
type is i64 whereas the desired shift amount type is i32.
This patch fixes that by using TLI.getScalarShiftAmountTy in DAGTypeLegalizer::SplitInteger.
The X86 change is necessary since splitting i512 requires shifting amount of 256, which
cannot be held by i8.
Differential Revision: https://reviews.llvm.org/D40148
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318727
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 21 Nov 2017 01:52:44 +0000 (01:52 +0000)]
Split a rename_handle out of rename on windows.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318725
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Trieu [Tue, 21 Nov 2017 01:45:17 +0000 (01:45 +0000)]
Add default values for member functions.
Initialize IsVis2 and IsVis3 in SparcSubtarget::initializeSubtargetDependencies.
MSan detected uninitialized read of IsVis3 after r318704. Initializing the
variables to false will prevent undefined behavior.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318724
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Tue, 21 Nov 2017 01:20:28 +0000 (01:20 +0000)]
Re-revert "Refactor debuginfo-tests."
This is still breaking greendragon.
At this point I give up until someone can fix the greendragon
bots, and I will probably abandon this effort in favor of using
a private github repository.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318722
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 21 Nov 2017 00:33:17 +0000 (00:33 +0000)]
xray-record-yaml.h: Remove unused file
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318715
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 21 Nov 2017 00:23:19 +0000 (00:23 +0000)]
llvm-rc/ResourceScriptTokenList.h: Turns this into a .def file to imply that it's non-modular
Also undef the macros at the end of the file to make it easier to use.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318714
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 21 Nov 2017 00:23:19 +0000 (00:23 +0000)]
XRayRecord.h: Add missing #include
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318713
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Tue, 21 Nov 2017 00:23:17 +0000 (00:23 +0000)]
YAML/XRay/std::vector: Fix ODR violation by removing local specialization
There's a generic partial specialization for all std::vector<T> that
does what's desired, so no need for this full specialization that's
causing an ODR violation anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318712
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Tue, 21 Nov 2017 00:21:52 +0000 (00:21 +0000)]
[SCCP] If we replace with a constant, we can't replace with a range.
This microoptimization is NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318711
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Trieu [Tue, 21 Nov 2017 00:12:18 +0000 (00:12 +0000)]
Revert r318678 to fix Clang test
r318678 caused the Clang test CodeGen/ms-inline-asm.c to start failing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318710
91177308-0d34-0410-b5e6-
96231b3b80d8
Vitaly Buka [Mon, 20 Nov 2017 23:37:56 +0000 (23:37 +0000)]
[msan] Don't sanitize "nosanitize" instructions
Reviewers: eugenis
Subscribers: hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D40205
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318708
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 20 Nov 2017 23:08:50 +0000 (23:08 +0000)]
[SelectionDAG] When promoting the result of a VSELECT, make sure we promote the condition to the SetCC type for the final result type not the original type.
Normally this would be cleaned up by promoting the condition operand next. But in the attached case we promoted the result from v2i48 to v2i64 and the condition from v2i1 to v2i48. Then we tried to "promote" the v2i48 condition back to v2i1 because that's what the SetCC result type for v2i64 is on X86 with VLX. But promote is either a NOP or SIGN_EXTEND and this would need a truncation.
With the change here we now get the SetCC type of v2i1 when we're handling the result promotion and the operand no longer needs to be promoted itself.
Fixes PR35272.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318706
91177308-0d34-0410-b5e6-
96231b3b80d8
Fedor Sergeev [Mon, 20 Nov 2017 22:33:58 +0000 (22:33 +0000)]
[Sparc] efficient pattern for UINT_TO_FP conversion
Summary:
while investigating performance degradation of imagick benchmark
there were found inefficient pattern for UINT_TO_FP conversion.
That pattern causes RAW hazard in assembly code. Specifically,
uitofp IR operator results in poor assembler :
st %i0, [%fp - 952]
ldd [%fp - 952], %f0
it stores 32-bit integer register into memory location and then
loads 64-bit floating point data from that location.
That is exactly RAW hazard case. To optimize that case it is
possible to use SPISD::ITOF and SPISD::XTOF for conversion from
integer to floating point data type and to use ISD::BITCAST to
copy from integer register into floating point register.
The fix is to write custom UINT_TO_FP pattern using SPISD::ITOF,
SPISD::XTOF, ISD::BITCAST.
Patch by Alexey Lapshin
Reviewers: fedor.sergeev, jyknight, dcederman, lero_chris
Reviewed By: jyknight
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D36875
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318704
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Mon, 20 Nov 2017 22:12:55 +0000 (22:12 +0000)]
Add ADL support to range based <algorithm> extensions
This adds support for ADL in the range based <algorithm> extensions
(llvm::for_each etc.).
Also adds the helper functions llvm::adl::begin and llvm::adl::end which wrap
std::begin and std::end with ADL support.
Saw this was missing from a recent llvm weekly post about adding llvm::for_each
and thought I might add it.
Patch by Stephen Dollberg!
Differential Revision: https://reviews.llvm.org/D40006
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318703
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 20 Nov 2017 21:41:36 +0000 (21:41 +0000)]
Resubmit "Refactor debuginfo-tests" again.
This was reverted due to the tests being run twice on some
build bots. Each run had a slightly different configuration
due to the way in which it was being invoked. This fixes
the problem (albeit in a somewhat hacky way). Hopefully in
the future we can get rid of the workflow of running
debuginfo-tests as part of clang, and then this hack can
go away.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318697
91177308-0d34-0410-b5e6-
96231b3b80d8
Hiroshi Yamauchi [Mon, 20 Nov 2017 21:38:43 +0000 (21:38 +0000)]
Fix a lld-x86_64-darwin13 build error.
Summary:
Fix this build error
http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/15112/steps/build_Lld/logs/stdio
after https://reviews.llvm.org/rL318693
Reviewers: davidxl
Reviewed By: davidxl
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D40266
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318696
91177308-0d34-0410-b5e6-
96231b3b80d8
Yonghong Song [Mon, 20 Nov 2017 21:37:58 +0000 (21:37 +0000)]
bpf: add a test case for trunc-op optimization
Commit
b5cbc7760ab8 ("[bpf] allow direct and indirect calls")
allowed more than one function in the bpf program, and
commit
114353884415 ("bpf: fix a bug in trunc-op optimization")
fixed a bug in trunc-op optimization which only showed up
with more than one function in the bpf program.
This patch added a test case for trunc-op optimization
for bpf programs with two functions. Reverting commit
"bpf: fix a bug in trunc-op optimization" will cause
failure for this test case.
Signed-off-by: Yonghong Song <yhs@fb.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318695
91177308-0d34-0410-b5e6-
96231b3b80d8
Hiroshi Yamauchi [Mon, 20 Nov 2017 21:03:38 +0000 (21:03 +0000)]
Add heuristics for irreducible loop metadata under PGO
Summary:
Add the following heuristics for irreducible loop metadata:
- When an irreducible loop header is missing the loop header weight metadata,
give it the minimum weight seen among other headers.
- Annotate indirectbr targets with the loop header weight metadata (as they are
likely to become irreducible loop headers after indirectbr tail duplication.)
These greatly improve the accuracy of the block frequency info of the Python
interpreter loop (eg. from ~3-16x off down to ~40-55% off) and the Python
performance (eg. unpack_sequence from ~50% slower to ~8% faster than GCC) due to
better register allocation under PGO.
Reviewers: davidxl
Reviewed By: davidxl
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D39980
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318693
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 20 Nov 2017 19:18:33 +0000 (19:18 +0000)]
Fix spelling in comment. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318687
91177308-0d34-0410-b5e6-
96231b3b80d8
Mandeep Singh Grang [Mon, 20 Nov 2017 19:17:11 +0000 (19:17 +0000)]
Revert "[SelectionDAG] Make sorting predicate stronger to remove non-deterministic ordering"
This broke the bots. Reverting this until I can fix the failures.
This reverts commit
5a3db2856d12a3c4b400f487d39f8f05989e79f0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318686
91177308-0d34-0410-b5e6-
96231b3b80d8
Evandro Menezes [Mon, 20 Nov 2017 19:11:56 +0000 (19:11 +0000)]
[AArch64] Adjust the cost model for Exynos M1 and M2
Fix the modeling of test and branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318685
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Robinson [Mon, 20 Nov 2017 19:07:52 +0000 (19:07 +0000)]
Revert "Fix out-of-order stepping behavior in programs with sunk instructions."
This reverts commit
30419e150cd940893a13b345e85f96053850208f.
aka r318679. It caused "sanitizer-windows" bot to fail.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318684
91177308-0d34-0410-b5e6-
96231b3b80d8
Mandeep Singh Grang [Mon, 20 Nov 2017 18:46:11 +0000 (18:46 +0000)]
[SelectionDAG] Make sorting predicate stronger to remove non-deterministic ordering
Summary:
This fixes failures in the following tests uncovered by D39245:
LLVM :: CodeGen/ARM/ifcvt3.ll
LLVM :: CodeGen/ARM/switch-minsize.ll
LLVM :: CodeGen/X86/switch.ll
Reviewers: hans, efriedma
Reviewed By: hans
Subscribers: fhahn, aemerson, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D39995
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318680
91177308-0d34-0410-b5e6-
96231b3b80d8
Paul Robinson [Mon, 20 Nov 2017 18:42:17 +0000 (18:42 +0000)]
Fix out-of-order stepping behavior in programs with sunk instructions.
MachineSink attempts to place instructions near the basic blocks where
they are needed. Once an instruction has been sunk, its location
relative to other instructions is no longer consistent with the
original source code. In order to ensure correct single-stepping and
profiling, the debug location for sunk instructions is either merged
with the insertion point or erased if the target successor block is
empty.
Patch by Matthew Voss!
Differential Revision: https://reviews.llvm.org/D39933
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318679
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Mon, 20 Nov 2017 18:38:55 +0000 (18:38 +0000)]
[X86] Avoid unecessary opsize byte in segment move to memory
Summary:
Segment moves to memory are always 16-bit. Remove invalid 32 and 64
bit variants.
Fixes PR34478.
Reviewers: rnk, craig.topper
Subscribers: llvm-commits, hiraditya
Differential Revision: https://reviews.llvm.org/D39847
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318678
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Mon, 20 Nov 2017 18:33:38 +0000 (18:33 +0000)]
[SROA] Correctly invalidate analyses when dead instructions deleted
Summary:
SROA can fail in rewriting alloca but still rewrite a phi resulting
in dead instruction elimination. The Changed flag was not being set
correctly, resulting in downstream passes using stale analyses.
The included test case will assert during the second BDCE pass as a
result.
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D39921
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318677
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitry Preobrazhensky [Mon, 20 Nov 2017 18:24:21 +0000 (18:24 +0000)]
[AMDGPU][MC][GFX8][GFX9] Corrected names of integer v_{add/addc/sub/subrev/subb/subbrev}
See bug 34765: https://bugs.llvm.org//show_bug.cgi?id=34765
Reviewers: tamazov, SamWot, arsenm, vpykhtin
Differential Revision: https://reviews.llvm.org/D40088
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318675
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Mon, 20 Nov 2017 17:41:57 +0000 (17:41 +0000)]
[asan] Use dynamic shadow on 32-bit Android, try 2.
Summary:
This change reverts r318575 and changes FindDynamicShadowStart() to
keep the memory range it found mapped PROT_NONE to make sure it is
not reused. We also skip MemoryRangeIsAvailable() check, because it
is (a) unnecessary, and (b) would fail anyway.
Reviewers: pcc, vitalybuka, kcc
Subscribers: srhines, kubamracek, mgorny, llvm-commits, hiraditya
Differential Revision: https://reviews.llvm.org/D40203
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318666
91177308-0d34-0410-b5e6-
96231b3b80d8
Tony Jiang [Mon, 20 Nov 2017 16:55:07 +0000 (16:55 +0000)]
[MachineCSE] Add new callback for is caller preserved or constant physregs
The instructions addis,addi, bl are used to calculate the address of TLS thread
local variables. These TLS access code sequences are generated repeatedly every
time the thread local variable is accessed. By communicating to Machine CSE that
X2 is guaranteed to have the same value within the same function call (so called
Caller Preserved Physical Register), the redundant TLS access code sequences are
cleaned up.
Differential Revision: https://reviews.llvm.org/D39173
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318661
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaxun Liu [Mon, 20 Nov 2017 16:53:13 +0000 (16:53 +0000)]
[AMDGPU] Update test r600.amdgpu-alias-analysis.ll
Manually update test r600.amdgpu-alias-analysis.ll for amdgiz environment
since it cannot be done by script.
The two pointers are swapped in the output because PrintResults in
AliasAnalysisEvaluator.cpp sorts the strings obtained from printAsOperand
before printing them.
Differential Revision: https://reviews.llvm.org/D40131
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318660
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Mon, 20 Nov 2017 15:59:18 +0000 (15:59 +0000)]
[mips] Reorder target specific passes
Move the hazard scheduling pass to after the long branch pass, as the
long branch pass can create forbiddden slot hazards. Rather than complicating
the implementation of the long branch pass to handle forbidden slot hazards,
just reorder the passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318657
91177308-0d34-0410-b5e6-
96231b3b80d8
Jonas Paulsson [Mon, 20 Nov 2017 14:54:03 +0000 (14:54 +0000)]
[SystemZ] Bugfix for handling of subregisters in getRegAllocationHints().
The 32 bit subreg indices of GR128 registers must also be checked for in
getRC32().
Review: Ulrich Weigand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318652
91177308-0d34-0410-b5e6-
96231b3b80d8
Tony Jiang [Mon, 20 Nov 2017 14:38:30 +0000 (14:38 +0000)]
[PPC] Heuristic to choose between a X-Form VSX ld/st vs a X-Form FP ld/st.
The VSX versions have the advantage of a full 64-register target whereas the FP
ones have the advantage of lower latency and higher throughput. So what we’re
after is using the faster instructions in low register pressure situations and
using the larger register file in high register pressure situations.
The heuristic chooses between the following 7 pairs of instructions.
PPC::LXSSPX vs PPC::LFSX
PPC::LXSDX vs PPC::LFDX
PPC::STXSSPX vs PPC::STFSX
PPC::STXSDX vs PPC::STFDX
PPC::LXSIWAX vs PPC::LFIWAX
PPC::LXSIWZX vs PPC::LFIWZX
PPC::STXSIWX vs PPC::STFIWX
Differential Revision: https://reviews.llvm.org/D38486
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318651
91177308-0d34-0410-b5e6-
96231b3b80d8
Sander de Smalen [Mon, 20 Nov 2017 14:36:40 +0000 (14:36 +0000)]
[AArch64][TableGen] Skip tied result operands for InstAlias
Summary:
This patch fixes an issue so that the right alias is printed when the instruction has tied operands. It checks the number of operands in the resulting instruction as opposed to the alias, and then skips over tied operands that should not be printed in the alias.
This allows to generate the preferred assembly syntax for the AArch64 'ins' instruction, which should always be displayed as 'mov' according to the ARM Architecture Reference Manual. Several unit tests have changed as a result, but only to reflect the preferred disassembly. Some other InstAlias patterns (movk/bic/orr) needed a slight adjustment to stop them becoming the default and breaking other unit tests.
Please note that the patch is mostly the same as https://reviews.llvm.org/D29219 which was reverted because of an issue found when running TableGen with the Address Sanitizer. That issue has been addressed in this iteration of the patch.
Reviewers: rengolin, stoklund, huntergr, SjoerdMeijer, rovka
Reviewed By: rengolin, SjoerdMeijer
Subscribers: fhahn, aemerson, javed.absar, kristof.beyls, llvm-commits
Differential Revision: https://reviews.llvm.org/D40030
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318650
91177308-0d34-0410-b5e6-
96231b3b80d8
Valery Pykhtin [Mon, 20 Nov 2017 14:35:53 +0000 (14:35 +0000)]
AMDGPU: Partial ILP scheduler port from SelectionDAG to SchedulingDAG (experimental)
Differential revision: https://reviews.llvm.org/D39897
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318649
91177308-0d34-0410-b5e6-
96231b3b80d8
Gil Rapaport [Mon, 20 Nov 2017 12:01:47 +0000 (12:01 +0000)]
[LV] Model masking in VPlan, introducing VPInstructions
This patch adds a new abstraction layer to VPlan and leverages it to model the planned
instructions that manipulate masks (AND, OR, NOT), introduced during predication.
The new VPValue and VPUser classes model how data flows into, through and out
of a VPlan, forming the vertices of a planned Def-Use graph. The new
VPInstruction class is a generic single-instruction Recipe that models a
planned instruction along with its opcode, operands and users. See
VectorizationPlan.rst for more details.
Differential Revision: https://reviews.llvm.org/D38676
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318645
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Mon, 20 Nov 2017 11:05:31 +0000 (11:05 +0000)]
[ARM GlobalISel] Add test for RSBri. NFC
Add instruction selector test for RSBri, which is derived from
AsI1_rbin_irs, and make sure it doesn't get mistaken for SUBri, which is
derived from the very similar AsI1_bin_irs pattern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318643
91177308-0d34-0410-b5e6-
96231b3b80d8
Diana Picus [Mon, 20 Nov 2017 10:35:35 +0000 (10:35 +0000)]
[ARM GlobalISel] Clean up binary operator tests. NFC
Remove some of the instruction selector tests for binary operators (and,
or, xor). These are all derived from the same kind of TableGen pattern,
AsI1_bin_irs, so there's no point in testing all of them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318642
91177308-0d34-0410-b5e6-
96231b3b80d8
Mohammed Agabaria [Mon, 20 Nov 2017 08:18:12 +0000 (08:18 +0000)]
[LV][X86] Support of AVX2 Gathers code generation and update the LV with this
This patch depends on: https://reviews.llvm.org/D35348
Support of pattern selection of masked gathers of AVX2 (X86\AVX2 code gen)
Update LoopVectorize to generate gathers for AVX2 processors.
Reviewers: delena, zvi, RKSimon, craig.topper, aaboud, igorb
Reviewed By: delena, RKSimon
Differential Revision: https://reviews.llvm.org/D35772
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318641
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 20 Nov 2017 08:15:04 +0000 (08:15 +0000)]
[X86] Regenerate a test with broadcast comments. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318640
91177308-0d34-0410-b5e6-
96231b3b80d8
Max Kazantsev [Mon, 20 Nov 2017 06:07:57 +0000 (06:07 +0000)]
[IRCE] Smart range intersection
In rL316552, we ban intersection of unsigned latch range with signed range check and vice
versa, unless the entire range check iteration space is known positive. It was a correct
functional fix that saved us from dealing with ambiguous values, but it also appeared
to be a very restrictive limitation. In particular, in the following case:
loop:
%iv = phi i32 [ 0, %preheader ], [ %iv.next, %latch]
%iv.offset = add i32 %iv, 10
%rc = icmp slt i32 %iv.offset, %len
br i1 %rc, label %latch, label %deopt
latch:
%iv.next = add i32 %iv, 11
%cond = icmp i32 ult %iv.next, 100
br it %cond, label %loop, label %exit
Here, the unsigned iteration range is `[0, 100)`, and the safe range for range
check is `[-10, %len - 10)`. For unsigned iteration spaces, we use unsigned
min/max functions for range intersection. Given this, we wanted to avoid dealing
with `-10` because it is interpreted as a very big unsigned value. Semantically, range
check's safe range goes through unsigned border, so in fact it is two disjoint
ranges in IV's iteration space. Intersection of such ranges is not trivial, so we prohibited
this case saying that we are not allowed to intersect such ranges.
What semantics of this safe range actually means is that we can start from `-10` and go
up increasing the `%iv` by one until we reach `%len - 10` (for simplicity let's assume that
`%len - 10` is a reasonably big positive value).
In particular, this safe iteration space includes `0, 1, 2, ..., %len - 11`. So if we were able to return
safe iteration space `[0, %len - 10)`, we could safely intersect it with IV's iteration space. All
values in this range are non-negative, so using signed/unsigned min/max for them is unambiguous.
In this patch, we alter the algorithm of safe range calculation so that it returnes a subset of the
original safe space which is represented by one continuous range that does not go through wrap.
In order to reach this, we use modified SCEV substraction function. It can be imagined as a function
that substracts by `1` (or `-1`) as long as the further substraction does not cause a wrap in IV iteration
space. This allows us to perform IRCE in many situations when we deal with IV space and range check
of different types (in terms of signed/unsigned).
We apply this approach for both matching and not matching types of IV iteration space and the
range check. One implication of this is that now IRCE became smarter in detection of empty safe
ranges. For example, in this case:
loop:
%iv = phi i32 [ %begin, %preheader ], [ %iv.next, %latch]
%iv.offset = sub i32 %iv, 10
%rc = icmp ult i32 %iv.offset, %len
br i1 %rc, label %latch, label %deopt
latch:
%iv.next = add i32 %iv, 11
%cond = icmp i32 ult %iv.next, 100
br it %cond, label %loop, label %exit
If `%len` was less than 10 but SCEV failed to trivially prove that `%begin - 10 >u %len- 10`,
we could end up executing entire loop in safe preloop while the main loop was still generated,
but never executed. Now, cutting the ranges so that if both `begin - 10` and `%len - 10` overflow,
we have a trivially empty range of `[0, 0)`. This in some cases prevents us from meaningless optimization.
Differential Revision: https://reviews.llvm.org/D39954
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318639
91177308-0d34-0410-b5e6-
96231b3b80d8
Serguei Katkov [Mon, 20 Nov 2017 05:42:36 +0000 (05:42 +0000)]
[CGP] Fix the crash caused by enable of complex addr mode
We must collect all AddModes even if they are the same.
This is due to Original value is different but we need all original
values collected as they are used as anchors in common phi finding.
Reviewers: john.brawn, reames
Reviewed By: john.brawn
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D40166
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318638
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 19 Nov 2017 23:49:19 +0000 (23:49 +0000)]
[X86] clzero check in getHostCPUFeatures should use getX86CpuIDAndInfo not getX86CpuIDAndInfoEx.
This leaf doesn't take an additional argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318634
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 19 Nov 2017 23:30:22 +0000 (23:30 +0000)]
[X86] Reorder and reformat the feature bit checks in getHostCPUFeatues to keep the bits in order per register and encourage future additions to be in order too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318633
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 19 Nov 2017 17:31:37 +0000 (17:31 +0000)]
[x86] add sqrt tests for partially-inline-libcalls (PR31455)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318630
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 19 Nov 2017 16:42:27 +0000 (16:42 +0000)]
[LibCallSimplifier] allow splat vectors for pow(x, 0.5) -> sqrt() transforms
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318629
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 19 Nov 2017 16:13:14 +0000 (16:13 +0000)]
[LibCallSimplifier] partly fix pow(x, 0.5) -> sqrt() transforms
As the first test shows, we could transform an llvm intrinsic which never sets errno
into a libcall which could set errno (even though it's marked readnone?), so that's
not ideal.
It's possible that we can also transform a libcall which could set errno to an
intrinsic given the fast-math-flags constraint, but that's deferred to determine
exactly which set of FMF are needed.
Differential Revision: https://reviews.llvm.org/D40150
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318628
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 19 Nov 2017 15:34:27 +0000 (15:34 +0000)]
[InstSimplify] fold and/or of fcmp ord/uno when operand is known nnan
The 'ord' and 'uno' predicates have a logic operation for NAN built into their definitions:
FCMP_ORD = 7, ///< 0 1 1 1 True if ordered (no nans)
FCMP_UNO = 8, ///< 1 0 0 0 True if unordered: isnan(X) | isnan(Y)
So we can simplify patterns like this:
(fcmp ord (known NNAN), X) && (fcmp ord X, Y) --> fcmp ord X, Y
(fcmp uno (known NNAN), X) || (fcmp uno X, Y) --> fcmp uno X, Y
It might be better to split this into (X uno 0) | (Y uno 0) as a canonicalization, but that
would be another patch.
Differential Revision: https://reviews.llvm.org/D40130
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318627
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 19 Nov 2017 06:24:26 +0000 (06:24 +0000)]
[X86] Add test cases for rndscaless/sd intrinsics.
Also fix the memop in the ins for these instructions. Not sure what effect this has.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318624
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 19 Nov 2017 05:42:54 +0000 (05:42 +0000)]
[X86] Improve load folding of scalar rcp28 and rsqrt28 instructions using sse_load_f32/f64.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318623
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexei Starovoitov [Sun, 19 Nov 2017 02:41:53 +0000 (02:41 +0000)]
[bpf] remove unused variable
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318615
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexei Starovoitov [Sun, 19 Nov 2017 01:35:00 +0000 (01:35 +0000)]
[bpf] allow direct and indirect calls
kernel verifier is becoming smarter and soon will support
direct and indirect function calls.
Remove obsolete error from BPF backend.
Make call to use PCRel_4 fixup.
'bpf to bpf' calls are distinguished from 'bpf to kernel' calls
by insn->src_reg == BPF_PSEUDO_CALL == 1 which is used as relocation
indicator similar to ld_imm64->src_reg == BPF_PSEUDO_MAP_FD == 1
The actual 'call' instruction remains the same for both
'bpf to kernel' and 'bpf to bpf' calls.
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318614
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 19 Nov 2017 01:25:30 +0000 (01:25 +0000)]
[X86] Switch cannonlake to use the SkylakeServer scheduling model instead of Haswell.
Cannonlake comes after skylake and supports avx512 so this is probably a closer model for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318613
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 19 Nov 2017 01:12:00 +0000 (01:12 +0000)]
[X86] Add skeleton support for icelake CPU.
There are several patches out for review right now to implement Icelake features. This adds a CPU to collect them under.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318612
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 19 Nov 2017 01:11:58 +0000 (01:11 +0000)]
[X86] Fix 80 column violation and remove trailing whitespace. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318611
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Fiselier [Sun, 19 Nov 2017 00:00:49 +0000 (00:00 +0000)]
[LIT] Fix testing out-of-tree Clang builds
Summary:
Currently, LIT configures the LLVM binary path before the Clang binary path. However this breaks testing out-of-tree Clang builds (where the LLVM binary path includes a copy of Clang).
This patch reverses the order of the paths when looking for Clang, putting the Clang binary directory first.
Reviewers: zturner, beanz, chapuni, modocache, EricWF
Reviewed By: EricWF
Subscribers: mgorny, cfe-commits, llvm-commits
Differential Revision: https://reviews.llvm.org/D40217
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318607
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 18 Nov 2017 23:23:25 +0000 (23:23 +0000)]
[MC][X86] Add test case from PR19251
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318605
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 18 Nov 2017 23:06:42 +0000 (23:06 +0000)]
[MC][X86] Add teet case from PR32807
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318603
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Fiselier [Sat, 18 Nov 2017 22:42:26 +0000 (22:42 +0000)]
Fix use of config.h in public headers.
The CodeGenCoverage.h header is installed, but it references
the build-only header "llvm/Config/config.h". This breaks use
of the CodeGenCoverage.h header once it is installed, because config.h isn't
available.
This patch fixes the error by moving the config.h include from
the CodeGenCoverage.h header (where it's not needed), to the
CodeGenCoverage.cpp source file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318602
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 18 Nov 2017 19:47:59 +0000 (19:47 +0000)]
[X86][AVX512VL] Add AVX512VL tests to the vselect packss tests.
PR34553 has gone, adding tests to ensure it doesn't come back.
vselect_packss_v16i64 still has some awful codegen on AVX512 targets....
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318599
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 18 Nov 2017 19:25:35 +0000 (19:25 +0000)]
[X86] Add another gather test with v8i8 sign extended indices.
This requires the indices to be legalized and sign extended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318597
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 18 Nov 2017 19:05:12 +0000 (19:05 +0000)]
[X86] Simplify the gather/scatter isel predicates.
We don't need a dyn_cast, the predicate already specified the base node. We only need to check the type of the index, the base ptr is guaranteed to be scalar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318596
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 18 Nov 2017 18:49:16 +0000 (18:49 +0000)]
[X86] Qualify a few places with ExperimentalVectorWideningLegalization.
I'm playing around with this flag and these places cause errors if not qualified.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318595
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 18 Nov 2017 18:33:07 +0000 (18:33 +0000)]
[X86] Add todo comment for TRUNC(SUB(X,C)) -> SUB(TRUNC(X),C')
As discussed on PR35295, but it causes regressions in combineSubToSubus which need to be addressed first
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318594
91177308-0d34-0410-b5e6-
96231b3b80d8
Florian Hahn [Sat, 18 Nov 2017 18:14:13 +0000 (18:14 +0000)]
[CallSiteSplitting] Remove some indirection (NFC).
Summary:
With this patch I tried to reduce the complexity of the code sightly, by
removing some indirection. Please let me know what you think.
Reviewers: junbuml, mcrosier, davidxl
Reviewed By: junbuml
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D40037
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318593
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sat, 18 Nov 2017 16:25:38 +0000 (16:25 +0000)]
[x86] add tests for unnecessary shuffling; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318592
91177308-0d34-0410-b5e6-
96231b3b80d8
Martin Storsjo [Sat, 18 Nov 2017 06:23:48 +0000 (06:23 +0000)]
[X86] Output cfi directives for saved XMM registers even if no GPRs are saved
This makes sure that functions that only clobber xmm registers
(on win64) also get the right cfi directives, if dwarf exceptions
are enabled.
Differential Revision: https://reviews.llvm.org/D40191
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318591
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 18 Nov 2017 05:09:55 +0000 (05:09 +0000)]
[X86] Fix typo in variable name. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318590
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Sat, 18 Nov 2017 04:28:59 +0000 (04:28 +0000)]
[AArch64] Map G_LOAD on FPR when the definition goes to a copy to FPR
We used to detect loads feeding fp instructions, but we were
failing to take into account cases where this happens through copies.
For instance, loads can fed copies coming from the ABI lowering
of floating point arguments/results.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318589
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Sat, 18 Nov 2017 04:28:58 +0000 (04:28 +0000)]
[AArch64] Map G_STORE on FPR when the source comes from a FPR copy
We used to detect that stores were fed by fp instructions, but we were
failing to take into account cases where this happens through copies.
For instance, stores can be fed by copies coming from the ABI lowering
of floating point arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318588
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Sat, 18 Nov 2017 04:28:58 +0000 (04:28 +0000)]
[RegisterBankInfo] Relax the assert of having matching type sizes on default mappings
Instead of asserting that the type sizes are exactly equal, we check
that the new size is big enough to contain the original type.
We have to relax this constrain because, right now, we sometimes
specify that things that are smaller than a storage type are legal
instead of widening everything to the size of a storage type.
E.g., we say that G_AND s16 is legal and we map that on GPR32.
This is something we may revisit in the future (either by changing
the legalization process or keeping track separately of the storage
size and the size of the type), but let us reflect the reality of
the situation for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318587
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Sat, 18 Nov 2017 04:28:56 +0000 (04:28 +0000)]
[AArch64][RegisterBankInfo] Teach instruction mapping about gpr32 -> fpr16 cross copies
Turns out this copies can actually occur because of the way we lower the
ABI for half.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318586
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 18 Nov 2017 02:12:53 +0000 (02:12 +0000)]
Reorder static functions. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318584
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 18 Nov 2017 02:05:59 +0000 (02:05 +0000)]
Split realPathFromHandle in two.
By having an UTF-16 version we avoid some code duplication in calling
GetFinalPathNameByHandleW.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318583
91177308-0d34-0410-b5e6-
96231b3b80d8
Walter Lee [Sat, 18 Nov 2017 01:13:18 +0000 (01:13 +0000)]
[asan] Add a full redzone after every stack variable
We were not doing that for large shadow granularity. Also add more
stack frame layout tests for large shadow granularity.
Differential Revision: https://reviews.llvm.org/D39475
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318581
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Sat, 18 Nov 2017 00:22:34 +0000 (00:22 +0000)]
Revert "[asan] Use dynamic shadow on 32-bit Android" and 3 more.
Revert the following commits:
r318369 [asan] Fallback to non-ifunc dynamic shadow on android<22.
r318235 [asan] Prevent rematerialization of &__asan_shadow.
r317948 [sanitizer] Remove unnecessary attribute hidden.
r317943 [asan] Use dynamic shadow on 32-bit Android.
MemoryRangeIsAvailable() reads /proc/$PID/maps into an mmap-ed buffer
that may overlap with the address range that we plan to use for the
dynamic shadow mapping. This is causing random startup crashes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318575
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Sat, 18 Nov 2017 00:16:44 +0000 (00:16 +0000)]
[globalisel][tablegen] Generalize pointer-type inference by introducing ptypeN. NFC
ptypeN is functionally the same as typeN except that it informs the
SelectionDAG importer that an operand should be treated as a pointer even
if it was written as iN. This is important for patterns that use iN instead
of iPTR to represent pointers. E.g.:
(set GPR64:$dst, (load GPR64:$addr))
Previously, this was handled as a hardcoded special case for the appropriate
operands to G_LOAD and G_STORE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318574
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 17 Nov 2017 23:52:33 +0000 (23:52 +0000)]
[lit] Try to improve Ctrl-C behavior on Windows
This functionality was broken during a refactor a while back because
'pool' is no longer in scope.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318572
91177308-0d34-0410-b5e6-
96231b3b80d8
Petr Hosek [Fri, 17 Nov 2017 23:51:53 +0000 (23:51 +0000)]
[CMake][runtimes] Don't passthrough prefixes for non-default targets
The passthrough is useful for setting up the options for the default
build, but we already have a different mechanism to pass CMake flags
to builds for builtins and runtimes targets so this is not really
needed there. Furthermore, when the flags are set for the default
build, with the prefix passthrough set we have to explicitly override
all options in other targets which can be cumbersome.
Differential Revision: https://reviews.llvm.org/D39988
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318571
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Fri, 17 Nov 2017 22:51:43 +0000 (22:51 +0000)]
Fix an issue with llvm lit tool substitutions.
When using an installed clang with an in-tree llvm, we were not
searching in the right paths for the tools.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318564
91177308-0d34-0410-b5e6-
96231b3b80d8
Zhen Cao [Fri, 17 Nov 2017 21:59:43 +0000 (21:59 +0000)]
[MC] Fix regression tests on Windows when git “core.autocrlf” is set to true.
Differential Revision: https://reviews.llvm.org/D39737
This is the second attempt to commit this. The test was broken on Linux in the first attempt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318560
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 17 Nov 2017 21:35:32 +0000 (21:35 +0000)]
AMDGPU: Move hazard avoidance out of waitcnt pass.
This is mostly moving VMEM clause breaking into
the hazard recognizer. Also move another hazard
currently handled in the waitcnt pass.
Also stops breaking clauses unless xnack is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318557
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Fri, 17 Nov 2017 21:18:32 +0000 (21:18 +0000)]
[llvm-profdata] Don't treat non-fatal merge errors as fatal
This fixes an issue seen on the coverage bot:
http://lab.llvm.org:8080/green/view/Experimental/job/clang-stage2-coverage-R/1930
Profile merging shouldn't fail if a single counter mismatch is detected.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@318555
91177308-0d34-0410-b5e6-
96231b3b80d8