OSDN Git Service

android-x86/external-llvm.git
8 years agoCode size optimisation: don't rewrite fputs to fwrite when optimising for size
Sjoerd Meijer [Thu, 7 Jul 2016 13:56:23 +0000 (13:56 +0000)]
Code size optimisation: don't rewrite fputs to fwrite when optimising for size
because fwrite requires more arguments and thus extra MOVs are required.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274753 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ARM] Do not test for CPUs, use SubtargetFeatures. Also remove 1 flag
Diana Picus [Thu, 7 Jul 2016 09:11:39 +0000 (09:11 +0000)]
[ARM] Do not test for CPUs, use SubtargetFeatures. Also remove 1 flag

This is a follow-up for r273544.

The end goal is to get rid of the isSwift / isCortexXY / isWhatever methods.

This commit also removes a command line flag that isn't used in any of the tests:
check-vmlx-hazards. It can be replaced easily with the mattr mechanism, since
this is now a subtarget feature.

There is still some work left regarding FeatureExpandMLx. In the past MLx
expansion was enabled for subtargets with hasVFP2(), until r129775 [1] switched
from that to isCortexA9, without too much justification.

In spite of that, the code performing MLx expansion still contains calls to
isSwift/isLikeA9, although the results of those are pretty clear given that
we're only enabling it for the A9.

We should try to enable it for all targets that have FeatureHasVMLxHazards, as
it seems to be closely related to that behaviour, and if that is possible try to
clean up the MLx expansion pass from all calls to isWhatever. This will require
some performance testing, so it will be done in another patch.

[1] http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20110418/119725.html

Differential Revision: http://reviews.llvm.org/D21798

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274742 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LCG] Hoist the definitions of the stream operator friends to be inline
Chandler Carruth [Thu, 7 Jul 2016 07:52:07 +0000 (07:52 +0000)]
[LCG] Hoist the definitions of the stream operator friends to be inline
friend definitions.

Based on the experiments Sean Silva and Reid did, this seems the safest
course of action and also will work around a questionable warning
provided by GCC6 on the old form of the code. Thanks for Davide pointing
out the issue and other suggesting ways to fix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274740 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LoopAccessAnalysis] Fix an integer overflow
David Majnemer [Thu, 7 Jul 2016 06:24:36 +0000 (06:24 +0000)]
[LoopAccessAnalysis] Fix an integer overflow

We were inappropriately using 32-bit types to account for quantities
that can be far larger.

Fixed in PR28443.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274737 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Zero extend the result of vpcmpeq/vpcmpgt and similar intrinsics in the...
Craig Topper [Thu, 7 Jul 2016 06:11:07 +0000 (06:11 +0000)]
[AVX512] Zero extend the result of vpcmpeq/vpcmpgt and similar intrinsics in the autoupgrade code. This currently results in worse codegen but is needed for correctness.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274736 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFixed a bug in vectorizing GEP before gather/scatter intrinsic.
Elena Demikhovsky [Thu, 7 Jul 2016 06:06:46 +0000 (06:06 +0000)]
Fixed a bug in vectorizing GEP before gather/scatter intrinsic.

Vectorizing GEP was incorrect and broke SSA in some cases.

The patch fixes PR27997 https://llvm.org/bugs/show_bug.cgi?id=27997.

Differential revision: http://reviews.llvm.org/D22035

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274735 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CodeView] Implement support for thread-local variables
David Majnemer [Thu, 7 Jul 2016 05:14:21 +0000 (05:14 +0000)]
[CodeView] Implement support for thread-local variables

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274734 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDefine endianness-aware type for Elf_Chdr.
Rui Ueyama [Thu, 7 Jul 2016 03:53:00 +0000 (03:53 +0000)]
Define endianness-aware type for Elf_Chdr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274728 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[esan:cfrag] Add option -esan-aux-field-info
Qin Zhao [Thu, 7 Jul 2016 03:20:16 +0000 (03:20 +0000)]
[esan:cfrag] Add option -esan-aux-field-info

Summary:
Adds option -esan-aux-field-info to control generating binary with
auxiliary struct field information.

Extracts code for creating auxiliary information from
createCacheFragInfoGV into createCacheFragAuxGV.

Adds test struct_field_small.ll for -esan-aux-field-info test.

Reviewers: aizatsky

Subscribers: llvm-commits, bruening, eugenis, kcc, zhaoqin, vitalybuka

Differential Revision: http://reviews.llvm.org/D22019

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274726 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoThinLTO: Remove check for multiple modules before applying weak resolutions.
Peter Collingbourne [Thu, 7 Jul 2016 01:51:11 +0000 (01:51 +0000)]
ThinLTO: Remove check for multiple modules before applying weak resolutions.

This check is not only unnecessary, it can produce the wrong result. If we
are linking a single module and it has an exported linkonce symbol, we need
to promote to weak in order to avoid PR19901-style problems.

