OSDN Git Service
Adrian McCarthy [Mon, 20 Jun 2016 17:51:27 +0000 (17:51 +0000)]
Properly handle short file names on the command line in Windows [TAKE 2]
Trying to expand short names with a relative path doesn't work, so this
first gets the module name to get a full path (which can still have short
names).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273171
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 20 Jun 2016 17:48:48 +0000 (17:48 +0000)]
[InstCombine] regenerate checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273170
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 20 Jun 2016 17:45:33 +0000 (17:45 +0000)]
Use shouldAssumeDSOLocal.
With this ARM fast isel knows that PIE variable are not preemptable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273169
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 20 Jun 2016 17:33:43 +0000 (17:33 +0000)]
AMDGPU: Add support for R_AMDGPU_REL32 relocations
Reviewers: arsenm, kzhuravl, rafael
Subscribers: arsenm, llvm-commits, kzhuravl
Differential Revision: http://reviews.llvm.org/D21401
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273168
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 20 Jun 2016 17:00:13 +0000 (17:00 +0000)]
Simplify. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273167
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Mon, 20 Jun 2016 16:59:44 +0000 (16:59 +0000)]
AMDGPU: Emit R_AMDGPU_ABS32_{HI,LO} for scratch buffer relocations
Reviewers: arsenm, rafael, kzhuravl
Subscribers: rafael, arsenm, llvm-commits, kzhuravl
Differential Revision: http://reviews.llvm.org/D21400
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273166
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Mon, 20 Jun 2016 16:47:09 +0000 (16:47 +0000)]
[ARM] Enable isel of UMAAL
TargetLowering and DAGToDAG are used to combine ADDC, ADDE and UMLAL
dags into UMAAL. Selection is split into the two phases because it
is easier to match the two patterns at those different times.
Differential Revision: http://http://reviews.llvm.org/D21461
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273165
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 20 Jun 2016 16:43:17 +0000 (16:43 +0000)]
Add a isPositionIndependent predicate.
Reduces a bit of code duplication and clarify where we are interested
just on position independence and no the location of the symbol.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273164
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 20 Jun 2016 16:07:38 +0000 (16:07 +0000)]
Forgot to update callers of deleteDeadInstruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273163
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 20 Jun 2016 16:03:25 +0000 (16:03 +0000)]
Reapply "[LoopIdiom] Don't remove dead operands manually"
This reverts commit r273160, reapplying r273132.
RecursivelyDeleteTriviallyDeadInstructions cannot be called on a
parentless Instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273162
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Mon, 20 Jun 2016 15:37:15 +0000 (15:37 +0000)]
Removing an unused switch statement that has only a default label. This happens to also eliminate an instance of switchception. NFC intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273161
91177308-0d34-0410-b5e6-
96231b3b80d8
Cong Liu [Mon, 20 Jun 2016 15:22:15 +0000 (15:22 +0000)]
Revert "[LoopIdiom] Don't remove dead operands manually"
This reverts commit r273132.
Breaks multiple test under /llvm/test:Transforms (e.g.
llvm/test:Transforms/LoopIdiom/basic.ll.test) under asan.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273160
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 20 Jun 2016 12:51:55 +0000 (12:51 +0000)]
[X86][F16C] Added half <-> double conversion tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273153
91177308-0d34-0410-b5e6-
96231b3b80d8
Patrik Hagglund [Mon, 20 Jun 2016 11:19:58 +0000 (11:19 +0000)]
Fix formatting of r273144. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273149
91177308-0d34-0410-b5e6-
96231b3b80d8
Pankaj Gode [Mon, 20 Jun 2016 11:13:31 +0000 (11:13 +0000)]
[AARCH64] Add support for Broadcom Vulcan
Adding core tuning support for new Broadcom Vulcan core (ARMv8.1A).
Differential Revision: http://reviews.llvm.org/D21500
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273148
91177308-0d34-0410-b5e6-
96231b3b80d8
Patrik Hagglund [Mon, 20 Jun 2016 10:19:04 +0000 (10:19 +0000)]
Avoid output indeterminism between GCC and Clang builds.
Remove dependency of the evalution order of function arguments, which
is unspecified.
Patch by David Stenberg.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273145
91177308-0d34-0410-b5e6-
96231b3b80d8
Patrik Hagglund [Mon, 20 Jun 2016 10:19:00 +0000 (10:19 +0000)]
Avoid output indeterminism between GCC and Clang builds.
Remove dependency of the evalution order of function arguments, which
is unspecified.
The following test previously failed when built with GCC (but succeded
when built with Clang):
; RUN: opt -sroa -S < %s | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
%A = type {i16}
@a = global %A* null
@b = global i16 0
; CHECK-LABEL: @f1(
; CHECK: alloca %A
; CHECK-NEXT: extractvalue %A
; CHECK-NEXT: getelementptr inbounds %A
define void @f1 (%A %a) {
%1 = alloca %A
store %A %a, %A* %1
%2 = load i16, i16* @b
%3 = icmp ne i16 %2, 0
br i1 %3, label %bb1, label %bb2
bb1:
store %A* %1, %A** @a
br label %bb2
bb2:
ret void
}
Patch by David Stenberg.
Differential Revision: http://reviews.llvm.org/D21226
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273144
91177308-0d34-0410-b5e6-
96231b3b80d8
Patrik Hagglund [Mon, 20 Jun 2016 09:10:10 +0000 (09:10 +0000)]
Fix for PR27940
After a store has been eliminated, when making sure that the
instruction iterator points to a valid instruction, dbg intrinsics are
now ignored as a new instruction.
Patch by Henric Karlsson.
Reviewed by Daniel Berlin.
Differential Revision: http://reviews.llvm.org/D21076
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273141
91177308-0d34-0410-b5e6-
96231b3b80d8
Rui Ueyama [Mon, 20 Jun 2016 07:31:29 +0000 (07:31 +0000)]
[codeview] Add an extra check for TPI hash values.
This patch adds a function that corresponds to `fUDTAnon`
and use that to compute TPI hash values as the reference does.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273139
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Mon, 20 Jun 2016 07:05:43 +0000 (07:05 +0000)]
[AVX512] [AVX512/AVX][Intrinsics] Fix Variable Bit Shift Right Arithmetic intrinsic lowering.
Differential Revision: http://reviews.llvm.org/D20897
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273138
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 20 Jun 2016 04:00:55 +0000 (04:00 +0000)]
[X86] Pass the SDLoc and Mask ArrayRef down from lowerVectorShuffle through all of the other routines instead of recreating them in the handlers for each type. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273137
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 20 Jun 2016 04:00:53 +0000 (04:00 +0000)]
[X86] Use existing ArrayRef variable instead of calling SVOp->getMask() repeatedly. Remove nearby else after return as well. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273136
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 20 Jun 2016 04:00:50 +0000 (04:00 +0000)]
[X86] Avoid making a copy of a shuffle mask until we're sure we really need to. And just use a SmallVector to do the copy because its easy.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273135
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Friedman [Mon, 20 Jun 2016 02:48:11 +0000 (02:48 +0000)]
Fix dynamically linked debug builds.
On the surface, this might not look like it does anything... but
actually it brings in the declaration "extern template class
AnalysisManager<Loop>;", which suppresses the instantiation of the
constructor, which avoids the funny interaction between "extern
template" and -fvisibility-inlines-hidden.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273133
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 20 Jun 2016 02:33:29 +0000 (02:33 +0000)]
[LoopIdiom] Don't remove dead operands manually
Removing dead instructions requires remembering which operands have
already been removed. RecursivelyDeleteTriviallyDeadInstructions has
this logic, don't partially reimplement it in LoopIdiomRecognize.
This fixes PR28196.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273132
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 20 Jun 2016 01:05:15 +0000 (01:05 +0000)]
Reformat blank lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273131
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 20 Jun 2016 00:49:20 +0000 (00:49 +0000)]
Trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273130
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 20 Jun 2016 00:37:41 +0000 (00:37 +0000)]
Untabify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273129
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 19 Jun 2016 21:40:12 +0000 (21:40 +0000)]
[InstSimplify] add tests for PR27689; regenerate checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273128
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sun, 19 Jun 2016 21:36:35 +0000 (21:36 +0000)]
Address Eli's post-commit comments
Use an APInt to handle pointers of arbitrary width, let
accumulateConstantOffset handle overflow issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273126
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 19 Jun 2016 20:59:19 +0000 (20:59 +0000)]
[X86][AVX512] Added 512-bit BITREVERSE tests and enabled AVX512BW lowering support
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273125
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 19 Jun 2016 20:22:43 +0000 (20:22 +0000)]
Strip trailing whitespace. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273124
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 19 Jun 2016 18:20:44 +0000 (18:20 +0000)]
Fixed signed/unsigned warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273120
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 19 Jun 2016 18:03:52 +0000 (18:03 +0000)]
[X86][SSE] Allow target shuffle combining to match masks with SM_Sentinel values
We currently only allow exact matches of shuffle mask patterns during target shuffle combining.
This patch relaxes this to permit SM_SentinelUndef in the combined shuffle to always be accepted as well as allowing exact matching of the SM_SentinelZero value.
I've adjusted some tests that were requiring exact shuffle masks to now include undef values.
Differential Revision: http://reviews.llvm.org/D21495
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273119
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sun, 19 Jun 2016 17:20:27 +0000 (17:20 +0000)]
fix formatting, typo; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273118
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 19 Jun 2016 15:37:39 +0000 (15:37 +0000)]
[X86] Add an assert to ensure that a routine is only used with 128-bit vectors. Reduce SmallVector size accordingly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273117
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 19 Jun 2016 15:37:37 +0000 (15:37 +0000)]
[X86] Make is128BitLaneRepeatedShuffleMask correct the indices of the second vector for the smaller mask. This removes some custom correction code and can potentially provide other benefits in the future.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273116
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 19 Jun 2016 15:37:35 +0000 (15:37 +0000)]
[X86] Remove a dead path through one of the shuffle lowering routines. It's only called on single input shuffles masks already. Add an assert instead to verify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273115
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 19 Jun 2016 15:37:33 +0000 (15:37 +0000)]
[X86] Pre-allocate a SmallVector instead of using push_back in a loop. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273114
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 19 Jun 2016 15:37:30 +0000 (15:37 +0000)]
[X86] Use SmallVector::assign instead of resize to ensure we really start with a vector of all -1s. Otherwise we're trusting the caller to pass the right thing.
This should be no functional change with current code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273113
91177308-0d34-0410-b5e6-
96231b3b80d8
Vassil Vassilev [Sun, 19 Jun 2016 15:31:12 +0000 (15:31 +0000)]
Add the corresponding modulemap entry, following up r273066.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273112
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Dewhurst [Sun, 19 Jun 2016 12:56:42 +0000 (12:56 +0000)]
[SPARC] Additional condition required for DelaySlot fixing erratum in revision r273108.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273111
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Dewhurst [Sun, 19 Jun 2016 12:52:39 +0000 (12:52 +0000)]
[SPARC[ Correcting out-of-date unit tests checked in as part of r273108
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273110
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Sun, 19 Jun 2016 12:37:52 +0000 (12:37 +0000)]
Indent consistently.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273109
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Dewhurst [Sun, 19 Jun 2016 11:03:28 +0000 (11:03 +0000)]
[SPARC] Fixes for hardware errata on LEON processor.
Passes to fix three hardware errata that appear on some LEON processor variants.
The instructions FSMULD, FMULS and FDIVS do not work as expected on some LEON processors. This change allows those instructions to be substituted for alternatives instruction sequences that are known to work.
These passes only run when selected individually, or as part of a processor defintion. They are not included in general SPARC processor compilations for non-LEON processors or for those LEON processors that do not have these hardware errata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273108
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sun, 19 Jun 2016 06:14:56 +0000 (06:14 +0000)]
[LoadCombine] Combine Loads formed from GEPS with negative indexes
Change the underlying offset and comparisons to use int64_t instead of
uint64_t.
Patch by River Riddle!
Differential Revision: http://reviews.llvm.org/D21499
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273105
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Sat, 18 Jun 2016 23:25:37 +0000 (23:25 +0000)]
doesSetDirectiveSuppressesReloc -> doesSetDirectiveSuppressReloc, the
former is grammatically incorrect.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273100
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Sat, 18 Jun 2016 23:23:38 +0000 (23:23 +0000)]
If the revision number starts with r, drop it. It will get added back
later and we don't want to use it twice.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273099
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 18 Jun 2016 22:59:08 +0000 (22:59 +0000)]
[X86][AVX] Added test case for PR28136
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273098
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 18 Jun 2016 21:18:21 +0000 (21:18 +0000)]
[X86][SSSE3] Added examples of target shuffle combining failing to match undefs in shuffle masks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273097
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 18 Jun 2016 21:07:31 +0000 (21:07 +0000)]
[X86][XOP] Added fast-isel tests matching tools/clang/test/CodeGen/xop-builtins.c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273096
91177308-0d34-0410-b5e6-
96231b3b80d8
Zvi Rackover [Sat, 18 Jun 2016 19:13:38 +0000 (19:13 +0000)]
test commit: remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273094
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 18 Jun 2016 17:20:52 +0000 (17:20 +0000)]
[X86][TBM] Added fast-isel tests matching tools/clang/test/CodeGen/tbm-builtins.c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273087
91177308-0d34-0410-b5e6-
96231b3b80d8
Vasileios Kalintiris [Sat, 18 Jun 2016 15:39:43 +0000 (15:39 +0000)]
[mips] Emit a JALR with $rd equal to $zero, instead of a JR in MIPS32R6.
Summary:
JR is an alias of JALR with $rd=0 in the R6 ISA. Also, this fixes recursive
builds in MIPS32R6.
Reviewers: dsanders, sdardis
Subscribers: jfb, dschuff, dsanders, sdardis, llvm-commits
Differential Revision: http://reviews.llvm.org/D21370
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273085
91177308-0d34-0410-b5e6-
96231b3b80d8
Amjad Aboud [Sat, 18 Jun 2016 10:25:07 +0000 (10:25 +0000)]
[codeview] Emit non-virtual method type.
Differential Revision: http://reviews.llvm.org/D21011
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273084
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcin Koscielnicki [Sat, 18 Jun 2016 10:10:37 +0000 (10:10 +0000)]
[sanitizers] Disable target-specific lowering of string functions.
CodeGen has hooks that allow targets to emit specialized code instead
of calls to memcmp, memchr, strcpy, stpcpy, strcmp, strlen, strnlen.
When ASan/MSan/TSan/ESan is in use, this sidesteps its interceptors, resulting
in uninstrumented memory accesses. To avoid that, make these sanitizers
mark the calls as nobuiltin.
Differential Revision: http://reviews.llvm.org/D19781
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273083
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Sat, 18 Jun 2016 09:17:32 +0000 (09:17 +0000)]
Add a super basic LazyCallGraph DOT printer.
Access it through -passes=print-lcg-dot
Let me know any suggestions for changing the rendering; I'm not
particularly attached to what is implemented here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273082
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 18 Jun 2016 05:15:58 +0000 (05:15 +0000)]
Add looping testcase that broke in r272987
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273081
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 18 Jun 2016 05:15:53 +0000 (05:15 +0000)]
AMDGPU: Fix kernel argument alignment impacting stack size
Don't use AllocateStack because kernel arguments have nothing
to do with the stack. The ensureMaxAlignment call was still
changing the stack alignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273080
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Sat, 18 Jun 2016 04:38:31 +0000 (04:38 +0000)]
[SCEV] Fix incorrect trip count computation
The way we elide max expressions when computing trip counts is incorrect
-- it breaks cases like this:
```
static int wrapping_add(int a, int b) {
return (int)((unsigned)a + (unsigned)b);
}
void test() {
volatile int end_buf =
2147483548; // INT_MIN - 100
int end = end_buf;
unsigned counter = 0;
for (int start = wrapping_add(end, 200); start < end; start++)
counter++;
print(counter);
}
```
Note: the `NoWrap` variable that was being tested has little to do with
the values flowing into the max expression; it is a property of the
induction variable.
test/Transforms/LoopUnroll/nsw-tripcount.ll was added to solely test
functionality I'm reverting in this change, so I've deleted the test
fully.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273079
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 18 Jun 2016 02:38:26 +0000 (02:38 +0000)]
[X86][SSE4A] Autoupgrade and remove MOVNTSD/MOVNTSS intrinsics
Required better annotation of the instruction defs upon removal of the builtin intrinsic pattern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273077
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sat, 18 Jun 2016 00:24:49 +0000 (00:24 +0000)]
Add a test for r273022.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273073
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Sat, 18 Jun 2016 00:03:20 +0000 (00:03 +0000)]
[X86Subtarget] Use isPositionIndependent(). NFC.
Differential Revision: http://reviews.llvm.org/D21480
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273071
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 17 Jun 2016 23:36:38 +0000 (23:36 +0000)]
Revert "Revert "Revert "InstCombine: Reduce trunc (shl x, K) width."""
This seems to be causing an infinite loop / crash in instcombine
on some bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273069
91177308-0d34-0410-b5e6-
96231b3b80d8
Kyle Butt [Fri, 17 Jun 2016 22:40:19 +0000 (22:40 +0000)]
Codegen: [MBP] Add assert strings. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273067
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 17 Jun 2016 22:38:08 +0000 (22:38 +0000)]
Support/ELF: Add AMDGPU relocation definitions to match documentation
Reviewers: arsenm, kzhuravl, rafael
Subscribers: llvm-commits, kzhuravl
Differential Revision: http://reviews.llvm.org/D21443
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273066
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Fri, 17 Jun 2016 22:35:41 +0000 (22:35 +0000)]
[LAA] Enable symbolic stride speculation for all LAA clients
This is a functional change for LLE and LDist. The other clients (LV,
LVerLICM) already had this explicitly enabled.
The temporary boolean parameter to LAA is removed that allowed turning
off speculation of symbolic strides. This makes LAA's caching interface
LAA::getInfo only take the loop as the parameter. This makes the
interface more friendly to the new Pass Manager.
The flag -enable-mem-access-versioning is moved from LV to a LAA which
now allows turning off speculation globally.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273064
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 17 Jun 2016 22:27:03 +0000 (22:27 +0000)]
AMDGPU: Temporarily select trap to s_endpgm
This should select to s_trap, but that requires
additonal work to setup and enable the trap handler.
For now emit s_endpgm so bugpoint stops getting stuck
on the unsupported call to abort.
Emit a warning that this will only terminate the wave and
not really trap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273062
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 17 Jun 2016 22:26:56 +0000 (22:26 +0000)]
DiagnosticInfo: Allow unsupported be a warning
Some unsupported features can be ignored, so don't force
this to be a hard error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273061
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 17 Jun 2016 22:22:09 +0000 (22:22 +0000)]
AMDGPU/SI: Simplify code in SITargetLowering::LowerGlobalAddress()
This change were suggested in http://reviews.llvm.org/D21154.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273059
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Fri, 17 Jun 2016 22:16:06 +0000 (22:16 +0000)]
Add support for Darwin’s static library table of contents with 64-bit offsets to the archive members.
Darwin added support in its Xcode 8.0 tools (released in the beta) for static
library table of contents with 64-bit offsets to the archive members. The
change is very straight forward. The table of contents member is named
___.SYMDEF_64 or "___.SYMDEF_64 SORTED" and same layout is used but with
fields using 64 bit values instead of 32 bit values.
rdar://
26869808
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273058
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 17 Jun 2016 22:14:39 +0000 (22:14 +0000)]
[codeview] Emit incomplete member pointer types with the unknown model
An incomplete member pointer type will always have a size of zero, so we
don't need an extra flag. Credit to David Majnemer for the idea.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273057
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Fri, 17 Jun 2016 21:53:31 +0000 (21:53 +0000)]
[Coverage] Move logic to encode filenames and mappings into llvm (NFC)
Currently, frontends which emit source-based code coverage have to
duplicate logic to encode filenames and raw coverage mappings properly.
This violates an abstraction layer and forces frontends to copy tricky
code.
Introduce llvm::coverage::encodeFilenamesAndRawMappings() to take care
of this.
This will help us experiment with zlib-compressing coverage mapping
data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273055
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 17 Jun 2016 21:31:33 +0000 (21:31 +0000)]
[codeview] Add DIFlags for pointer to member representations
Summary:
This seems like the least intrusive way to pass this information
through.
Fixes PR28151
Reviewers: majnemer, aprantl, dblaikie
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D21444
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273053
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Fri, 17 Jun 2016 21:31:03 +0000 (21:31 +0000)]
[Coverage] Get rid of an input/output parameter (NFC)
readFunctionRecords is used to iterate through the entries of the
coverage mapping section. Instead of expecting the function to update
the iterator through a `const char *&` parameter, just return the
updated iterator.
This will help us experiment with zlib-compressing coverage mapping
data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273052
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 17 Jun 2016 21:18:41 +0000 (21:18 +0000)]
AMDGPU: Remove llvm.SI.tid intrinsic
Mesa doesn't emit this for llvm >= 3.8 anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273050
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 17 Jun 2016 20:41:14 +0000 (20:41 +0000)]
Apply another batch of fixes from clang-tidy's performance-unnecessary-value-param.
Contains some manual fixes. No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273047
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 17 Jun 2016 20:38:01 +0000 (20:38 +0000)]
[pdb] Don't error on missing FPO streams
64-bit PDBs never have FPO data. They have xdata instead.
Also improve error recovery of stream summary dumping while I'm here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273046
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 17 Jun 2016 20:33:53 +0000 (20:33 +0000)]
Revert "Revert "InstCombine: Reduce trunc (shl x, K) width.""
Reapply r272987. Condition should be in terms of the destination type,
and the flags should not be copied.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273045
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcin Koscielnicki [Fri, 17 Jun 2016 20:24:07 +0000 (20:24 +0000)]
[SelectionDAG] Don't treat library calls specially if marked with nobuiltin.
To be used by D19781.
Differential Revision: http://reviews.llvm.org/D19801
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273039
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Kuperstein [Fri, 17 Jun 2016 20:21:17 +0000 (20:21 +0000)]
[X86] Add missing AVX512 anyext patterns.
Add AVX512 anyext patterns for i16 and i64, modeled on the existing i8 and
i32 patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273038
91177308-0d34-0410-b5e6-
96231b3b80d8
Adrian McCarthy [Fri, 17 Jun 2016 19:45:59 +0000 (19:45 +0000)]
Revert "Properly handle short file names on the command line in Windows"
This reverts commit
3e5651782cfc985fca9d94595cad63059e587e2f.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273033
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Fri, 17 Jun 2016 19:10:09 +0000 (19:10 +0000)]
[PM] Port MergedLoadStoreMotion to the new pass manager, take two.
This is indeed a much cleaner approach (thanks to Daniel Berlin
for pointing out), and also David/Sean for review.
Differential Revision: http://reviews.llvm.org/D21454
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273032
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 17 Jun 2016 18:59:41 +0000 (18:59 +0000)]
Avoid duplicated map lookups. No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273030
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Fri, 17 Jun 2016 18:40:46 +0000 (18:40 +0000)]
ARM: take account of possible bundle when erasing an instruction.
Fortunately this appears to be the only ARM-specific pass that runs while
bundles might be in play, so no other cases need modifying.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273029
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Fri, 17 Jun 2016 18:20:14 +0000 (18:20 +0000)]
[IRObjectFile] Handle .weak in RecordStreamer.
Differential Revision: http://reviews.llvm.org/D21476
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273027
91177308-0d34-0410-b5e6-
96231b3b80d8
James Y Knight [Fri, 17 Jun 2016 18:11:48 +0000 (18:11 +0000)]
Support expanding partial-word cmpxchg to full-word cmpxchg in AtomicExpandPass.
Many CPUs only have the ability to do a 4-byte cmpxchg (or ll/sc), not 1
or 2-byte. For those, you need to mask and shift the 1 or 2 byte values
appropriately to use the 4-byte instruction.
This change adds support for cmpxchg-based instruction sets (only SPARC,
in LLVM). The support can be extended for LL/SC-based PPC and MIPS in
the future, supplanting the ISel expansions those architectures
currently use.
Tests added for the IR transform and SPARCv9.
Differential Revision: http://reviews.llvm.org/D21029
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273025
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Fri, 17 Jun 2016 18:07:14 +0000 (18:07 +0000)]
[Codegen] Change PICLevel.
We convert `Default` to `NotPIC` so that target independent code
can reason about this correctly.
Differential Revision: http://reviews.llvm.org/D21394
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273024
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Fri, 17 Jun 2016 17:59:48 +0000 (17:59 +0000)]
LoopSimplifyCFG: Prefer `const auto &` to `auto &`, for clarity. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273023
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 17 Jun 2016 17:53:57 +0000 (17:53 +0000)]
Don't use the new x86 relax relocations on the gold plugin.
Should bring back the bots with old versions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273022
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 17 Jun 2016 17:43:41 +0000 (17:43 +0000)]
Change RelaxELFRelocations for llc.
As a developer tool it makes sense for it to use the new relocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273019
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 17 Jun 2016 17:26:07 +0000 (17:26 +0000)]
Change RelaxELFRelocations' default.
NFC to the existing clients since they all set it already.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273017
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 17 Jun 2016 17:04:56 +0000 (17:04 +0000)]
Change the default of -relax-relocations.
llvm-mc is a developer tool, as such it make sense for it to use new
features by default.
This doesn't change the user facing clang, which still defaults to non
relaxable relocations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273014
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Fri, 17 Jun 2016 16:46:50 +0000 (16:46 +0000)]
[InstCombine] allow more than one use for vector bitcast folding with selects
The motivating example for this transform is similar to D20774 where bitcasts interfere
with a single cmp/select sequence, but in this case we have 2 uses of each bitcast to
produce min and max ops:
define void @minmax_bc_store(<4 x float> %a, <4 x float> %b, <4 x float>* %ptr1, <4 x float>* %ptr2) {
%cmp = fcmp olt <4 x float> %a, %b
%bc1 = bitcast <4 x float> %a to <4 x i32>
%bc2 = bitcast <4 x float> %b to <4 x i32>
%sel1 = select <4 x i1> %cmp, <4 x i32> %bc1, <4 x i32> %bc2
%sel2 = select <4 x i1> %cmp, <4 x i32> %bc2, <4 x i32> %bc1
%bc3 = bitcast <4 x float>* %ptr1 to <4 x i32>*
store <4 x i32> %sel1, <4 x i32>* %bc3
%bc4 = bitcast <4 x float>* %ptr2 to <4 x i32>*
store <4 x i32> %sel2, <4 x i32>* %bc4
ret void
}
With this patch, we move the selects up to use the input args which allows getting rid of
all of the bitcasts:
define void @minmax_bc_store(<4 x float> %a, <4 x float> %b, <4 x float>* %ptr1, <4 x float>* %ptr2) {
%cmp = fcmp olt <4 x float> %a, %b
%sel1.v = select <4 x i1> %cmp, <4 x float> %a, <4 x float> %b
%sel2.v = select <4 x i1> %cmp, <4 x float> %b, <4 x float> %a
store <4 x float> %sel1.v, <4 x float>* %ptr1, align 16
store <4 x float> %sel2.v, <4 x float>* %ptr2, align 16
ret void
}
The asm for x86 SSE then improves from:
movaps %xmm0, %xmm2
cmpltps %xmm1, %xmm2
movaps %xmm2, %xmm3
andnps %xmm1, %xmm3
movaps %xmm2, %xmm4
andnps %xmm0, %xmm4
andps %xmm2, %xmm0
orps %xmm3, %xmm0
andps %xmm1, %xmm2
orps %xmm4, %xmm2
movaps %xmm0, (%rdi)
movaps %xmm2, (%rsi)
To:
movaps %xmm0, %xmm2
minps %xmm1, %xmm2
maxps %xmm0, %xmm1
movaps %xmm2, (%rdi)
movaps %xmm1, (%rsi)
The TODO comments show that we're limiting this transform only to vectors and only to bitcasts
because we need to improve other transforms or risk creating worse codegen.
Differential Revision: http://reviews.llvm.org/D21190
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273011
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 17 Jun 2016 16:13:21 +0000 (16:13 +0000)]
[CodeView] Refactor enumerator emission
This addresses Amjad's review comments on D21442.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273010
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Fri, 17 Jun 2016 16:11:20 +0000 (16:11 +0000)]
[codeview] Make function names more consistent with MSVC
Names in function id records don't include nested name specifiers or
template arguments, but names in the symbol stream include both.
For the symbol stream, instead of having Clang put the fully qualified
name in the subprogram display name, recreate it from the subprogram
scope chain. For the type stream, take the unqualified name and chop of
any template arguments.
This makes it so that CodeView DI metadata is more similar to DWARF DI
metadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273009
91177308-0d34-0410-b5e6-
96231b3b80d8
Nirav Dave [Fri, 17 Jun 2016 16:06:17 +0000 (16:06 +0000)]
Refactor and cleanup Assembly Parsing / Lexing
Recommiting after fixing non-atomic insert to front of SmallVector in
MCAsmLexer.h
Add explicit Comment Token in Assembly Lexing for future support for
outputting explicit comments from inline assembly. As part of this,
CPPHash Directives are now explicitly distinguished from Hash line
comments in Lexer.
Line comments are recorded as EndOfStatement tokens, not Comment tokens
to simplify compatibility with current TargetParsers. This slightly
complicates comment output.
This remove all lexing tasks out of the parser, does minor cleanup
to remove extraneous newlines Asm Output, and some improvements white
space handling.
Reviewers: rtrieu, dwmw2, rnk
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D20009
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273007
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Laevsky [Fri, 17 Jun 2016 15:19:41 +0000 (15:19 +0000)]
[MCContext] Don't use getenv inside class constructor
Differential Revision: http://reviews.llvm.org/D21471
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273005
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Fri, 17 Jun 2016 14:27:38 +0000 (14:27 +0000)]
[X86][SSE4A] Remove the GCCBuiltins from the movntsd/movntss intrinsic defs so we can emit native IR from clang.
Clang-side sibling commit to follow.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273002
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 17 Jun 2016 14:14:29 +0000 (14:14 +0000)]
[ARM] Strength reduce vectors to arrays.
No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273001
91177308-0d34-0410-b5e6-
96231b3b80d8