OSDN Git Service
Peter Collingbourne [Wed, 3 Feb 2016 02:51:00 +0000 (02:51 +0000)]
Transforms: Move GlobalOpt's Evaluator to Utils where it can be reused.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259621
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Wed, 3 Feb 2016 02:15:49 +0000 (02:15 +0000)]
Fix typo in comment. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259620
91177308-0d34-0410-b5e6-
96231b3b80d8
Peter Collingbourne [Wed, 3 Feb 2016 02:01:08 +0000 (02:01 +0000)]
docs: Document how bitsets may be used to encode type information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259619
91177308-0d34-0410-b5e6-
96231b3b80d8
Kyle Butt [Wed, 3 Feb 2016 01:41:09 +0000 (01:41 +0000)]
Codegen: [PPC] Fix PPCVSXFMAMutate to handle duplicates.
The purpose of PPCVSXFMAMutate is to elide copies by changing FMA forms
on PPC.
%vreg6<def> = COPY %vreg96
%vreg6<def,tied1> = XSMADDASP %vreg6<tied0>, %vreg5<kill>, %vreg7
;v6 = v6 + v5 * v7
is replaced by
%vreg5<def,tied1> = XSMADDMSP %vreg5<tied0>, %vreg7, %vreg96
;v5 = v5 * v7 + v96
This was broken in the case where the target register was also used as a
multiplicand. Fix this case by checking for it and replacing both uses
with the copied register.
%vreg6<def> = COPY %vreg96
%vreg6<def,tied1> = XSMADDASP %vreg6<tied0>, %vreg5<kill>, %vreg6
;v6 = v6 + v5 * v6
is replaced by
%vreg5<def,tied1> = XSMADDMSP %vreg5<tied0>, %vreg96, %vreg96
;v5 = v5 * v96 + v96
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259617
91177308-0d34-0410-b5e6-
96231b3b80d8
Yunzhong Gao [Wed, 3 Feb 2016 01:25:12 +0000 (01:25 +0000)]
Revert r259576: Disable the vzeroupper insertion pass on PS4.
Will re-implement based on review feedback.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259615
91177308-0d34-0410-b5e6-
96231b3b80d8
Marcello Maggioni [Wed, 3 Feb 2016 00:22:32 +0000 (00:22 +0000)]
RegCoalescer: Making sure re-materialization defines all subranges
The register coalescer can rematerialize constants that define
more of a register than the copy it is going to replace was going
to do.
This is valid in the case the register was undef before the
copy happened.
This patch makes sure that all the subranges defined by the new
rematerialization instructions have at least a dead def.
Review: http://reviews.llvm.org/D16693
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259614
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 3 Feb 2016 00:09:22 +0000 (00:09 +0000)]
DiagnosticInfoWithDebugLocBase: Appease Twine for now.
FIXME: We should get rid of Twine in the record.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259612
91177308-0d34-0410-b5e6-
96231b3b80d8
Adam Nemet [Wed, 3 Feb 2016 00:06:10 +0000 (00:06 +0000)]
[LoopVersioning] Expose loop versioning as a pass too
Summary:
LoopVersioning is a transform utility that transform passes can use to
run-time disambiguate may-aliasing accesses. I'd like to also expose as
pass to allow it to be unit-tested.
I am planning to add support for non-aliasing annotation in
LoopVersioning and I'd like to be able to write tests directly using
this pass.
(After that feature is done, the pass could also be used to look for
optimization opportunities that are hidden behind incomplete alias
information at compile time.)
The pass drives LoopVersioning in its default way which is to fully
disambiguate may-aliasing accesses no matter how many checks are
required.
Reviewers: hfinkel, ashutosh.nema, sbaranga
Subscribers: zzheng, mssimpso, llvm-commits, sanjoy
Differential Revision: http://reviews.llvm.org/D16612
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259610
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Tue, 2 Feb 2016 23:26:01 +0000 (23:26 +0000)]
Attempt #2 to unbreak r259595.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259602
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 2 Feb 2016 23:18:23 +0000 (23:18 +0000)]
[codeview] Improve readability of codeview assembly output
Strictly speaking, this is not an improvement in functionality per se
but a usability improvement to those debugging codeview.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259601
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 2 Feb 2016 23:17:45 +0000 (23:17 +0000)]
[libFuzzer] don't create too many trace-based mutations as it may be too slow
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259600
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Tue, 2 Feb 2016 23:15:26 +0000 (23:15 +0000)]
Attempt to fix builds broken by r259595.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259599
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Tue, 2 Feb 2016 22:46:49 +0000 (22:46 +0000)]
This patch adds MemorySSA to LLVM.
Please see include/llvm/Transforms/Utils/MemorySSA.h for a description
of MemorySSA, and what it does.
Differential Revision: http://reviews.llvm.org/D7864
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259595
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Tue, 2 Feb 2016 22:43:08 +0000 (22:43 +0000)]
[LVI] Fix debug output
Due to staleness in a patch I committed yesterday, the debug output was reporting overdefined cases as being undefined. Confusing to say the least. The mistake appears to have only effected the debug output thankfully.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259594
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Tue, 2 Feb 2016 22:05:07 +0000 (22:05 +0000)]
[asan] Add iOS support to AddressSanitzier
Differential Revision: http://reviews.llvm.org/D15625
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259586
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Tue, 2 Feb 2016 22:03:19 +0000 (22:03 +0000)]
[LVI] Code motion only [NFC]
I introduced a declaration in 259583 to keep the diff readable. This change just moves the definition up to remove the declaration again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259585
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Tue, 2 Feb 2016 21:57:37 +0000 (21:57 +0000)]
[LVI] Refactor to use newly introduced intersect utility
This patch uses the newly introduced 'intersect' utility (from 259461: [LVI] Introduce an intersect operation on lattice values) to simplify existing code in LVI.
While not introducing any new concepts, this change is probably not NFC. The common 'intersect' function is more powerful that the ad-hoc implementations we'd had in a couple of places. Given that, we may see optimizations triggering a bit more often.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259583
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Tue, 2 Feb 2016 21:56:16 +0000 (21:56 +0000)]
Remove utils/buildit
The autoconf build system was removed - this doesn't even work and
doesn't need to be here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259582
91177308-0d34-0410-b5e6-
96231b3b80d8
Hemant Kulkarni [Tue, 2 Feb 2016 21:41:49 +0000 (21:41 +0000)]
Correct size calculations for ELF files
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259578
91177308-0d34-0410-b5e6-
96231b3b80d8
Yunzhong Gao [Tue, 2 Feb 2016 21:39:23 +0000 (21:39 +0000)]
Disable the vzeroupper insertion pass on PS4.
See comments in test/CodeGen/X86/avx-vzeroupper.ll for more explanation.
Original patch by: Sean Silva
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259576
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 2 Feb 2016 21:38:30 +0000 (21:38 +0000)]
[Orc] Stub addresses should be based on stub size, not pointer size.
This didn't affect X86_64, which is the only client of this code at the moment,
as stubs and pointers are both 8-bytes there. It will affect other platforms
though.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259575
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 2 Feb 2016 21:16:12 +0000 (21:16 +0000)]
AMDGPU: Do not promote allocas with non-inbounds GEPs
If we can't assume the pointer value isn't within the bounds
of the object, it seems risky to try to replace the pointer
calculations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259573
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 2 Feb 2016 20:28:10 +0000 (20:28 +0000)]
AMDGPU: Handle promoting memmove
Also add missing tests for the others.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259558
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Tue, 2 Feb 2016 20:11:17 +0000 (20:11 +0000)]
[X86] Fix the merging of SP updates in prologue/epilogue insertions.
When the merging was involving LEAs, we were taking the wrong immediate
from the list of operands.
rdar://problem/
24446069
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259553
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Tue, 2 Feb 2016 20:04:51 +0000 (20:04 +0000)]
MachineVerifier: Check that defs/uses are live in subregisters as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259552
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 2 Feb 2016 19:32:42 +0000 (19:32 +0000)]
AMDGPU: Skip promote alloca with no optimizations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259551
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 2 Feb 2016 19:32:35 +0000 (19:32 +0000)]
AMDGPU: Minor cleanups for AMDGPUPromoteAlloca
Mostly convert to use range loops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259550
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Tue, 2 Feb 2016 19:31:15 +0000 (19:31 +0000)]
[Orc] Turn OrcX86_64::IndirectStubsInfo into a template helper class:
GenericIndirectStubsInfo.
This will allow architecture support classes for other architectures to re-use
this code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259549
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 2 Feb 2016 19:22:34 +0000 (19:22 +0000)]
[codeview] Correctly handle inlining functions post-dominated by unreachable
CodeView requires us to accurately describe the extent of the inlined
code. We did this by grabbing the next debug location in source order
and using *that* to denote where we stopped inlining. However, this is
not sufficient or correct in instances where there is no next debug
location or the next debug location belongs to the start of another
function.
To get this correct, use the end symbol of the function to denote the
last possible place the inlining could have stopped at.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259548
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 2 Feb 2016 19:18:57 +0000 (19:18 +0000)]
AMDGPU: Report AMDGPUPromoteAlloca changed the function
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259547
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 2 Feb 2016 19:18:53 +0000 (19:18 +0000)]
AMDGPU: Whitelist handled intrinsics
We shouldn't crash on unhandled intrinsics.
Also simplify failure handling in loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259546
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Tue, 2 Feb 2016 19:18:48 +0000 (19:18 +0000)]
AMDGPU: Use inbounds when calculating workitem offset
When promoting allocas to LDS, we know we are indexing
into a specific area just created, and the calculation
will also never overflow.
Also emit some of the muls as nsw nuw, because instcombine
infers this already from the range metadata. I think
putting this on the other adds and muls might be OK too,
but I'm not 100% sure.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259545
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Zelenko [Tue, 2 Feb 2016 18:20:45 +0000 (18:20 +0000)]
Fix Clang-tidy readability-redundant-control-flow warnings; other minor fixes.
Differential revision: http://reviews.llvm.org/D16793
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259539
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Tue, 2 Feb 2016 17:41:18 +0000 (17:41 +0000)]
[codeview] Wire up the .cv_inline_linetable directive
This directive emits the binary annotations that describe line and code
deltas in inlined call sites. Single-stepping through inlined frames in
windbg now works.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259535
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Schuff [Tue, 2 Feb 2016 17:20:04 +0000 (17:20 +0000)]
[MC] Enable eip-relative addressing on x86-64 for X32 ABI
Summary:
Enables eip-based addressing, e.g.,
lea constant(%eip), %rax
lea constant(%eip), %eax
in MC, (used for the x32 ABI). EIP-base addressing is also valid in x86_64,
it is left enabled for that architecture as well.
Patch by João Porto
Differential Revision: http://reviews.llvm.org/D16581
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259528
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 2 Feb 2016 15:22:55 +0000 (15:22 +0000)]
[AArch64] Add a FIXME comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259515
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 2 Feb 2016 15:02:30 +0000 (15:02 +0000)]
[AArch64] Allocate the modified and used regs only once per function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259510
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Tue, 2 Feb 2016 14:27:34 +0000 (14:27 +0000)]
WebAssembly: update expected GCC torture test failures
The 3 programs used __attribute__((mode(?))) on enum, which clang r259497 fixed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259508
91177308-0d34-0410-b5e6-
96231b3b80d8
Oliver Stannard [Tue, 2 Feb 2016 13:52:43 +0000 (13:52 +0000)]
Refactor backend diagnostics for unsupported features
Re-commit of r258951 after fixing layering violation.
The BPF and WebAssembly backends had identical code for emitting errors
for unsupported features, and AMDGPU had very similar code. This merges
them all into one DiagnosticInfo subclass, that can be used by any
backend.
There should be minimal functional changes here, but some AMDGPU tests
have been updated for the new format of errors (it used a slightly
different format to BPF and WebAssembly). The AMDGPU error messages will
now benefit from having precise source locations when debug info is
available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259498
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 2 Feb 2016 13:32:56 +0000 (13:32 +0000)]
[X86][AVX512] Add support for AVX512 VMOVQ (load) shuffle decoding
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259496
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Tue, 2 Feb 2016 09:30:01 +0000 (09:30 +0000)]
WebAssembly: add option to disable register coloring
Having this hidden option makes it easier to debug other issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259482
91177308-0d34-0410-b5e6-
96231b3b80d8
Sjoerd Meijer [Tue, 2 Feb 2016 09:28:20 +0000 (09:28 +0000)]
Removed FeatureVFPOnlySP from the Cortex-R7 processor model
description and changed the regression test accordingly.
The default configuration of a Cortex-R7 is to implement the
VFPv3-D16 architecture and the feature line as it was is too
restrictive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259480
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Tue, 2 Feb 2016 06:41:55 +0000 (06:41 +0000)]
[RegisterCoalescer] Better DebugLoc for reMaterializeTrivialDef
When rematerializing a computation by replacing the copy, use the copy's
location. The location of the copy is more representative of the
original program.
This partially fixes PR10003.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259469
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 2 Feb 2016 03:57:13 +0000 (03:57 +0000)]
[LCG] Build an edge abstraction for the LazyCallGraph and use it to
differentiate between indirect references to functions an direct calls.
This doesn't do a whole lot yet other than change the print out produced
by the analysis, but it lays the groundwork for a very major change I'm
working on next: teaching the call graph to actually be a call graph,
modeling *both* the indirect reference graph and the call graph
simultaneously. More details on that in the next patch though.
The rest of this is essentially a bunch of over-engineering that won't
be interesting until the next patch. But this also isolates essentially
all of the churn necessary to introduce the edge abstraction from the
very important behavior change necessary in order to separately model
the two graphs. So it should make review of the subsequent patch a bit
easier at the cost of making this patch seem poorly motivated. ;]
Differential Revision: http://reviews.llvm.org/D16038
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259463
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Tue, 2 Feb 2016 03:15:40 +0000 (03:15 +0000)]
[LVI] Introduce an intersect operation on lattice values
LVI has several separate sources of facts - edge local conditions, recursive queries, assumes, and control independent value facts - which all apply to the same value at the same location. The existing implementation was very conservative about exploiting all of these facts at once.
This change introduces an "intersect" function specifically to abstract the action of picking a good set of facts from all of the separate facts given. At the moment, this function is relatively simple (i.e. mostly just reuses the bits which were already there), but even the minor additions reveal the inherent power. For example, JumpThreading is now capable of doing an inductive proof that a particular value is always positive and removing a half range check.
I'm currently only using the new intersect function in one place. If folks are happy with the direction of the work, I plan on making a series of small changes without review to replace mergeIn with intersect at all the appropriate places.
Differential Revision: http://reviews.llvm.org/D14476
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259461
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 2 Feb 2016 03:03:47 +0000 (03:03 +0000)]
[libFuzzer] allow passing 1 or more files as individual inputs
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259459
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Tue, 2 Feb 2016 02:44:25 +0000 (02:44 +0000)]
MachineVerifier: Use report_context() instead of ad-hoc messages.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259457
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Tue, 2 Feb 2016 02:32:43 +0000 (02:32 +0000)]
[X86] Fix a bug in getMemOpBaseRegImmOfs
Fix a crash in `getMemOpBaseRegImmOfs` that happens if the base of
`MemOp` is a frame index memory operand. The fix is to have
`getMemOpBaseRegImmOfs` bail out in such cases. We can possibly be more
clever here, if needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259456
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Tue, 2 Feb 2016 02:07:26 +0000 (02:07 +0000)]
[libFuzzer] fail if the corpus dir does not exist
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259454
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Tue, 2 Feb 2016 01:44:03 +0000 (01:44 +0000)]
[X86][FastISel] Don't force Nearest-Even rounding for VCVTPS2PH, use MXCSR.
FastISel counterpart to r259448.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259449
91177308-0d34-0410-b5e6-
96231b3b80d8
Ahmed Bougacha [Tue, 2 Feb 2016 01:32:50 +0000 (01:32 +0000)]
[X86] Don't force Nearest-Even rounding for VCVTPS2PH, use MXCSR.
Officially, we don't acknowledge non-default configurations of MXCSR,
as getting there would require usage of the FENV_ACCESS pragma (at
least insofar as rounding mode is concerned).
We don't support the pragma, so we can assume that the default
rounding mode - round to nearest, ties to even - is always used.
However, it's inconsistent with the rest of the instruction set,
where MXCSR is always effective (unless otherwise specified).
Also, it's an unnecessary obstacle to the few brave souls that use
fenv.h with LLVM.
Avoid the hard-coded rounding mode for fp_to_f16; use MXCSR instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259448
91177308-0d34-0410-b5e6-
96231b3b80d8
Anna Zaks [Tue, 2 Feb 2016 01:03:11 +0000 (01:03 +0000)]
[safestack] Make sure the unsafe stack pointer is popped in all cases
The unsafe stack pointer is only popped in moveStaticAllocasToUnsafeStack so it won't happen if there are no static allocas.
Fixes https://llvm.org/bugs/show_bug.cgi?id=26122
Differential Revision: http://reviews.llvm.org/D16339
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259447
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Tue, 2 Feb 2016 00:45:30 +0000 (00:45 +0000)]
[LVI] Fix a latent bug in getValueAt
This routine was returning Undefined for most queries. This was utterly wrong. Amusingly, we do not appear to have any callers of this which are actually trying to exploit unreachable code or this would have broken the world.
A better approach would be to explicit describe the intersection of facts. That's blocked behind http://reviews.llvm.org/D14476 and I wanted to fix the current bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259446
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 1 Feb 2016 23:53:35 +0000 (23:53 +0000)]
fix typos; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259438
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Mon, 1 Feb 2016 23:44:38 +0000 (23:44 +0000)]
[LVI] Missing test case from 259432
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259437
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Mon, 1 Feb 2016 23:26:30 +0000 (23:26 +0000)]
Add test for PR26419 (stable function summary ordering)
Enhance an existing test to also check that the ordering of the function
summary entries is stable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259434
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Mon, 1 Feb 2016 23:21:11 +0000 (23:21 +0000)]
[LVI] Remove overly tight assert from 259429
I'll submit a test case shortly which covers this, but it's causing clang self host problems in the builders so I wanted to get it removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259432
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 1 Feb 2016 23:04:05 +0000 (23:04 +0000)]
[X86][AVX512] Add support for AVX512 VMOVD (load) shuffle decoding
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259430
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Mon, 1 Feb 2016 22:57:53 +0000 (22:57 +0000)]
[LVI] Add select handling
Teach LVI to handle select instructions in the exact same way it handles PHI nodes. This is useful since various parts of the optimizer convert PHI nodes into selects and we don't want these transformations to cause inferior optimization.
Note that this patch does nothing to exploit the implied constraint on the inputs represented by the select condition itself. That will be a later patch and is blocked on http://reviews.llvm.org/D14476
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259429
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 1 Feb 2016 22:26:28 +0000 (22:26 +0000)]
[X86][AVX512] Add support for AVX512 VMOVSD/VMOVSS shuffle decoding
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259427
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 1 Feb 2016 22:23:39 +0000 (22:23 +0000)]
function names start with a lowercase letter; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259425
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 1 Feb 2016 22:10:26 +0000 (22:10 +0000)]
[InstCombine] simplify masked scatter/gather intrinsics with zero masks
A masked scatter with a zero mask means there's no store.
A masked gather with a zero mask means the passthru arg is returned.
This is a continuation of:
http://reviews.llvm.org/rL259369
http://reviews.llvm.org/rL259392
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259421
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 1 Feb 2016 22:05:50 +0000 (22:05 +0000)]
[X86][AVX512] Add support for AVX512 VINSERTPS shuffle decoding
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259420
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Mon, 1 Feb 2016 22:05:16 +0000 (22:05 +0000)]
SmallSet/SmallPtrSet: Refuse huge Small numbers
These sets do linear searching in small mode; It is not a good idea to
use huge numbers as the small value here, save people from themselves by
adding a static_assert.
Differential Revision: http://reviews.llvm.org/D16706
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259419
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 1 Feb 2016 21:46:12 +0000 (21:46 +0000)]
[X86][SSE] Regenerated load vector + element extraction tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259416
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 1 Feb 2016 21:38:31 +0000 (21:38 +0000)]
Move comments a bit closer to associated code. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259411
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 1 Feb 2016 21:30:50 +0000 (21:30 +0000)]
[X86][SSE] Add AVX512 merge consecutive load tests
Add AVX512F/AVX512BW 512-bit tests.
Add AVX512F tests to existing 128/256-bit tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259410
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 1 Feb 2016 21:06:32 +0000 (21:06 +0000)]
Regenerate vector blend tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259406
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 1 Feb 2016 21:01:29 +0000 (21:01 +0000)]
Regenerate vector sext/zext constant folding tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259405
91177308-0d34-0410-b5e6-
96231b3b80d8
Jun Bum Lim [Mon, 1 Feb 2016 20:55:11 +0000 (20:55 +0000)]
Avoid inlining call sites in unreachable-terminated block
Summary:
If the normal destination of the invoke or the parent block of the call site is unreachable-terminated, there is little point in inlining the call site unless there is literally zero cost. Unlike my previous change (D15289), this change specifically handle the call sites followed by unreachable in the same basic block for call or in the normal destination for the invoke. This change could be a reasonable first step to conservatively inline call sites leading to an unreachable-terminated block while BFI / BPI is not yet available in inliner.
Reviewers: manmanren, majnemer, hfinkel, davidxl, mcrosier, dblaikie, eraman
Subscribers: dblaikie, davidxl, mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D16616
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259403
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 1 Feb 2016 20:54:36 +0000 (20:54 +0000)]
Remove extra semicolon. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259402
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Mon, 1 Feb 2016 20:48:14 +0000 (20:48 +0000)]
[SCEV] Clean up isKnownPredicateViaConstantRanges; NFCI
- ScalarEvolution::isKnownPredicateViaConstantRanges duplicates some
logic already present in ConstantRange, use ConstantRange for those
bits.
- In some cases ScalarEvolution::isKnownPredicateViaConstantRanges
returns `false` to mean "definitely false" (e.g. see the
`LHSRange.getSignedMin().sge(RHSRange.getSignedMax())` case for
`ICmpInst::ICMP_SLT`), but for `isKnownPredicateViaConstantRanges`,
`false` actually means "don't know". Get rid of this extra bit of
code to avoid confusion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259401
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Mon, 1 Feb 2016 20:48:10 +0000 (20:48 +0000)]
[SCEV] Rename isKnownPredicateWithRanges; NFC
Make it obvious that it uses constant ranges, and use `Via` instead of
`With`, like other similar functions in SCEV.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259400
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 1 Feb 2016 20:36:49 +0000 (20:36 +0000)]
Fix infinite recursion in MCAsmStreamer::EmitValueImpl.
If a target can only emit 8-bits data, we would loop in EmitValueImpl
since it will try to split a 32-bits data in 1 chunk of 32-bits.
No test since all current targets can emit 32bits at a time.
Patch by Alexandru Guduleasa!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259399
91177308-0d34-0410-b5e6-
96231b3b80d8
Teresa Johnson [Mon, 1 Feb 2016 20:16:35 +0000 (20:16 +0000)]
[ThinLTO] Ensure function summary output order is stable
Iterate over the function list instead of a DenseMap of Function pointers
when emitting the function summary into the module.
This fixes PR26419.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259398
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 1 Feb 2016 19:56:12 +0000 (19:56 +0000)]
Add a test for r258362.
Thanks to Mehdi for finding it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259394
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 1 Feb 2016 19:39:52 +0000 (19:39 +0000)]
[InstCombine] simplify masked store intrinsics with all ones or zeros masks
A masked store with a zero mask means there's no store.
A masked store with an allOnes mask means it's a normal vector store.
This is a continuation of:
http://reviews.llvm.org/rL259369
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259392
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Mon, 1 Feb 2016 19:22:16 +0000 (19:22 +0000)]
[llvm-nm] Simplify the code a bit. NFCI.
Fix a style violation while I'm here.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259391
91177308-0d34-0410-b5e6-
96231b3b80d8
Balaram Makam [Mon, 1 Feb 2016 19:13:07 +0000 (19:13 +0000)]
AArch64: Implement missed conditional compare sequences.
Summary:
This is an extension to the existing implementation of r242436 which
restricts to only select inputs. This version fixes missed opportunities
in pr26084 by attempting to lower conditional compare sequences of
and/or trees with setcc leafs. This will additionaly handle the case
when a tree with select input is not a conjunction-disjunction tree
but some of the sub trees are conjunction-disjunction trees.
Reviewers: jmolloy, t.p.northover, mcrosier, MatzeB
Subscribers: mcrosier, llvm-commits, junbuml, haicheng, mssimpso, gberry
Differential Revision: http://reviews.llvm.org/D16291
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259387
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthew Simpson [Mon, 1 Feb 2016 19:09:24 +0000 (19:09 +0000)]
Add test case missing from r259357 (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259385
91177308-0d34-0410-b5e6-
96231b3b80d8
Geoff Berry [Mon, 1 Feb 2016 19:07:06 +0000 (19:07 +0000)]
[AArch64] Simplify prolog/epilog callee save/restore. NFC.
Summary:
Factor out common code for callee-save register pair calculation. This
is intended to simplify follow-on changes that reduce the number of
registers saved/restored.
Depends on D16732
Reviewers: mcrosier, jmolloy, t.p.northover
Subscribers: aemerson, rengolin, mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D16734
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259384
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Mon, 1 Feb 2016 18:31:19 +0000 (18:31 +0000)]
[SystemZ] Fix wrong-code generation for certain always-false conditions
We've found another bug in the code generation logic conditions for a
certain class of always-false conditions, those of the form
if ((a & 1) < 0)
These only reach the back end when compiling without optimization.
The bug was introduced by the choice of using TEST UNDER MASK
to implement a check for
if ((a & MASK) < VAL)
as
if ((a & MASK) == 0)
where VAL is less than the the lowest bit of MASK. This is correct
in all cases except for VAL == 0, in which case the original
condition is always false, but the replacement isn't.
Fixed by excluding that particular case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259381
91177308-0d34-0410-b5e6-
96231b3b80d8
Colin LeMahieu [Mon, 1 Feb 2016 18:15:39 +0000 (18:15 +0000)]
[NFC] Referencing manual for reason why subregbit is checked
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259380
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 1 Feb 2016 17:46:18 +0000 (17:46 +0000)]
fix broken check lines
Without the colon, it doesn't mean anything!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259377
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 1 Feb 2016 17:37:56 +0000 (17:37 +0000)]
[InstCombine] Don't transform (X+INT_MAX)>=(Y+INT_MAX) -> (X<=Y)
This miscompile came about because we tried to use a transform which was
only appropriate for xor operators when addition was present.
This fixes PR26407.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259375
91177308-0d34-0410-b5e6-
96231b3b80d8
Jun Bum Lim [Mon, 1 Feb 2016 17:03:07 +0000 (17:03 +0000)]
[ValueTracking] Improve isKnownNonZero for PHI of non-zero constants
It is clear that a PHI is a non-zero if all incoming values are non-zero constants.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259370
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 1 Feb 2016 17:00:10 +0000 (17:00 +0000)]
[InstCombine] simplify masked load intrinsics with all ones or zeros masks
A masked load with a zero mask means there's no load.
A masked load with an allOnes mask means it's a normal vector load.
Differential Revision: http://reviews.llvm.org/D16691
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259369
91177308-0d34-0410-b5e6-
96231b3b80d8
Geoff Berry [Mon, 1 Feb 2016 16:47:51 +0000 (16:47 +0000)]
[PrologEpilogInserter] Add some debug output for callee-save frame object allocation
Reviewers: mcrosier
Subscribers: mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D16733
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259367
91177308-0d34-0410-b5e6-
96231b3b80d8
Geoff Berry [Mon, 1 Feb 2016 16:29:19 +0000 (16:29 +0000)]
[AArch64] Simplify callee-save register save/restore. NFC.
Summary:
Simplify callee-save register save/restore code generation by
remembering the size of the callee-save area when it is computed so we
don't have to scan the prologue/epilogue instructions again later to
reconstruct it.
This is intended to simplify follow-on changes that reduce the number of
registers saved/restored.
Reviewers: mcrosier, jmolloy, t.p.northover
Subscribers: aemerson, rengolin, mcrosier, llvm-commits
Differential Revision: http://reviews.llvm.org/D16732
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259365
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthew Simpson [Mon, 1 Feb 2016 16:07:01 +0000 (16:07 +0000)]
[LV] Rename RdxPHIsToFix to PHIsToFix (NFC)
In the future, we will vectorize recurrences other than reductions. This patch
renames a few variables and updates their associated comments to enable them to
be reused for non-reduction PHI nodes.
This change was requested in the review for D16197.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259364
91177308-0d34-0410-b5e6-
96231b3b80d8
Asaf Badouh [Mon, 1 Feb 2016 15:48:21 +0000 (15:48 +0000)]
[X86][AVX512VBMI] add encoding and intrinsics for Multishift
Differential Revision: http://reviews.llvm.org/D16399
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259363
91177308-0d34-0410-b5e6-
96231b3b80d8
Vasileios Kalintiris [Mon, 1 Feb 2016 15:19:35 +0000 (15:19 +0000)]
[mips] Split large test file into 3 smaller ones.
Remove the old select.ll file and use select-int.ll, select-flt.ll,
select-dbl.ll for testing selects on integers, floats & doubles respectivelly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259361
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Mon, 1 Feb 2016 15:13:31 +0000 (15:13 +0000)]
[mips] Range check uimm16 and fix several bugs this revealed.
Summary:
The bugs were:
* teq and similar take 4-bit unsigned immediates on microMIPS.
* teqi and similar have side-effects like teq do.
* shll_s.w and shra_r.w take 5-bit unsigned immediates.
* The various DSP ext* instructions take a 5-bit immediate.
* repl.qh takes an 8-bit unsigned immediate.
* repl.ph takes a 10-bit unsigned immediate.
* rddsp/wrdsp take a 10-bit unsigned immediate.
* teqi and similar take signed 16-bit immediates (10-bit for microMIPS).
* Out-of-range immediate macros for or/xor take a simm32/simm64 depending
on architecture. I'll fix the simm64 case properly when I reach simm32.
lui is a bit more lenient than GAS and accepts signed immediates in addition
to unsigned. This is because MipsMCExpr can produce signed values when
constant folding and it currently lacks a way of knowing it should fold to
an unsigned value.
Reviewers: vkalintiris
Subscribers: dsanders, llvm-commits
Differential Revision: http://reviews.llvm.org/D15446
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259360
91177308-0d34-0410-b5e6-
96231b3b80d8
Amjad Aboud [Mon, 1 Feb 2016 14:09:41 +0000 (14:09 +0000)]
Improved macro emission in dwarf.
Changed emitting offset of macinfo entry into compiler unit DIE to use "addSectionLabel" method rather than explicitly calculating size/offset of macro entry.
Differential Revision: http://reviews.llvm.org/D16292
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259358
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthew Simpson [Mon, 1 Feb 2016 13:38:29 +0000 (13:38 +0000)]
Reapply commit r258404 with fix.
The previous patch caused PR26364. The fix is to ensure that we don't enter a
cycle when iterating over use-def chains.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259357
91177308-0d34-0410-b5e6-
96231b3b80d8
JF Bastien [Mon, 1 Feb 2016 10:46:16 +0000 (10:46 +0000)]
WebAssembly NFC: simplify control flow
This should now be easier to read.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259349
91177308-0d34-0410-b5e6-
96231b3b80d8
Ewan Crawford [Mon, 1 Feb 2016 10:39:24 +0000 (10:39 +0000)]
DWARF RenderScript vendor extension
Patch adds a DWARF language vendor extension for RenderScript.
We are already using this identifier in LLDB with a hard coded value, so it's preferable to use a LLVM generated enum instead.
The language is intended to be added to the next version of the standard.
See http://www.dwarfstd.org/ShowIssue.php?issue=150331.1
Reviewers: dexonsmith, echristo
Subscribers: probinson domipheus, srhines, llvm-commits
Differential Revision: http://reviews.llvm.org/D16409
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259348
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Mon, 1 Feb 2016 09:57:15 +0000 (09:57 +0000)]
AVX512: fix mask handling for gather/scatter/prefetch intrinsics.
Differential Revision: http://reviews.llvm.org/D16755
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259346
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 1 Feb 2016 08:59:30 +0000 (08:59 +0000)]
[X86][SSE] Find source of the inserted element of INSERTPS
Minor patch to trace back through target shuffles to the source of the inserted element in a (V)INSERTPS shuffle.
Differential Revision: http://reviews.llvm.org/D16652
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259343
91177308-0d34-0410-b5e6-
96231b3b80d8
Igor Breger [Mon, 1 Feb 2016 07:56:09 +0000 (07:56 +0000)]
AVX512 : Fix SETCCE lowering for KNL 32 bit.
Differential Revision: http://reviews.llvm.org/D16752
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259342
91177308-0d34-0410-b5e6-
96231b3b80d8