Differential Revision: http://reviews.llvm.org/D21917

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274722 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUse the class version of getPointerTy rather than getting back to
Eric Christopher [Thu, 7 Jul 2016 01:49:59 +0000 (01:49 +0000)]
Use the class version of getPointerTy rather than getting back to
ourselves via a call through the DAG.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274721 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUse the class definition for useSoftFloat.
Eric Christopher [Thu, 7 Jul 2016 01:49:57 +0000 (01:49 +0000)]
Use the class definition for useSoftFloat.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274720 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRename argument for consistency.
Eric Christopher [Thu, 7 Jul 2016 01:08:23 +0000 (01:08 +0000)]
Rename argument for consistency.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274717 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRemove the plumbing for isDarwinABI from EmitTailCallLoadFPAndRetAddr.
Eric Christopher [Thu, 7 Jul 2016 01:08:21 +0000 (01:08 +0000)]
Remove the plumbing for isDarwinABI from EmitTailCallLoadFPAndRetAddr.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274716 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoUse the MachineFunction that we've already queried for in the function.
Eric Christopher [Thu, 7 Jul 2016 01:08:19 +0000 (01:08 +0000)]
Use the MachineFunction that we've already queried for in the function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274715 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRemove the plumbing for isDarwinABI from the PrepareTailCall hierarchy.
Eric Christopher [Thu, 7 Jul 2016 01:08:17 +0000 (01:08 +0000)]
Remove the plumbing for isDarwinABI from the PrepareTailCall hierarchy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274714 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PM] Avoid getResult on a higher level in LoopAccessAnalysis
Sean Silva [Thu, 7 Jul 2016 01:01:53 +0000 (01:01 +0000)]
[PM] Avoid getResult on a higher level in LoopAccessAnalysis

Note that require<domtree> and require<loops> aren't needed because they
come in implicitly via the loop pass manager.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274712 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRemove the plumbing of 64-bitness from PrepareTailCall and functions
Eric Christopher [Thu, 7 Jul 2016 00:39:32 +0000 (00:39 +0000)]
Remove the plumbing of 64-bitness from PrepareTailCall and functions
called by it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274711 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoSink call to get the MachineFunction into EmitTailCallStoreFPAndRetAddr
Eric Christopher [Thu, 7 Jul 2016 00:39:30 +0000 (00:39 +0000)]
Sink call to get the MachineFunction into EmitTailCallStoreFPAndRetAddr
and remove the argument.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274710 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRemove unnecessary subtarget parameters in PPCTargetLowering.
Eric Christopher [Thu, 7 Jul 2016 00:39:27 +0000 (00:39 +0000)]
Remove unnecessary subtarget parameters in PPCTargetLowering.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274709 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PM] Port TailCallElim
Sean Silva [Wed, 6 Jul 2016 23:48:41 +0000 (23:48 +0000)]
[PM] Port TailCallElim

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274708 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix missing member initializers
Matt Arsenault [Wed, 6 Jul 2016 23:30:54 +0000 (23:30 +0000)]
Fix missing member initializers

This fixes the -Werror build with some combination of
warning flags.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274707 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[PM] Port CorrelatedValuePropagation
Sean Silva [Wed, 6 Jul 2016 23:26:29 +0000 (23:26 +0000)]
[PM] Port CorrelatedValuePropagation

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274705 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agofix documentation comment. NFC.
Junmo Park [Wed, 6 Jul 2016 23:18:58 +0000 (23:18 +0000)]
fix documentation comment. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274704 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMinor code cleanup. NFC.
Junmo Park [Wed, 6 Jul 2016 23:15:18 +0000 (23:15 +0000)]
Minor code cleanup. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274702 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoThinLTO: Add test cases for promote+internalize.
Peter Collingbourne [Wed, 6 Jul 2016 22:53:02 +0000 (22:53 +0000)]
ThinLTO: Add test cases for promote+internalize.

This tests the effect of both promotion and internalization on a module,
and helps show that D21883 is NFC wrt promotion+internalization.

Differential Revision: http://reviews.llvm.org/D21915

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274699 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[InstCombine] enhance (select X, C1, C2 --> ext X) to handle vectors
Sanjay Patel [Wed, 6 Jul 2016 22:23:01 +0000 (22:23 +0000)]
[InstCombine] enhance (select X, C1, C2 --> ext X) to handle vectors

By replacing dyn_cast of ConstantInt with m_Zero/m_One/m_AllOnes, we
allow these transforms for splat vectors.

Differential Revision: http://reviews.llvm.org/D21899

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274696 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoMinor formatting change, NFC
Vedant Kumar [Wed, 6 Jul 2016 22:02:55 +0000 (22:02 +0000)]
Minor formatting change, NFC

The rest of llvm-cov does not use LLVM_ATTRIBUTE_UNUSED. Leave unused
params unnamed to be consistent.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274694 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd testing coverage for r274582.
Manman Ren [Wed, 6 Jul 2016 22:01:28 +0000 (22:01 +0000)]
Add testing coverage for r274582.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274693 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Transform setcc + movzbl into xorl + setcc
Michael Kuperstein [Wed, 6 Jul 2016 21:56:18 +0000 (21:56 +0000)]
[X86] Transform setcc + movzbl into xorl + setcc

xorl + setcc is generally the preferred sequence due to the partial register
stall setcc + movzbl suffers from. As a bonus, it also encodes one byte smaller.

This fixes PR28146.

