]> granicus.if.org Git - llvm/log
llvm
5 years ago[ARM] Lower CTTZ on MVE
Oliver Cruickshank [Mon, 16 Sep 2019 15:19:56 +0000 (15:19 +0000)]
[ARM] Lower CTTZ on MVE

Lower CTTZ on MVE using VBRSR and VCLS which will reverse the bits and
count the leading zeros, equivalent to a count trailing zeros (CTTZ).

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

5 years ago[ARM] Add patterns for CTLZ on MVE
Oliver Cruickshank [Mon, 16 Sep 2019 15:19:49 +0000 (15:19 +0000)]
[ARM] Add patterns for CTLZ on MVE

CTLZ intrinsic can use the VCLS instruction on MVE, which produces
better results than expanding.

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

5 years ago[ExecutionEngine] Don't dereference a dyn_cast result. NFCI.
Simon Pilgrim [Mon, 16 Sep 2019 15:19:11 +0000 (15:19 +0000)]
[ExecutionEngine] Don't dereference a dyn_cast result. NFCI.

The static analyzer is warning about potential null dereferences of dyn_cast<> results - in these cases we can safely use cast<> directly as we know that these cases should all be the correct type, which is why its working atm and anyway cast<> will assert if they aren't.

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

5 years ago[LV] Add ARM MVE tail-folding tests
Sjoerd Meijer [Mon, 16 Sep 2019 14:56:26 +0000 (14:56 +0000)]
[LV] Add ARM MVE tail-folding tests

Now that the vectorizer can do tail-folding (rL367592), and the ARM backend
understands MVE masked loads/stores (rL371932), it's time to add the MVE
tail-folding equivalent of the X86 tests that I added.

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

5 years ago[SystemZ] Call erase() on the right MBB in SystemZTargetLowering::emitSelect()
Jonas Paulsson [Mon, 16 Sep 2019 14:49:36 +0000 (14:49 +0000)]
[SystemZ]  Call erase() on the right MBB in SystemZTargetLowering::emitSelect()

Since MBB was split *before* MI, the MI(s) will reside in JoinMBB (MBB) at
the point of erasing them, so calling StartMBB->erase() is actually wrong,
although it is "working" by all appearances.

Review: Ulrich Weigand

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

5 years ago[NFC] remove unused functions
Guillaume Chatelet [Mon, 16 Sep 2019 14:48:58 +0000 (14:48 +0000)]
[NFC] remove unused functions

Reviewers: courbet

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

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

5 years agoAMDGPU/GlobalISel: Fail select of G_INSERT non-32-bit source
Matt Arsenault [Mon, 16 Sep 2019 14:26:14 +0000 (14:26 +0000)]
AMDGPU/GlobalISel: Fail select of G_INSERT non-32-bit source

This was producing an illegal copy which would hit an assert
later. Error on selection for now until this is implemented.

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

5 years agoAMDGPU/GlobalISel: Fix some broken run lines
Matt Arsenault [Mon, 16 Sep 2019 14:14:40 +0000 (14:14 +0000)]
AMDGPU/GlobalISel: Fix some broken run lines

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

5 years agoAMDGPU/GlobalISel: Fix RegBankSelect for G_FRINT and G_FCEIL
Matt Arsenault [Mon, 16 Sep 2019 14:14:37 +0000 (14:14 +0000)]
AMDGPU/GlobalISel: Fix RegBankSelect for G_FRINT and G_FCEIL

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

5 years agoAMDGPU/GlobalISel: Remove another illegal select test
Matt Arsenault [Mon, 16 Sep 2019 14:14:31 +0000 (14:14 +0000)]
AMDGPU/GlobalISel: Remove another illegal select test

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

5 years ago[X86][NFC] Add a `use-aa` feature.
Clement Courbet [Mon, 16 Sep 2019 14:05:28 +0000 (14:05 +0000)]
[X86][NFC] Add a `use-aa` feature.

Summary:
This allows enabling useaa on the command-line and will allow enabling the
feature on a per-CPU basis where benchmarking shows improvements.

This is modelled after the ARM/AArch64 target.

Reviewers: RKSimon, andreadb, craig.topper

Subscribers: javed.absar, kristof.beyls, hiraditya, ychen, llvm-commits

Tags: #llvm

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

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

5 years ago[InstCombine] add/move tests for icmp with add operand; NFC
Sanjay Patel [Mon, 16 Sep 2019 14:05:19 +0000 (14:05 +0000)]
[InstCombine] add/move tests for icmp with add operand; NFC

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

5 years ago[docs][llvm-strings] Write llvm-strings documentation
James Henderson [Mon, 16 Sep 2019 13:56:12 +0000 (13:56 +0000)]
[docs][llvm-strings] Write llvm-strings documentation

Previously we only had a stub document.

Reviewed by: MaskRay

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

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

5 years ago[docs][llvm-size] Write llvm-size documentation
James Henderson [Mon, 16 Sep 2019 13:20:37 +0000 (13:20 +0000)]
[docs][llvm-size] Write llvm-size documentation

Previously we only had a stub document.

Reviewed by: serge-sans-paille, MaskRay

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

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

5 years ago[ARM] Fold VCMP into VPT
David Green [Mon, 16 Sep 2019 13:02:41 +0000 (13:02 +0000)]
[ARM] Fold VCMP into VPT

MVE has VPT instructions, which perform the duties of both a VCMP and a VPST in
a single instruction, performing the compare and starting the VPT block in one.
This teaches the MVEVPTBlockPass to fold them, searching back through the
basicblock for a valid VCMP and creating the VPT from its operands.

There are some changes to the VPT instructions to accommodate this, altering
the order of the operands to match the VCMP better, and changing P0 register
defs to be VPR defs, as is used in other places.

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

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

5 years ago[InstCombine] remove unneeded one-use checks for icmp fold
Sanjay Patel [Mon, 16 Sep 2019 12:54:34 +0000 (12:54 +0000)]
[InstCombine] remove unneeded one-use checks for icmp fold

This fold and several others were added in:
rL125734 <https://reviews.llvm.org/rL125734>
...with no explanation for the one-use checks other than the code
comments about register pressure.

Given that this is IR canonicalization, we shouldn't be worried
about register pressure though; the backend should be able to
adjust for that as needed.

This is part of solving PR43310 the theoretically right way:
https://bugs.llvm.org/show_bug.cgi?id=43310
...ie, if we don't cripple basic transforms, then we won't
need to add special-case code to detect larger patterns.

rL371940 is a related patch in this series.

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

5 years ago[InstCombine] add icmp tests with extra uses; NFC
Sanjay Patel [Mon, 16 Sep 2019 12:19:18 +0000 (12:19 +0000)]
[InstCombine] add icmp tests with extra uses; NFC

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

5 years ago[InstCombine] fix comments to match code; NFC
Sanjay Patel [Mon, 16 Sep 2019 12:12:05 +0000 (12:12 +0000)]
[InstCombine] fix comments to match code; NFC

This blob was written before match() existed, so it
could probably be reduced significantly.

But I suspect it isn't well tested, so tests would have
to be added to reduce risk from logic changes.

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

5 years agogn build: Merge r371976
Nico Weber [Mon, 16 Sep 2019 11:33:54 +0000 (11:33 +0000)]
gn build: Merge r371976

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

5 years ago[VPlanSLP] Don't dereference a cast_or_null<VPInstruction> result. NFCI.
Simon Pilgrim [Mon, 16 Sep 2019 11:22:44 +0000 (11:22 +0000)]
[VPlanSLP] Don't dereference a cast_or_null<VPInstruction> result. NFCI.

The static analyzer is warning about a potential null dereference of the cast_or_null result, I've split the cast_or_null check from the ->getUnderlyingInstr() call to avoid this, but it appears that we weren't seeing any null pointers in the dumped bundles in the first place.

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

5 years ago[SLPVectorizer] Assert that we find a LastInst to silence analyzer null dereference...
Simon Pilgrim [Mon, 16 Sep 2019 10:48:16 +0000 (10:48 +0000)]
[SLPVectorizer] Assert that we find a LastInst to silence analyzer null dereference warning. NFCI.

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

5 years ago[SLPVectorizer] Don't dereference a dyn_cast result. NFCI.
Simon Pilgrim [Mon, 16 Sep 2019 10:35:09 +0000 (10:35 +0000)]
[SLPVectorizer] Don't dereference a dyn_cast result. NFCI.

The static analyzer is warning about potential null dereferences of dyn_cast<> results - in these cases we can safely use cast<> directly as we know that these cases should all be the correct type, which is why its working atm and anyway cast<> will assert if they aren't.

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

5 years agoAdded return statement to fix compile and build warning:
Sjoerd Meijer [Mon, 16 Sep 2019 10:30:37 +0000 (10:30 +0000)]
Added return statement to fix compile and build warning:

llvm-rtdyld.cpp:966:7: warning: variable â€˜Result’ set but not used

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

5 years ago[SVE][Inline-Asm] Add constraints for SVE predicate registers
Kerry McLaughlin [Mon, 16 Sep 2019 09:45:27 +0000 (09:45 +0000)]
[SVE][Inline-Asm] Add constraints for SVE predicate registers

Summary:
Adds the following inline asm constraints for SVE:
  - Upl: One of the low eight SVE predicate registers, P0 to P7 inclusive
  - Upa: SVE predicate register with full range, P0 to P15

Reviewers: t.p.northover, sdesmalen, rovka, momchil.velikov, cameron.mcinally, greened, rengolin

Reviewed By: rovka

Subscribers: javed.absar, tschuett, rkruppe, psnobl, cfe-commits, llvm-commits

Tags: #llvm

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

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

5 years agogn build: Merge r371965
Nico Weber [Mon, 16 Sep 2019 09:43:26 +0000 (09:43 +0000)]
gn build: Merge r371965

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

5 years agogn build: Merge r371959
Nico Weber [Mon, 16 Sep 2019 07:34:23 +0000 (07:34 +0000)]
gn build: Merge r371959

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

5 years ago[AArch64] Some more FP16 FMA pattern matching
Sjoerd Meijer [Mon, 16 Sep 2019 07:32:13 +0000 (07:32 +0000)]
[AArch64] Some more FP16 FMA pattern matching

After our previous machinecombiner exercises (rL371321, rL371818, rL371833), we
were still missing a few FP16 FMA patterns.

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

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

5 years ago[SystemZ] Merge the SystemZExpandPseudo pass into SystemZPostRewrite.
Jonas Paulsson [Mon, 16 Sep 2019 07:29:37 +0000 (07:29 +0000)]
[SystemZ]  Merge the SystemZExpandPseudo pass into SystemZPostRewrite.