Differential Revision: http://reviews.llvm.org/D21774

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274692 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[llvm-cov] Add support for creating html reports
Vedant Kumar [Wed, 6 Jul 2016 21:44:05 +0000 (21:44 +0000)]
[llvm-cov] Add support for creating html reports

Based on a patch by Harlan Haskins!

Differential Revision: http://reviews.llvm.org/D18278

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274688 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAArch64: Change modeling of zero cycle zeroing.
Matthias Braun [Wed, 6 Jul 2016 21:39:33 +0000 (21:39 +0000)]
AArch64: Change modeling of zero cycle zeroing.

On CPUs with the zero cycle zeroing feature enabled "movi v.2d" should
be used to zero a vector register. This was previously done at
instruction selection time, however the register coalescer sometimes
widened multiple vregs to the Q width because of that leading to extra
spills. This patch leaves the decision on how to zero a register to the
AsmPrinter phase where it doesn't affect register allocation anymore.

This patch also sets isAsCheapAsAMove=1 on FMOVS0, FMOVD0.

This fixes http://llvm.org/PR27454, rdar://25866262

Differential Revision: http://reviews.llvm.org/D21826

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274686 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAArch64: Replace a RegScavenger instance with LivePhysRegs
Matthias Braun [Wed, 6 Jul 2016 21:31:27 +0000 (21:31 +0000)]
AArch64: Replace a RegScavenger instance with LivePhysRegs

findScratchNonCalleeSaveRegister() just needs a simple liveness
analysis, use LivePhysRegs for that as it is simpler and does not depend
on the kill flags.

This commit adds a convenience function available() to LivePhysRegs:
This function returns true if the given register is not reserved and
neither the register nor any of its aliases are alive.

Differential Revision: http://reviews.llvm.org/D21865

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274685 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[MemorySSA] Reinstate the legacy printer and verifier.
Chad Rosier [Wed, 6 Jul 2016 21:20:47 +0000 (21:20 +0000)]
[MemorySSA] Reinstate the legacy printer and verifier.

Differential Revision: http://reviews.llvm.org/D22058

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274679 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd initial support for R_386_GOT32X.
Rafael Espindola [Wed, 6 Jul 2016 21:19:11 +0000 (21:19 +0000)]
Add initial support for R_386_GOT32X.

This adds it only for movl mov@GOT(%reg), %reg.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274678 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CodeView] Emit an appropriate symbol kind for globals
David Majnemer [Wed, 6 Jul 2016 21:07:47 +0000 (21:07 +0000)]
[CodeView] Emit an appropriate symbol kind for globals

We emitted debug info for globals/functions as if they all had external
linkage.  Instead, emit local symbol records when appropriate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274676 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CodeView] Unions are always sealed
David Majnemer [Wed, 6 Jul 2016 21:07:42 +0000 (21:07 +0000)]
[CodeView] Unions are always sealed

It is impossible to inherit from a union.  We are missing a way to
represent this in IR for classes/structs...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274675 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[NVPTX] Add sm_60, sm_61, sm_62 targets to LLVM.
Justin Lebar [Wed, 6 Jul 2016 21:06:10 +0000 (21:06 +0000)]
[NVPTX] Add sm_60, sm_61, sm_62 targets to LLVM.

Reviewers: tra

Subscribers: jholewinski, llvm-commits

Differential Revision: http://reviews.llvm.org/D22068

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274674 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LIR] Fix mis-compilation with unwinding.
Haicheng Wu [Wed, 6 Jul 2016 21:05:40 +0000 (21:05 +0000)]
[LIR] Fix mis-compilation with unwinding.

To fix PR27859, bail out if there is an instruction may throw.

Differential Revision: http://reviews.llvm.org/D20638

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274673 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[InstCombine] use more specific pattern matchers; NFCI
Sanjay Patel [Wed, 6 Jul 2016 21:01:26 +0000 (21:01 +0000)]
[InstCombine] use more specific pattern matchers; NFCI

Follow-up from r274465: we don't need to capture the value in these cases,
so just match the constant that we're looking for. m_One/m_Zero work with
vector splats as well as scalars.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274670 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd 'thinlto_src_module' metadata to imported function
Piotr Padlewski [Wed, 6 Jul 2016 20:26:25 +0000 (20:26 +0000)]
Add 'thinlto_src_module' metadata to imported function

Added metadata to be able to make statistics on how many functions
that have been imported have been removed. Also module name might
be helpfull when debugging.

Reviewers: tejohnson, eraman

Subscribers: mehdi_amini, llvm-commits

Differential Revision: http://reviews.llvm.org/D21943

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274668 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[esan|wset] Fix incorrect memory size assert
Derek Bruening [Wed, 6 Jul 2016 20:13:53 +0000 (20:13 +0000)]
[esan|wset] Fix incorrect memory size assert

Summary:
Fixes an incorrect assert that fails on 128-bit-sized loads or stores.
Augments the wset tests to include this case.

Reviewers: aizatsky

Subscribers: vitalybuka, zhaoqin, kcc, eugenis, llvm-commits