SystemZExpandPseudo:s only job was to expand LOCRMux instructions into jump
sequences. This needs to be done if expandLOCRPseudo() or expandSELRPseudo()
fails to find a legal opcode (all registers "high" or "low"). This task has
now been moved to SystemZPostRewrite while removing the SystemZExpandPseudo
pass.

It is in fact preferred to expand these pseudos directly after register
allocation in SystemZPostRewrite since the hinted register combinations are
then not subject to later optimizations.

Review: Ulrich Weigand
https://reviews.llvm.org/D67432

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

5 years agoAMDGPU/GlobalISel: Remove illegal select tests
Matt Arsenault [Mon, 16 Sep 2019 04:21:10 +0000 (04:21 +0000)]
AMDGPU/GlobalISel: Remove illegal select tests

These fail in a release build.

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

5 years agoAMDGPU/GlobalISel: Select SMRD loads for more types
Matt Arsenault [Mon, 16 Sep 2019 00:54:07 +0000 (00:54 +0000)]
AMDGPU/GlobalISel: Select SMRD loads for more types

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

5 years agoAMDGPU/GlobalISel: RegBankSelect for kill
Matt Arsenault [Mon, 16 Sep 2019 00:48:37 +0000 (00:48 +0000)]
AMDGPU/GlobalISel: RegBankSelect for kill

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

5 years agoAMDGPU/GlobalISel: Legalize s1 source G_[SU]ITOFP
Matt Arsenault [Mon, 16 Sep 2019 00:37:10 +0000 (00:37 +0000)]
AMDGPU/GlobalISel: Legalize s1 source G_[SU]ITOFP

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

5 years agoAMDGPU/GlobalISel: Set type on vgpr live in special arguments
Matt Arsenault [Mon, 16 Sep 2019 00:33:00 +0000 (00:33 +0000)]
AMDGPU/GlobalISel: Set type on vgpr live in special arguments

Fixes assertion with workitem ID intrinsics used in non-kernel
functions.

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

5 years agoAMDGPU/GlobalISel: Select S16->S32 fptoint
Matt Arsenault [Mon, 16 Sep 2019 00:32:56 +0000 (00:32 +0000)]
AMDGPU/GlobalISel: Select S16->S32 fptoint

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

5 years agoAMDGPU/GlobalISel: Select s32->s16 G_[US]ITOFP
Matt Arsenault [Mon, 16 Sep 2019 00:29:12 +0000 (00:29 +0000)]
AMDGPU/GlobalISel: Select s32->s16 G_[US]ITOFP

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

5 years agoAMDGPU/GlobalISel: Fix VALU s16 fneg
Matt Arsenault [Mon, 16 Sep 2019 00:20:54 +0000 (00:20 +0000)]
AMDGPU/GlobalISel: Fix VALU s16 fneg

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

5 years ago[Attributor] Heap-To-Stack Conversion
Stefan Stipanovic [Sun, 15 Sep 2019 21:47:41 +0000 (21:47 +0000)]
[Attributor] Heap-To-Stack Conversion

D53362 gives a prototype heap-to-stack conversion pass. With addition of new attributes in the attributor, this can now be revisted and improved. This will place it in the Attributor to make it easier to use new attributes (eg. nofree, nosync, willreturn, etc.) and other attributor features.

Reviewers: jdoerfert, uenoku, hfinkel, efriedma

Subscribers: lebedev.ri, xbolva00, hiraditya, llvm-commits

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

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

5 years ago[InstCombine] remove unneeded one-use checks for icmp fold
Sanjay Patel [Sun, 15 Sep 2019 20:56:34 +0000 (20:56 +0000)]
[InstCombine] remove unneeded one-use checks for icmp fold

This fold and several others were added in:
rL125734
...with no explanation for the one-use checks other than the code
comments about register pressure.

Given that this is IR canonicalization, we shouldn't be worried
about register pressure though; the backend should be able to
adjust for that as needed.

There are similar checks as noted with the TODO comments. I'm
hoping to remove those restrictions too, but if any of these
does cause a regression, it should be easier to correct by making
small, individual commits.

This is part of solving PR43310 the theoretically right way:
https://bugs.llvm.org/show_bug.cgi?id=43310
...ie, if we don't cripple basic transforms, then we won't
need to add special-case code to detect larger patterns.

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

5 years ago[InstCombine] add icmp tests with extra uses; NFC
Sanjay Patel [Sun, 15 Sep 2019 20:13:27 +0000 (20:13 +0000)]
[InstCombine] add icmp tests with extra uses; NFC

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

5 years ago[PowerPC][NFC] Add a testcase for fdiv expansion.
Jinsong Ji [Sun, 15 Sep 2019 20:02:25 +0000 (20:02 +0000)]
[PowerPC][NFC] Add a testcase for fdiv expansion.

Pre-commit for following patch.

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

5 years ago[GlobalISel] findGISelOptimalMemOpLowering - remove dead initalization. NFCI.
Simon Pilgrim [Sun, 15 Sep 2019 16:56:06 +0000 (16:56 +0000)]
[GlobalISel] findGISelOptimalMemOpLowering - remove dead initalization. NFCI.

Fixes static analyzer warning that "Value stored to 'NewTySize' during its initialization is never read".

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

5 years ago[LoadStoreVectorizer] vectorizeLoadChain - ensure we find a valid Type down the load...
Simon Pilgrim [Sun, 15 Sep 2019 16:44:35 +0000 (16:44 +0000)]
[LoadStoreVectorizer] vectorizeLoadChain - ensure we find a valid Type down the load chain. NFCI.

Silence static analyzer uninitialized variable warning by setting the LoadTy to null and then asserting we find a real value.

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

5 years agoInterleavedLoadCombine - merge isa<> and dyn_cast<> duplicates. NFCI.
Simon Pilgrim [Sun, 15 Sep 2019 16:20:12 +0000 (16:20 +0000)]
InterleavedLoadCombine - merge isa<> and dyn_cast<> duplicates. NFCI.

Silence static analyzer null dereference warning of *dyn_cast<BinaryOperator> by merging with the isa<BinaryOperator> above.

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

5 years ago[DebugInfo] Don't dereference a dyn_cast<PDBSymbolData> result. NFCI.
Simon Pilgrim [Sun, 15 Sep 2019 15:38:26 +0000 (15:38 +0000)]
[DebugInfo] Don't dereference a dyn_cast<PDBSymbolData> result. NFCI.

The static analyzer is warning about a potential null dereference - but as we're in DataMemberLayoutItem we should be able to guarantee that the Symbol is a PDBSymbolData type, allowing us to use cast<PDBSymbolData> - and if not assert will fire for us.

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

5 years ago[ARM] Masked loads and stores
David Green [Sun, 15 Sep 2019 14:14:47 +0000 (14:14 +0000)]
[ARM] Masked loads and stores

Masked loads and store fit naturally with MVE, the instructions being easily
predicated. This adds lowering for the simple cases of masked loads and stores.
It does not yet deal with widening/narrowing or pre/post inc, and so is
currently behind an option.

The llvm masked load intrinsic will accept a "passthru" value, dictating the
values used for the zero masked lanes. In MVE the instructions write 0 to the
zero predicated lanes, so we need to match a passthru that isn't 0 (or undef)
with a select instruction to pull in the correct data after the load.

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

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

5 years ago[SLP] limit vectorization of Constant subclasses (PR33958)
Sanjay Patel [Sun, 15 Sep 2019 13:03:24 +0000 (13:03 +0000)]
[SLP] limit vectorization of Constant subclasses (PR33958)

This is a fix for:
https://bugs.llvm.org/show_bug.cgi?id=33958

It seems universally true that we would not want to transform this kind of
sequence on any target, but if that's not correct, then we could view this
as a target-specific cost model problem. We could also white-list ConstantInt,
ConstantFP, etc. rather than blacklist Global and ConstantExpr.

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

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

5 years ago[ARM] Simplify and update vmla test. NFC
David Green [Sun, 15 Sep 2019 11:53:05 +0000 (11:53 +0000)]
[ARM] Simplify and update vmla test. NFC

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

5 years ago[CodeEmitter] Improve testing for APInt encoding
James Molloy [Sun, 15 Sep 2019 08:44:40 +0000 (08:44 +0000)]
[CodeEmitter] Improve testing for APInt encoding

I missed Artem's comment in D67487 before committing.

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

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

5 years ago[CodeEmitter] Support instruction widths > 64 bits
James Molloy [Sun, 15 Sep 2019 08:35:08 +0000 (08:35 +0000)]
[CodeEmitter] Support instruction widths > 64 bits

Some VLIW instruction sets are Very Long Indeed. Using uint64_t constricts the Inst encoding to 64 bits (naturally).

This change switches CodeEmitter to a mode that uses APInts when Inst's bitwidth is > 64 bits (NFC for existing targets).

When Inst.BitWidth > 64 the prototype changes to:

  void TargetMCCodeEmitter::getBinaryCodeForInstr(const MCInst &MI,
                                                  SmallVectorImpl<MCFixup> &Fixups,
                                                  APInt &Inst,
                                                  APInt &Scratch,
                                                  const MCSubtargetInfo &STI);

The Inst parameter returns the encoded instruction, the Scratch parameter is used internally for manipulating operands and is exposed so that the underlying storage can be reused between calls to getBinaryCodeForInstr. The goal is to elide any APInt constructions that we can.

Similarly the operand encoding prototype changes to:

  getMachineOpValue(const MCInst &MI, const MCOperand &MO, APInt &op, SmallVectorImpl<MCFixup> &Fixups, const MCSubtargetInfo &STI);

That is, the operand is passed by reference as APInt rather than returned as uint64_t.

To reiterate, this APInt mode is enabled only when Inst.BitWidth > 64, so this change is NFC for existing targets.

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

5 years ago[TargetLowering] SimplifyDemandedBits - add EXTRACT_SUBVECTOR support.
Simon Pilgrim [Sat, 14 Sep 2019 16:38:26 +0000 (16:38 +0000)]
[TargetLowering] SimplifyDemandedBits - add EXTRACT_SUBVECTOR support.

Call SimplifyDemandedBits on the source vector.

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

5 years ago[InstSimplify] simplifyUnsignedRangeCheck(): handle few tautological cases (PR43251)
Roman Lebedev [Sat, 14 Sep 2019 13:47:27 +0000 (13:47 +0000)]
[InstSimplify] simplifyUnsignedRangeCheck(): handle few tautological cases (PR43251)

Summary:
This is split off from D67356, since these cases produce a constant,
no real need to keep them in instcombine.