Differential Revision: http://reviews.llvm.org/D22062

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274666 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoNVPTX: Replace uses of cuda.syncthreads with nvvm.barrier0
Justin Bogner [Wed, 6 Jul 2016 20:02:45 +0000 (20:02 +0000)]
NVPTX: Replace uses of cuda.syncthreads with nvvm.barrier0

Everywhere where cuda.syncthreads or __syncthreads is used, use the
properly namespaced nvvm.barrier0 instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274664 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoNVPTX: Make the llvm.nvvm.shfl intrinsics and builtin names consistent
Justin Bogner [Wed, 6 Jul 2016 19:52:27 +0000 (19:52 +0000)]
NVPTX: Make the llvm.nvvm.shfl intrinsics and builtin names consistent

The intrinsics here use nvvm, but the builtins and tablegen variable
names were using ptx. Stick to the modern names here.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274662 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRetry: "Emit CodeView type records for nested classes."
Adrian McCarthy [Wed, 6 Jul 2016 19:49:51 +0000 (19:49 +0000)]
Retry: "Emit CodeView type records for nested classes."

Now with a corrected test to account for a recently supported properties bit in the debug info of a struct.

Original review: http://reviews.llvm.org/D21939

This reverts commit 970c3fd497a28d25dd69526eb52594a696c37968.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274661 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[DSE] Avoid iterator invalidation bugs.
Chad Rosier [Wed, 6 Jul 2016 19:48:52 +0000 (19:48 +0000)]
[DSE] Avoid iterator invalidation bugs.

The dse_with_dbg_value.ll test committed with r273141 is removed because this
we no longer performs any type of back tracking, which is what was causing the
codegen differences with and without debug information.

Differential Revision: http://reviews.llvm.org/D21613

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274660 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[Conduct] Refine what "rare cases" means wrt violations outside our spaces.
Paul Robinson [Wed, 6 Jul 2016 19:32:41 +0000 (19:32 +0000)]
[Conduct] Refine what "rare cases" means wrt violations outside our spaces.
Text suggested by Daniel Berlin. While it is likely to be exactly what
the advisory committee would do anyway, codifying it does no harm and
helps reassure people that rare does not mean arbitrary.

Differential Revision: http://reviews.llvm.org/D21981

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274659 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[x86] fix cost of SINT_TO_FP for i32 --> float (PR21356, PR28434)
Sanjay Patel [Wed, 6 Jul 2016 19:15:54 +0000 (19:15 +0000)]
[x86] fix cost of SINT_TO_FP for i32 --> float (PR21356, PR28434)

This is "cvtdq2ps" which does not appear to be particularly slow on any CPU
according to Agner's tables. Choosing "5" as a cost here as suggested in:
https://llvm.org/bugs/show_bug.cgi?id=21356
...but it seems very conservative given that the instruction is fully pipelined,
and I think these costs are supposed to model throughput.

Note that related costs are also most likely too high, but this fixes PR21356
and partly fixes PR28434.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274658 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoWork around PR28400 a bit harder.
Sean Silva [Wed, 6 Jul 2016 19:05:41 +0000 (19:05 +0000)]
Work around PR28400 a bit harder.

We were still crashing in the "no change" case because LVI was not
getting invalidated.

See the thread "Should analyses be able to hold AssertingVH to IR?
(related to PR28400)" for more discussion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274656 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoTailDuplicator: Remove live-in updating logic
Matthias Braun [Wed, 6 Jul 2016 18:55:10 +0000 (18:55 +0000)]
TailDuplicator: Remove live-in updating logic

This logic was introduced in r157663 and does not make any sense to me.
The motivating example in rdar://11538365 looks like this:

This is the tail:
BB#16: derived from LLVM BB %if.end68
    Live Ins: %R0 %R4 %R5
    Predecessors according to CFG: BB#15 BB#5
        tBLXi pred:14, pred:%noreg, <ga:@CFRelease>, %R0<kill>, <regmask>, %LR<imp-def,dead>, %SP<imp-use>, %SP<imp-def>
        t2B <BB#20>, pred:14, pred:%noreg
    Successors according to CFG: BB#20

This is the predBB:
BB#5:
    Live Ins: %R5
    Predecessors according to CFG: BB#4
        %R4<def> = t2MOVi 0, pred:14, pred:%noreg, opt:%noreg
        t2B <BB#16>, pred:14, pred:%noreg
    Successors according to CFG: BB#16

However this is invalid machine code to begin with, if %R0 is live-in to
BB#16 then it must be live-in to BB#5 as well if BB#5 does not define
it.  We should not need logic to retroactively fix broken machine code
and in fact the example from r157663 passes cleanly with the code
removed and I do not see any (newly) failing tests with the machine
verifier enabled.

Differential Revision: http://reviews.llvm.org/D22031

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274655 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Sort cast cost tables. NFC.
Michael Kuperstein [Wed, 6 Jul 2016 18:26:48 +0000 (18:26 +0000)]
[X86] Sort cast cost tables. NFC.

Cast cost tables are now sorted, for each cast type, lexicographically on
[source base type, source vector width, dest base type, base vector width].

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274653 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[SystemZ] Remove AND mask of bottom 6 bits when result is used for shift/rotate
Elliot Colp [Wed, 6 Jul 2016 18:13:11 +0000 (18:13 +0000)]
[SystemZ] Remove AND mask of bottom 6 bits when result is used for shift/rotate