Alive proofs:
https://rise4fun.com/Alive/u7Fk
https://rise4fun.com/Alive/4lV

https://bugs.llvm.org/show_bug.cgi?id=43251

Reviewers: spatel, nikic, xbolva00

Reviewed By: spatel

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

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

5 years ago[ScheduleDAGMILive] Fix typo in comment.
Mingjie Xing [Sat, 14 Sep 2019 03:27:38 +0000 (03:27 +0000)]
[ScheduleDAGMILive] Fix typo in comment.

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

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

5 years ago[Attributor][Fix] Use right type to replace expressions
Johannes Doerfert [Sat, 14 Sep 2019 02:57:50 +0000 (02:57 +0000)]
[Attributor][Fix] Use right type to replace expressions

Summary: This should be obsolete once the functionality in D66967 is integrated.

Reviewers: uenoku, sstefan1

Subscribers: hiraditya, bollu, llvm-commits

Tags: #llvm

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

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

5 years ago[llvm-objcopy] Ignore -B --binary-architecture=
Fangrui Song [Sat, 14 Sep 2019 01:36:31 +0000 (01:36 +0000)]
[llvm-objcopy] Ignore -B --binary-architecture=

GNU objcopy documents that -B is only useful with architecture-less
input (i.e. "binary" or "ihex"). After D67144, -O defaults to -I, and
-B is essentially a NOP.

* If -O is binary/ihex, GNU objcopy ignores -B.
* If -O is elf*, -B provides the e_machine field in GNU objcopy.

So to convert a blob to an ELF, `-I binary -B i386:x86-64 -O elf64-x86-64` has to be specified.

`-I binary -B i386:x86-64 -O elf64-x86-64` creates an ELF with its
e_machine field set to EM_NONE in GNU objcopy, but a regular x86_64 ELF
in elftoolchain elfcopy. Follow the elftoolchain approach (ignoring -B)
to simplify code. Users that expect their command line portable should
specify -B.

Reviewed By: jhenderson

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

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

5 years ago[llvm-objcopy] Default --output-target to --input-target when unspecified
Fangrui Song [Sat, 14 Sep 2019 01:36:16 +0000 (01:36 +0000)]
[llvm-objcopy] Default --output-target to --input-target when unspecified

Fixes PR42171.

In GNU objcopy, if -O (--output-target) is not specified, the value is
copied from -I (--input-target).

```
objcopy -I binary -B i386:x86-64 a.txt b       # b is copied from a.txt
llvm-objcopy -I binary -B i386:x86-64 a.txt b  # b is an x86-64 object file
```

This patch changes our behavior to match GNU. With this change, we can
delete code related to -B handling (D67215).

Reviewed By: jakehehrlich

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

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

5 years ago[llvm-ar] Uncapitalize error messages and delete full stop
Fangrui Song [Sat, 14 Sep 2019 01:18:47 +0000 (01:18 +0000)]
[llvm-ar] Uncapitalize error messages and delete full stop

Most GNU binutils don't append full stops in error messages. This
convention has been adopted by a bunch of LLVM binary utilities. Make
llvm-ar follow the convention as well.

Reviewed By: grimar

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

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

5 years ago[llvm-objcopy] Add support for response files in llvm-strip and llvm-objcopy
Michael Pozulp [Sat, 14 Sep 2019 01:14:43 +0000 (01:14 +0000)]
[llvm-objcopy] Add support for response files in llvm-strip and llvm-objcopy

Summary: Addresses https://bugs.llvm.org/show_bug.cgi?id=42671

Reviewers: jhenderson, espindola, alexshap, rupprecht

Reviewed By: jhenderson

Subscribers: seiya, emaste, arichardson, jakehehrlich, MaskRay, abrachet, llvm-commits

Tags: #llvm

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

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

5 years agoBugpoint: Remove some unnecessary c_str conversions on the journey to StringRef
David Blaikie [Sat, 14 Sep 2019 00:32:13 +0000 (00:32 +0000)]
Bugpoint: Remove some unnecessary c_str conversions on the journey to StringRef

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

5 years ago[Reproducer] Add reproducer dump command.
Jonas Devlieghere [Fri, 13 Sep 2019 23:27:31 +0000 (23:27 +0000)]
[Reproducer] Add reproducer dump command.

This adds a reproducer dump commands which makes it possible to inspect
a reproducer from inside LLDB. Currently it supports the Files, Commands
and Version providers. I'm planning to add support for the GDB Remote
provider in a follow-up patch.

Differential revision: https://reviews.llvm.org/D67474

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

5 years ago[WebAssembly] Narrowing and widening SIMD ops
Thomas Lively [Fri, 13 Sep 2019 22:54:41 +0000 (22:54 +0000)]
[WebAssembly] Narrowing and widening SIMD ops

Summary:
Implements target-specific LLVM intrinsics and clang builtins for
these new SIMD operations, as described at https://github.com/WebAssembly/simd/blob/master/proposals/simd/SIMD.md#integer-to-integer-narrowing.

Reviewers: aheejin

Subscribers: dschuff, sbc100, jgravelle-google, hiraditya, sunfish, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

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

5 years ago[GlobalISel] Fix insertion point of new instructions to be after PHIs.
Amara Emerson [Fri, 13 Sep 2019 21:49:24 +0000 (21:49 +0000)]
[GlobalISel] Fix insertion point of new instructions to be after PHIs.

For some reason we sometimes insert new instructions one instruction before
the first non-PHI when legalizing. This can result in having non-PHI
instructions before PHIs, which mean that PHI elimination doesn't catch them.

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

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

5 years ago[NFC][libLTO] Rearrange declaration in lto.h
Steven Wu [Fri, 13 Sep 2019 21:19:12 +0000 (21:19 +0000)]
[NFC][libLTO] Rearrange declaration in lto.h

Summary:
Rearrange the function declaration in lto.h so they falls in the correct
doxygen group.

Reviewers: tejohnson, bd1976llvm, deadalnix

Reviewed By: tejohnson

Subscribers: mehdi_amini, inglorion, jkorous, dexonsmith, ributzka, llvm-commits

Tags: #llvm

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

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

5 years agoAdd dependency from Orc to Passes
Sanjoy Das [Fri, 13 Sep 2019 21:07:56 +0000 (21:07 +0000)]
Add dependency from Orc to Passes

Summary: Orc uses registerFunctionAnalyses that's defined in Passes.

Reviewers: dblaikie

Subscribers: mcrosier, bixia, llvm-commits

Tags: #llvm

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

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

5 years ago[llvm-opt-report] Improve error handling
Francis Visoiu Mistrih [Fri, 13 Sep 2019 20:52:04 +0000 (20:52 +0000)]
[llvm-opt-report] Improve error handling

* std::move the error extracted from the parsing creation to avoid asserts
* print a newline after the error message
* create the parser from the metadata

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

5 years ago[AArch64][GlobalISel] Tail call memory intrinsics
Jessica Paquette [Fri, 13 Sep 2019 20:25:58 +0000 (20:25 +0000)]
[AArch64][GlobalISel] Tail call memory intrinsics

Because memory intrinsics are handled differently than other calls, we need to
check them for tail call eligiblity in the legalizer. This allows us to still
inline them when it's beneficial to do so, but also tail call when possible.

This adds simple tail calling support for when the intrinsic is followed by a
return.

It ports the attribute checks from `TargetLowering::isInTailCallPosition` into
a similarly-named function in LegalizerHelper.cpp. The target-specific
`isUsedByReturnOnly` hook is not ported here.

Update tailcall-mem-intrinsics.ll to show that GlobalISel can now tail call
memory intrinsics.

Update legalize-memcpy-et-al.mir to have a case where we don't tail call.

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

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

5 years ago[Support] Add overload writeFileAtomically(std::function Writer)
Jan Korous [Fri, 13 Sep 2019 20:08:27 +0000 (20:08 +0000)]
[Support] Add overload writeFileAtomically(std::function Writer)

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

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

5 years ago[Docs] Bug fix for reference to nonexistent document
DeForest Richards [Fri, 13 Sep 2019 20:05:57 +0000 (20:05 +0000)]
[Docs] Bug fix for reference to nonexistent document

This commit fixes a bug in which the toctree contained a reference to a non-existent document.

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

5 years ago[FPEnv] Document that constrained FP intrinsics cannot be mixed with non-constrained
Kevin P. Neal [Fri, 13 Sep 2019 19:36:19 +0000 (19:36 +0000)]
[FPEnv] Document that constrained FP intrinsics cannot be mixed with non-constrained

Reviewed by: andrew.w.kaylor, cameron.mcinally, uweigand
Approved by: andrew.w.kaylor
Differential Revision: https://reviews.llvm.org/D67360

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

5 years ago[aarch64] move custom isel of extract_vector_elt to td file - NFC
Sebastian Pop [Fri, 13 Sep 2019 19:28:30 +0000 (19:28 +0000)]
[aarch64] move custom isel of extract_vector_elt to td file - NFC

In preparation for def-pat selection of dot product instructions,
this patch moves the custom instruction selection of extract_vector_elt
to the td file. Without this change it is impossible to catch a pattern that
starts with an extract_vector_elt: the custom cpp code is executed first
ahead of the patterns in the td files that are only executed at the end of
the switch statement in SelectCode(Node).

With this patch applied, it becomes possible to select a different pattern
that starts with extract_vector_elt by selecting a higher complexity than
this pattern.

The patch has been tested on aarch64-linux with make check-all.

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

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

5 years agoAArch64: fix EXPENSIVE_CHECKS for arm64_32.
Tim Northover [Fri, 13 Sep 2019 18:55:38 +0000 (18:55 +0000)]
AArch64: fix EXPENSIVE_CHECKS for arm64_32.

For some reason I'd decided to mark the end-result of a GOT load as
dead. It's clearly not (necessarily).

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

5 years ago[SLP] add test for vectorization of constant expressions; NFC
Sanjay Patel [Fri, 13 Sep 2019 18:33:02 +0000 (18:33 +0000)]
[SLP] add test for vectorization of constant expressions; NFC

Goes with D67362.

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

5 years ago[NFC][InstSimplify] Add some more tests for D67498/D67502
Roman Lebedev [Fri, 13 Sep 2019 17:58:24 +0000 (17:58 +0000)]
[NFC][InstSimplify] Add some more tests for D67498/D67502

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

5 years agoRevert for: [AMDGPU]: PHI Elimination hooks added for custom COPY insertion.
Alexander Timofeev [Fri, 13 Sep 2019 17:37:30 +0000 (17:37 +0000)]
Revert for: [AMDGPU]: PHI Elimination hooks added for custom COPY insertion.

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