On SystemZ, shift and rotate instructions only use the bottom 6 bits of the shift/rotate amount.
Therefore, if the amount is ANDed with an immediate mask that has all of the bottom 6 bits set, we
can remove the AND operation entirely.

Differential Revision: http://reviews.llvm.org/D21854

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274650 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoNFC changed names in FunctionImport
Piotr Padlewski [Wed, 6 Jul 2016 18:12:23 +0000 (18:12 +0000)]
NFC changed names in FunctionImport

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274649 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE] Fixed typo in insertps lowering.
Simon Pilgrim [Wed, 6 Jul 2016 18:09:08 +0000 (18:09 +0000)]
[X86][SSE] Fixed typo in insertps lowering.

We were checking for 2 insertions (which is caught earlier in the pattern matching loop) instead of the case where we have no insertions.

Turns out this code never fires as we always try to lower to insertps after trying to lower to blendps, which would catch these cases - I'm about to make some changes to support combining to insertps which could cause this to fire so I don't want to remove it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274648 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[pdb] Round trip the PDB stream between YAML and binary PDB.
Zachary Turner [Wed, 6 Jul 2016 18:05:57 +0000 (18:05 +0000)]
[pdb] Round trip the PDB stream between YAML and binary PDB.

This gets writing of the PDB stream working.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274647 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoEnsure all uses of permute instructions feed vector stores
Kit Barton [Wed, 6 Jul 2016 18:03:52 +0000 (18:03 +0000)]
Ensure all uses of permute instructions feed vector stores

There is a problem in VSXSwapRemoval where it is incorrectly removing permute instructions.
In this case, the permute is feeding both a vector store and also a non-store instruction. In this case, the permute cannot be removed.

The fix is to simply look at all the uses of the vector register defined by the permute and ensure that all the uses are vector store instructions.

This problem was reported in PR 27735 (https://llvm.org/bugs/show_bug.cgi?id=27735).

Test case based on the original problem reported.

Phabricator Review: http://reviews.llvm.org/D21802

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274645 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[DAGCombiner] Fix visitSTORE to continue processing current SDNode, if findBetterNeig...
Tim Shen [Wed, 6 Jul 2016 17:44:03 +0000 (17:44 +0000)]
[DAGCombiner] Fix visitSTORE to continue processing current SDNode, if findBetterNeighborChains doesn't actually CombineTo it.

Summary:
findBetterNeighborChains may or may not find a better chain for each node it finds, which include the node ("St") that visitSTORE is currently processing. If no better chain is found for St, visitSTORE should continue instead of return SDValue(St, 0), as if it's CombinedTo'ed.

This fixes bug 28130. There might be other ways to make the test pass (see D21409). I think both of the patches are fixing actual bugs revealed by the same testcase.

Reviewers: echristo, wschmidt, hfinkel, kbarton, amehsan, arsenm, nemanjai, bogner

Subscribers: mehdi_amini, nemanjai, llvm-commits

Differential Revision: http://reviews.llvm.org/D21692

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274644 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[TTI] The cost model should not assume vector casts get completely scalarized
Michael Kuperstein [Wed, 6 Jul 2016 17:30:56 +0000 (17:30 +0000)]
[TTI] The cost model should not assume vector casts get completely scalarized

The cost model should not assume vector casts get completely scalarized, since
on targets that have vector support, the common case is a partial split up to
the legal vector size. So, when a vector cast  gets split, the resulting casts
end up legal and cheap.

Instead of pessimistically assuming scalarization, base TTI can use the costs
the concrete TTI provides for the split vector, plus a fudge factor to account
for the cost of the split itself. This fudge factor is currently 1 by default,
except on AMDGPU where inserts and extracts are considered free.

Differential Revision: http://reviews.llvm.org/D21251

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274642 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAdd a default parameter for getRegisteredOptions.
Zachary Turner [Wed, 6 Jul 2016 17:25:16 +0000 (17:25 +0000)]
Add a default parameter for getRegisteredOptions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274640 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDisable hash verification of enums.
Zachary Turner [Wed, 6 Jul 2016 17:25:12 +0000 (17:25 +0000)]
Disable hash verification of enums.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274639 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoPrune RelocVisitor.h include to avoid including COFF.h from MCJIT.h
Reid Kleckner [Wed, 6 Jul 2016 16:56:42 +0000 (16:56 +0000)]
Prune RelocVisitor.h include to avoid including COFF.h from MCJIT.h

This helps to mitigate the conflict between COFF.h and winnt.h, which is
PR28399.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274637 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agofix typo; NFC
Sanjay Patel [Wed, 6 Jul 2016 16:42:46 +0000 (16:42 +0000)]
fix typo; NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274636 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert "Emit CodeView type records for nested classes."
Adrian McCarthy [Wed, 6 Jul 2016 15:14:10 +0000 (15:14 +0000)]
Revert "Emit CodeView type records for nested classes."

This reverts commit 256b29322c827a2d94da56468c936596f5509032.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274632 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][SSE] Added test cases for missed opportunities to combine pshufb to pslldq...
Simon Pilgrim [Wed, 6 Jul 2016 15:09:48 +0000 (15:09 +0000)]
[X86][SSE] Added test cases for missed opportunities to combine pshufb to pslldq/psrldq

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274631 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoEmit CodeView type records for nested classes.
Adrian McCarthy [Wed, 6 Jul 2016 14:47:32 +0000 (14:47 +0000)]
Emit CodeView type records for nested classes.

Differential Revision: http://reviews.llvm.org/D21939

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274629 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LV] Don't widen trivial induction variables
Matthew Simpson [Wed, 6 Jul 2016 14:26:59 +0000 (14:26 +0000)]
[LV] Don't widen trivial induction variables

We currently always vectorize induction variables. However, if an induction
variable is only used for counting loop iterations or computing addresses with
getelementptr instructions, we don't need to do this. Vectorizing these trivial
induction variables can create vector code that is difficult to simplify later
on. This is especially true when the unroll factor is greater than one, and we
create vector arithmetic when computing step vectors. With this patch, we check
if an induction variable is only used for counting iterations or computing
addresses, and if so, scalarize the arithmetic when computing step vectors
instead. This allows for greater simplification.

This patch addresses the suboptimal pointer arithmetic sequence seen in
PR27881.

Reference: https://llvm.org/bugs/show_bug.cgi?id=27881
Differential Revision: http://reviews.llvm.org/D21620

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274627 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRe-commit of 274613.
Elena Demikhovsky [Wed, 6 Jul 2016 14:15:43 +0000 (14:15 +0000)]
Re-commit of 274613.

The prev commit failed on compilation.
A minor change in one pattern in lib/Target/X86/X86InstrAVX512.td fixes the failure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274626 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AMDGPU] Assembler: regression tests for bug 28413. NFC
Sam Kolton [Wed, 6 Jul 2016 12:52:20 +0000 (12:52 +0000)]
[AMDGPU] Assembler: regression tests for bug 28413. NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274623 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ARM] Do not test for CPUs, use SubtargetFeatures. Also remove 2 flags.
Diana Picus [Wed, 6 Jul 2016 11:22:11 +0000 (11:22 +0000)]
[ARM] Do not test for CPUs, use SubtargetFeatures. Also remove 2 flags.

This is a follow-up for r273544.

The end goal is to get rid of the isSwift / isCortexXY / isWhatever methods.

This commit also removes two command-line flags that weren't used in any of the
tests: widen-vmovs and swift-partial-update-clearance. The former may be easily
replaced with the mattr mechanism, but the latter may not (as it is a subtarget
property, and not a proper feature).

Differential Revision: http://reviews.llvm.org/D21797

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274620 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[ARM] Do not test for CPUs, use SubtargetFeatures (Part 3). NFCI
Diana Picus [Wed, 6 Jul 2016 09:22:23 +0000 (09:22 +0000)]
[ARM] Do not test for CPUs, use SubtargetFeatures (Part 3). NFCI

This is a follow-up for r273544 and r273853.

The end goal is to get rid of the isSwift / isCortexXY / isWhatever methods.
This commit also marks them as obsolete.

Differential Revision: http://reviews.llvm.org/D21796

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274616 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoReverted 274613 due to compilation failue.
Elena Demikhovsky [Wed, 6 Jul 2016 09:11:49 +0000 (09:11 +0000)]
Reverted 274613 due to compilation failue.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274615 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAVX-512: Optimization for patterns with i1 scalar type
Elena Demikhovsky [Wed, 6 Jul 2016 09:01:20 +0000 (09:01 +0000)]
AVX-512: Optimization for patterns with i1 scalar type

The patch removes redundant kmov instructions (not all, we still have a lot of work here) and redundant "and" instructions after "setcc".
I use "AssertZero" marker between X86ISD::SETCC node and "truncate" to eliminate extra "and $1" instruction.
I also changed zext, aext and trunc patterns in the .td file. It allows to remove extra "kmov" instruictions.

This patch fixes https://llvm.org/bugs/show_bug.cgi?id=28173.

Fast ISEL mode is not supported correctly for AVX-512. ICMP/FCMP scalar instruction should return result in k-reg. It will be fixed in one of the next patches. I redirected handling of "cmp" to the DAG builder mode. (The code looks worse in one specific test case, but without this fix the new patch fails).

Differential revision: http://reviews.llvm.org/D21956

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274613 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Fix return of non-void-returning shaders
Nicolai Haehnle [Wed, 6 Jul 2016 08:35:17 +0000 (08:35 +0000)]
AMDGPU: Fix return of non-void-returning shaders

Summary:
Since "AMDGPU: Fix verifier errors in SILowerControlFlow", the logic that
ensures that a non-void-returning shader falls off the end of the last
basic block was effectively disabled, since SI_RETURN is now used.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96731

Reviewers: arsenm, tstellarAMD

Subscribers: arsenm, kzhuravl, llvm-commits

Differential Revision: http://reviews.llvm.org/D21975

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274612 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoVector GEP test: renamed + some comments
Elena Demikhovsky [Wed, 6 Jul 2016 08:11:23 +0000 (08:11 +0000)]
Vector GEP test: renamed + some comments