5 years ago[Remarks][NFC] Forward declare ParsedStringTable
Francis Visoiu Mistrih [Fri, 13 Sep 2019 17:27:28 +0000 (17:27 +0000)]
[Remarks][NFC] Forward declare ParsedStringTable

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

5 years ago[Remarks][NFC] Use StringLiteral for magic numbers
Francis Visoiu Mistrih [Fri, 13 Sep 2019 16:46:23 +0000 (16:46 +0000)]
[Remarks][NFC] Use StringLiteral for magic numbers

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

5 years ago[AArch64][GlobalISel] Add support for sibcalling callees with varargs
Jessica Paquette [Fri, 13 Sep 2019 16:10:19 +0000 (16:10 +0000)]
[AArch64][GlobalISel] Add support for sibcalling callees with varargs

This adds support for tail calling callees with varargs, equivalent to how it
is done in AArch64ISelLowering.

This only works for sibling calls, and does not add the necessary support for
musttail with varargs. (See r345641 for equivalent ISelLowering support.) This
should be implemented when we stop falling back on musttail.

Update call-translator-tail-call.ll to show that we can now tail call varargs.

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

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

5 years ago[yaml2obj/ObjectYAML] - Cleanup the error reporting API, add custom errors handlers.
George Rimar [Fri, 13 Sep 2019 16:00:16 +0000 (16:00 +0000)]
[yaml2obj/ObjectYAML] - Cleanup the error reporting API, add custom errors handlers.

This is a continuation of the YAML library error reporting
refactoring/improvement and the idea by itself was mentioned
in the following thread:
https://reviews.llvm.org/D67182?id=218714#inline-603404

This performs a cleanup of all object emitters in the library.
It allows using the custom one provided by the caller.

One of the nice things is that each tool can now print its tool name,
e.g: "yaml2obj: error: <text>"

Also, the code became a bit simpler.

Differential revision: https://reviews.llvm.org/D67445

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

5 years ago[docs][llvm-readelf][llvm-readobj] Improve --stack-sizes documentation
James Henderson [Fri, 13 Sep 2019 15:01:39 +0000 (15:01 +0000)]
[docs][llvm-readelf][llvm-readobj] Improve --stack-sizes documentation

llvm-readobj's document was missing --stack-sizes entirely from its
document, so this patch adds it. It also adds a note to the llvm-readelf
description that the switch is only implemented for GNU style output
currently. For reference, --stack-sizes was added in r367942.

Reviewed by: MaskRay

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

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

5 years ago[X86] Use incDecVectorConstant to simplify the min/max code in LowerVSETCC.
Craig Topper [Fri, 13 Sep 2019 14:59:08 +0000 (14:59 +0000)]
[X86] Use incDecVectorConstant to simplify the min/max code in LowerVSETCC.

incDecVectorConstant is used for a similar reason in LowerVSETCCWithSUBUS
so we might as well share the code.

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

5 years agoFix a few spellos in docs.
Nico Weber [Fri, 13 Sep 2019 14:58:24 +0000 (14:58 +0000)]
Fix a few spellos in docs.

(Trying to debug an incremental build thing on a bot...)

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

5 years agogn build: pacify "gn format" after 371102
Nico Weber [Fri, 13 Sep 2019 14:35:20 +0000 (14:35 +0000)]
gn build: pacify "gn format" after 371102

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

5 years ago[PowerPC][NFC] Move codegen tests to PowerPC from MIR/PowerPC
Jinsong Ji [Fri, 13 Sep 2019 14:18:36 +0000 (14:18 +0000)]
[PowerPC][NFC] Move codegen tests to PowerPC from MIR/PowerPC

All tests with -run-pass !=none should not in MIR/, See MIR/README.

```
Tests for codegen passes should NOT be here but in
test/CodeGen/sometarget. As
a rule of thumb this directory should only contain tests using
'llc -run-pass none'.
```

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

5 years ago[ADT] Remove a workaround for old versions of clang
Benjamin Kramer [Fri, 13 Sep 2019 13:47:49 +0000 (13:47 +0000)]
[ADT] Remove a workaround for old versions of clang

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

5 years ago[docs][llvm-objcopy][llvm-strip] Improve --strip-unneeded description
James Henderson [Fri, 13 Sep 2019 13:26:52 +0000 (13:26 +0000)]
[docs][llvm-objcopy][llvm-strip] Improve --strip-unneeded description

Behaviour was recently added to this switch to strip debug sections too.
See r369761.

This change also makes the description for the --strip-unneeded switch
consistent between the two docs.

Reviewed by: MaskRay

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

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

5 years agogn build: (manually) merge r371834, take 2
Nico Weber [Fri, 13 Sep 2019 13:07:54 +0000 (13:07 +0000)]
gn build: (manually) merge r371834, take 2

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

5 years agoRevert "gn build: (manually) merge r371834"
Nico Weber [Fri, 13 Sep 2019 13:04:59 +0000 (13:04 +0000)]
Revert "gn build: (manually) merge r371834"

This reverts commit abc7e2b6004cd693cf3b6dedbc7908e099c7ac6a.
The commit was incomplete. I'll revert and reland the full commit,
so that the correct change is a single commit.

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

5 years agogn build: (manually) merge r371834
Nico Weber [Fri, 13 Sep 2019 12:59:06 +0000 (12:59 +0000)]
gn build: (manually) merge r371834

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