Differential revision: http://reviews.llvm.org/D21957

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274611 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86] Remove GCC builtin names from sse/avx packed fp cmp intrinsics so clang can...
Craig Topper [Wed, 6 Jul 2016 06:27:25 +0000 (06:27 +0000)]
[X86] Remove GCC builtin names from sse/avx packed fp cmp intrinsics so clang can special handle some of the immediate values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274607 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix handling of forward unreachable but reverse-reachable blocks in MemorySSA constru...
Daniel Berlin [Wed, 6 Jul 2016 05:32:05 +0000 (05:32 +0000)]
Fix handling of forward unreachable but reverse-reachable blocks in MemorySSA construction

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274606 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[AVX512] Remove GCC builtins from the vplzcntd/q intrinsics so we can emit native...
Craig Topper [Wed, 6 Jul 2016 04:24:24 +0000 (04:24 +0000)]
[AVX512] Remove GCC builtins from the vplzcntd/q intrinsics so we can emit native IR using the generic ctlz intrinsic in clang.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274602 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CFLAA] Split out more things from CFLSteens. NFC.
George Burgess IV [Wed, 6 Jul 2016 00:47:21 +0000 (00:47 +0000)]
[CFLAA] Split out more things from CFLSteens. NFC.

"More things" = StratifiedAttrs and various bits like interprocedural
summaries.

Patch by Jia Chen.

Differential Revision: http://reviews.llvm.org/D21964

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274592 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CFLAA] Split the CFL graph out from CFLSteens. NFC.
George Burgess IV [Wed, 6 Jul 2016 00:36:12 +0000 (00:36 +0000)]
[CFLAA] Split the CFL graph out from CFLSteens. NFC.

Patch by Jia Chen.

Differential Revision: http://reviews.llvm.org/D21963

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274591 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[MSSA] Fix typo. NFC.
George Burgess IV [Wed, 6 Jul 2016 00:28:43 +0000 (00:28 +0000)]
[MSSA] Fix typo. NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274590 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[CFLAA] Split into Anders+Steens analysis.
George Burgess IV [Wed, 6 Jul 2016 00:26:41 +0000 (00:26 +0000)]
[CFLAA] Split into Anders+Steens analysis.

StratifiedSets (as implemented) is very fast, but its accuracy is also
limited. If we take a more aggressive andersens-like approach, we can be
way more accurate, but we'll also end up being slower.

So, we've decided to split CFLAA into CFLSteensAA and CFLAndersAA.

Long-term, we want to end up in a place where CFLSteens is queried
first; if it can provide an answer, great (since queries are basically
map lookups). Otherwise, we'll fall back to CFLAnders, BasicAA, etc.

This patch splits everything out so we can try to do something like
that when we get a reasonable CFLAnders implementation.

Patch by Jia Chen.

Differential Revision: http://reviews.llvm.org/D21910

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274589 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAArch64: try to fix optimized build failure.
Tim Northover [Tue, 5 Jul 2016 23:15:58 +0000 (23:15 +0000)]
AArch64: try to fix optimized build failure.

I think the Ops filled out by Regex::match contain pointers into the temporary
std::string returned by StringRef::upper. Its lifetime is extended by the call
to match, but only until the end of that call (not to the uses of Ops later
on).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274586 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoTableGen: avoid string copy.
Tim Northover [Tue, 5 Jul 2016 22:51:30 +0000 (22:51 +0000)]
TableGen: avoid string copy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274584 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][AVX2] Simplified BROADCAST combining to avoid repeated matching attempts
Simon Pilgrim [Tue, 5 Jul 2016 22:41:04 +0000 (22:41 +0000)]
[X86][AVX2] Simplified BROADCAST combining to avoid repeated matching attempts

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274583 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoFix an ordering problem in r274431
Manman Ren [Tue, 5 Jul 2016 22:24:44 +0000 (22:24 +0000)]
Fix an ordering problem in r274431

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274582 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Remove unnecessary string usage in AsmPrinter
Matt Arsenault [Tue, 5 Jul 2016 22:06:56 +0000 (22:06 +0000)]
AMDGPU: Remove unnecessary string usage in AsmPrinter

Registers are printed a lot, so don't create temporary
std::strings. Using char instead of a string to an ostream
saves a function call.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274581 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[asan] Add a hidden option for Mach-O global metadata liveness tracking
Ryan Govostes [Tue, 5 Jul 2016 21:53:08 +0000 (21:53 +0000)]
[asan] Add a hidden option for Mach-O global metadata liveness tracking

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274578 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAArch64: TableGenerate system instruction operands.
Tim Northover [Tue, 5 Jul 2016 21:23:04 +0000 (21:23 +0000)]
AArch64: TableGenerate system instruction operands.

The way the named arguments for various system instructions are handled at the
moment has a few problems:

  - Large-scale duplication between AArch64BaseInfo.h and AArch64BaseInfo.cpp
  - That weird Mapping class that I have no idea what I was on when I thought
    it was a good idea.
  - Searches are performed linearly through the entire list.
  - We print absolutely all registers in upper-case, even though some are
    canonically mixed case (SPSel for example).
  - The ARM ARM specifies sysregs in terms of 5 fields, but those are relegated
    to comments in our implementation, with a slightly opaque hex value
    indicating the canonical encoding LLVM will use.

This adds a new TableGen backend to produce efficiently searchable tables, and
switches AArch64 over to using that infrastructure.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274576 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoTableGen: promote "code" type from syntactic sugar.
Tim Northover [Tue, 5 Jul 2016 21:22:55 +0000 (21:22 +0000)]
TableGen: promote "code" type from syntactic sugar.

It's being immediately converted to a "string", but being able to tell what
type the field was originally can be useful in backends.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274575 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoTransfer ownership of the gold plugin.
Rafael Espindola [Tue, 5 Jul 2016 20:49:50 +0000 (20:49 +0000)]
Transfer ownership of the gold plugin.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274574 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoRevert r259387: "AArch64: Implement missed conditional compare sequences."
Balaram Makam [Tue, 5 Jul 2016 20:24:05 +0000 (20:24 +0000)]
Revert r259387: "AArch64: Implement missed conditional compare sequences."

    This reverts commit r259387 because it inserts illegal code after legalization
    in some backends where i64 OR type is illegal for example.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274573 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][AVX2] Add support for target shuffle combining to BROADCAST
Simon Pilgrim [Tue, 5 Jul 2016 20:11:29 +0000 (20:11 +0000)]
[X86][AVX2] Add support for target shuffle combining to BROADCAST

Only support broadcast from vector register so far - memory folding support will have to wait.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274572 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[X86][AVX512] Fixed decoding of permd/permpd variable mask shuffles + enabled them...
Simon Pilgrim [Tue, 5 Jul 2016 18:31:17 +0000 (18:31 +0000)]
[X86][AVX512] Fixed decoding of permd/permpd variable mask shuffles + enabled them for target shuffle combining

Corrected element mask masking to extract the bottom index bits (now matches the perm2 implementation but for unary inputs).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274571 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoARM: fix `-mlong-calls` for WoA
Saleem Abdulrasool [Tue, 5 Jul 2016 18:30:52 +0000 (18:30 +0000)]
ARM: fix `-mlong-calls` for WoA

Not all code-paths set the relocation model to static for Windows.  This
currently breaks on Windows ARM with `-mlong-calls` when built with clang.
Loosen the assertion to what it was previously.  We would ideally ensure that
all the configuration sets Windows to static relocation model.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274570 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoDAGCombiner: Fold away vector extract of insert with the same index
Matt Arsenault [Tue, 5 Jul 2016 18:25:02 +0000 (18:25 +0000)]
DAGCombiner: Fold away vector extract of insert with the same index

This only really matters when the index is non-constant since the
constant case already gets taken care of by other combines.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274569 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAArch64: use correct SDValue # when looking for bitfield placement.
Tim Northover [Tue, 5 Jul 2016 18:02:57 +0000 (18:02 +0000)]
AArch64: use correct SDValue # when looking for bitfield placement.

The other use really does only care about the SDNode (it checks the
opcode against a whitelist), but bitFieldPlacement can be misled if
the node produces multiple results.

Patch by Ismail Badawi.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274567 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU: Fix folding SGPRs into madak/madmk src0
Matt Arsenault [Tue, 5 Jul 2016 17:09:01 +0000 (17:09 +0000)]
AMDGPU: Fix folding SGPRs into madak/madmk src0

Because of the special immediate operand, the constant
bus is already used so SGPRs are never useful.

r263212 changed the name of the immediate operand, which
broke the verifier check for the restriction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274564 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[MC/Darwin] Fix a -Wmisleading-indentation warning, reported by GCC 6.
Davide Italiano [Tue, 5 Jul 2016 16:56:09 +0000 (16:56 +0000)]
[MC/Darwin] Fix a -Wmisleading-indentation warning, reported by GCC 6.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274563 91177308-0d34-0410-b5e6-96231b3b80d8

8 years agoAMDGPU/SI: Remove address space query functions from AMDGPUDAGToDAGISel
Tom Stellard [Tue, 5 Jul 2016 16:10:44 +0000 (16:10 +0000)]
AMDGPU/SI: Remove address space query functions from AMDGPUDAGToDAGISel

Summary:
These have been replaced with TableGen code (except for isConstantLoad,
which is still used for R600).  The queries were broken for cases
where MemOperand was a PseudoSourceValue.

Reviewers: arsenm

Subscribers: arsenm, kzhuravl, llvm-commits

Differential Revision: http://reviews.llvm.org/D21684

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274561 91177308-0d34-0410-b5e6-96231b3b80d8

8 years ago[LV] Refactor integer induction widening (NFC)
Matthew Simpson [Tue, 5 Jul 2016 15:41:28 +0000 (15:41 +0000)]
[LV] Refactor integer induction widening (NFC)

This patch also removes the SCEV variants of getStepVector() since they have no
uses after the refactoring.

Differential Revision: http://reviews.llvm.org/D21903

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@274558 91177308-0d34-0410-b5e6-96231b3b80d8