5 years agogn build: Merge r371822
Nico Weber [Fri, 13 Sep 2019 12:58:58 +0000 (12:58 +0000)]
gn build: Merge r371822

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

5 years agogn build: (manually) merge r371787
Nico Weber [Fri, 13 Sep 2019 12:58:52 +0000 (12:58 +0000)]
gn build: (manually) merge r371787

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

5 years ago[ADT] Make DenseMap use allocate_buffer
Benjamin Kramer [Fri, 13 Sep 2019 12:32:40 +0000 (12:32 +0000)]
[ADT] Make DenseMap use allocate_buffer

This unlocks some goodies like sized deletion and gets the alignment
right on platforms that chose to provide a lower default new alignment.

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

5 years ago[llvm-size] Fix spelling errors (Berkely -> Berkeley)
James Henderson [Fri, 13 Sep 2019 12:00:42 +0000 (12:00 +0000)]
[llvm-size] Fix spelling errors (Berkely -> Berkeley)

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

5 years ago[Orc] Roll back ThreadPool to std::function
Benjamin Kramer [Fri, 13 Sep 2019 11:59:51 +0000 (11:59 +0000)]
[Orc] Roll back ThreadPool to std::function

MSVC doesn't allow move-only types in std::packaged_task. Boo.

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

5 years ago[Orc] Address the remaining move-capture FIXMEs
Benjamin Kramer [Fri, 13 Sep 2019 11:35:33 +0000 (11:35 +0000)]
[Orc] Address the remaining move-capture FIXMEs

This required spreading unique_function a bit more, which I think is a
good thing.

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

5 years ago[X86] negateFMAOpcode - extend to support FMADDSUB/FMSUBADD and output negation....
Simon Pilgrim [Fri, 13 Sep 2019 11:22:40 +0000 (11:22 +0000)]
[X86] negateFMAOpcode - extend to support FMADDSUB/FMSUBADD and output negation. NFCI.

Some prep work for PR42863, this change allows us to move all the FMA opcode mappings into the negateFMAOpcode helper.

For the FMADDSUB/FMSUBADD cases, we can only negate the accumulator - any other negations will result in an error.

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

5 years ago[ARM] Add earlyclobber for cross beat MVE instructions
David Green [Fri, 13 Sep 2019 11:20:17 +0000 (11:20 +0000)]
[ARM] Add earlyclobber for cross beat MVE instructions

rL367544 added @earlyclobbers for the MVE VREV64 instruction. This adds the
same for a number of other 32bit instructions that are similarly unpredictable
if the destination equals the source (due to the cross beat nature of the
instructions).
This includes:
  VCADD.f32
  VCADD.i32
  VCMUL.f32
  VHCADD.s32
  VMULLT/B.s/u32
  VQDMLADH{X}.s32
  VQRDMLADH{X}.s32
  VQDMLSDH{X}.s32
  VQRDMLSDH{X}.s32
  VQDMULLT/B.s32 with Qm and Rm

No tests here as this would require intrinsics (or very interesting codegen) to
manifest. The tests will follow naturally as the intrinsics are added.

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

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

5 years ago[Clang Interpreter] Initial patch for the constexpr interpreter
Nandor Licker [Fri, 13 Sep 2019 09:46:16 +0000 (09:46 +0000)]
[Clang Interpreter] Initial patch for the constexpr interpreter

Summary:
This patch introduces the skeleton of the constexpr interpreter,
capable of evaluating a simple constexpr functions consisting of
if statements. The interpreter is described in more detail in the
RFC. Further patches will add more features.

Reviewers: Bigcheese, jfb, rsmith

Subscribers: bruno, uenoku, ldionne, Tyker, thegameg, tschuett, dexonsmith, mgorny, cfe-commits

Tags: #clang

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

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

5 years ago[AArch64] More @llvm.fma.f16 tests
Sjoerd Meijer [Fri, 13 Sep 2019 09:44:13 +0000 (09:44 +0000)]
[AArch64] More @llvm.fma.f16 tests

Follow up of rL371321 that added FMA FP16 patterns. This adds more tests
for @llvm.fma.f16. This probably shows we miss one fmsub optimisation
opportunity, which I will look into.

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

5 years ago[Alignment] Introduce llvm::Align to MCSection
Guillaume Chatelet [Fri, 13 Sep 2019 09:29:59 +0000 (09:29 +0000)]
[Alignment] Introduce llvm::Align to MCSection

Summary:
This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet, JDevlieghere

Subscribers: arsenm, sdardis, jvesely, nhaehnle, sbc100, hiraditya, aheejin, jrtc27, atanasyan, llvm-commits

Tags: #llvm

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

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

5 years ago[lib/ObjectYAML] - Change interface to return `bool` instead of `int`. NFCI
George Rimar [Fri, 13 Sep 2019 09:12:38 +0000 (09:12 +0000)]
[lib/ObjectYAML] - Change interface to return `bool` instead of `int`. NFCI

It was suggested in comments for D67445 to split this part.

Differential revision: https://reviews.llvm.org/D67488

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

5 years ago[ARM] Add support for MVE vmaxv and vminv
Sam Tebbs [Fri, 13 Sep 2019 09:11:46 +0000 (09:11 +0000)]
[ARM] Add support for MVE vmaxv and vminv

This patch adds vecreduce_smax, vecredude_umax, vecreduce_smin, vecreduce_umin and selection for vmaxv and minv.

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

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