]> granicus.if.org Git - llvm/log
llvm
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

5 years ago[llvm-objdump] Fix llvm-objdump --all-headers output order
George Rimar [Fri, 13 Sep 2019 08:56:28 +0000 (08:56 +0000)]
[llvm-objdump] Fix llvm-objdump --all-headers output order

Patch by Justice Adams!

Made llvm-objdump --all-headers output match the order of GNU objdump for compatibility reasons.

Old order of the headers output:
* file header
* section header table
* symbol table
* program header table
* dynamic section

New order of the headers output (GNU compatible):
* file header information
* program header table
* dynamic section
* section header table
* symbol table

(Relevant BugZilla Bug: https://bugs.llvm.org/show_bug.cgi?id=41830)

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

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

5 years agoRevert "Fix test failures after r371640"
Dmitri Gribenko [Fri, 13 Sep 2019 08:26:59 +0000 (08:26 +0000)]
Revert "Fix test failures after r371640"

This reverts commit r371645, because r371640 was reverted.

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

5 years ago[BasicBlockUtils] Add optional BBName argument, in line with BB:splitBasicBlock
Florian Hahn [Fri, 13 Sep 2019 08:03:32 +0000 (08:03 +0000)]
[BasicBlockUtils] Add optional BBName argument, in line with BB:splitBasicBlock

Reviewers: spatel, asbirlea, craig.topper

Reviewed By: asbirlea

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

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

5 years ago[AArch64] MachineCombiner FMA matching. NFC.
Sjoerd Meijer [Fri, 13 Sep 2019 07:38:54 +0000 (07:38 +0000)]
[AArch64] MachineCombiner FMA matching. NFC.

Follow-up of rL371321 that added some more FP16 FMA patterns, and an attempt to
reduce the copy-pasting and make this more readable.

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

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

5 years ago[TargetRegisterInfo] Remove SVT argument from getCommonSubClass.
Craig Topper [Fri, 13 Sep 2019 05:24:37 +0000 (05:24 +0000)]
[TargetRegisterInfo] Remove SVT argument from getCommonSubClass.

This was added to support fp128 on x86-64, but appears to be
unneeded now. This may be because the FR128 register class
added back then was merged with the VR128 register class later.

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

5 years agoAMDGPU/GlobalISel: Fix assert on multi-return side effect intrinsics
Matt Arsenault [Fri, 13 Sep 2019 04:12:12 +0000 (04:12 +0000)]
AMDGPU/GlobalISel: Fix assert on multi-return side effect intrinsics

llvm.amdgcn.else hits this.

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

5 years agoAMDGPU/GlobalISel: Legalize s32->s16 G_SITOFP/G_UITOFP
Matt Arsenault [Fri, 13 Sep 2019 04:04:55 +0000 (04:04 +0000)]
AMDGPU/GlobalISel: Legalize s32->s16 G_SITOFP/G_UITOFP

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

5 years ago[RISCV] Support stack offset exceed 32-bit for RV64
Shiva Chen [Fri, 13 Sep 2019 04:03:32 +0000 (04:03 +0000)]
[RISCV] Support stack offset exceed 32-bit for RV64

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

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

5 years agoRevert "[RISCV] Support stack offset exceed 32-bit for RV64"
Shiva Chen [Fri, 13 Sep 2019 04:03:24 +0000 (04:03 +0000)]
Revert "[RISCV] Support stack offset exceed 32-bit for RV64"

This reverts commit 1c340c62058d4115d21e5fa1ce3a0d094d28c792.

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

5 years agoAMDGPU/GlobalISel: Fix RegBankSelect for amdgcn.else
Matt Arsenault [Fri, 13 Sep 2019 03:55:49 +0000 (03:55 +0000)]
AMDGPU/GlobalISel: Fix RegBankSelect for amdgcn.else

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

5 years agoAMDGPU/GlobalISel: Select 16-bit VALU bit ops
Matt Arsenault [Fri, 13 Sep 2019 03:55:43 +0000 (03:55 +0000)]
AMDGPU/GlobalISel: Select 16-bit VALU bit ops

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

5 years ago[RISCV] Support stack offset exceed 32-bit for RV64
Shiva Chen [Fri, 13 Sep 2019 02:50:13 +0000 (02:50 +0000)]
[RISCV] Support stack offset exceed 32-bit for RV64

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

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

5 years agoAMDGPU/GlobalISel: Legalize G_FFLOOR
Matt Arsenault [Fri, 13 Sep 2019 01:48:15 +0000 (01:48 +0000)]
AMDGPU/GlobalISel: Legalize G_FFLOOR

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

5 years agoTemporarily revert r371640 "LiveIntervals: Split live intervals on multiple dead...
Tim Shen [Fri, 13 Sep 2019 01:34:25 +0000 (01:34 +0000)]
Temporarily revert r371640 "LiveIntervals: Split live intervals on multiple dead defs".

It reveals a miscompile on Hexagon. See PR43302 for details.

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

5 years agoAMDGPU/GlobalISel: Legalize G_FMAD
Matt Arsenault [Fri, 13 Sep 2019 00:44:35 +0000 (00:44 +0000)]
AMDGPU/GlobalISel: Legalize G_FMAD

Unlike SelectionDAG, treat this as a normally legalizable operation.
In SelectionDAG this is supposed to only ever formed if it's legal,
but I've found that to be restricting. For AMDGPU this is contextually
legal depending on whether denormal flushing is allowed in the use
function.

Technically we currently treat the denormal mode as a subtarget
feature, so custom lowering could be avoided. However I consider this
to be a defect, and this should be contextually dependent on the
controllable rounding mode of the parent function.

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

5 years agoAMDGPU/GlobalISel: Select G_CTPOP
Matt Arsenault [Fri, 13 Sep 2019 00:11:20 +0000 (00:11 +0000)]
AMDGPU/GlobalISel: Select G_CTPOP

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

5 years agoDAG/GlobalISel: Correct type profile of bitcount ops
Matt Arsenault [Fri, 13 Sep 2019 00:11:14 +0000 (00:11 +0000)]
DAG/GlobalISel: Correct type profile of bitcount ops

The result integer does not need to be the same width as the input.
AMDGPU, NVPTX, and Hexagon all have patterns working around the types
matching. GlobalISel defines these as being different type indexes.

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

5 years agoAMDGPU: Add immarg to llvm.amdgcn.init.exec.from.input
Matt Arsenault [Thu, 12 Sep 2019 23:46:54 +0000 (23:46 +0000)]
AMDGPU: Add immarg to llvm.amdgcn.init.exec.from.input

As far as I can tell this has to be a constant.

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

5 years agoLiveIntervals: Remove assertion
Matt Arsenault [Thu, 12 Sep 2019 23:46:51 +0000 (23:46 +0000)]
LiveIntervals: Remove assertion

This testcase is invalid, and caught by the verifier. For the verifier
to catch it, the live interval computation needs to complete. Remove
the assert so the verifier catches this, which is less confusing.

In this testcase there is an undefined use of a subregister, and lanes
which aren't used or defined. An equivalent testcase with the
super-register shrunk to have no untouched lanes already hit this
verifier error.

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

5 years agoAMDGPU: Inline constant when materalizing FI with add on gfx9
Matt Arsenault [Thu, 12 Sep 2019 23:46:46 +0000 (23:46 +0000)]
AMDGPU: Inline constant when materalizing FI with add on gfx9

This was relying on the SGPR usable for the carry out clobber to also
be used for the input. There was no carry out on gfx9. With no carry
out clobber to worry about, so the literal can just be directly used
with a VOP2 add.

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

5 years ago[Test] Restructure check lines to show differences between modes more clearly
Philip Reames [Thu, 12 Sep 2019 23:22:37 +0000 (23:22 +0000)]
[Test] Restructure check lines to show differences between modes more clearly

With the landing of the previous patch (in particular D66318) there are a lot fewer diffs now.  I added an experimental O0 line, and updated all the tests to group experimental and non-experimental O0/O3 together.

Skimming the remaining diffs, there's only a few which are obviously incorrect.  There's a large number which are questionable, so more todo.

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

5 years agoRename nonvolatile_load/store to simple_load/store [NFC]
Philip Reames [Thu, 12 Sep 2019 23:03:39 +0000 (23:03 +0000)]
Rename nonvolatile_load/store to simple_load/store [NFC]

Implement the TODO from D66318.

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

5 years ago[AArch64][GlobalISel] Support tail calling with swiftself parameters
Jessica Paquette [Thu, 12 Sep 2019 23:00:59 +0000 (23:00 +0000)]
[AArch64][GlobalISel] Support tail calling with swiftself parameters

Swiftself uses a callee-saved register. We can tail call when the register used
in the caller and callee is the same.

This behaviour is equivalent to that in `TargetLowering::parametersInCSRMatch`.

Update call-translator-tail-call.ll to verify that we can do this. When we
support inline assembly, we can write a check similar to the one in the
general swiftself.ll. For now, we need to verify that we get the correct COPY
instruction after call lowering.

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

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

5 years ago[SDAG] Update generic code to conservatively check for isAtomic in addition to isVolatile
Philip Reames [Thu, 12 Sep 2019 22:49:17 +0000 (22:49 +0000)]
[SDAG] Update generic code to conservatively check for isAtomic in addition to isVolatile

This is the first sweep of generic code to add isAtomic bailouts where appropriate. The intention here is to have the switch from AtomicSDNode to LoadSDNode/StoreSDNode be close to NFC; that is, I'm not looking to allow additional optimizations at this time. That will come later.  See D66309 for context.

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

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

5 years ago[NFC] Fix file header filename to be Range.h
Greg Clayton [Thu, 12 Sep 2019 22:23:03 +0000 (22:23 +0000)]
[NFC] Fix file header filename to be Range.h

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

5 years ago[Docs] Adds page for reference docs
DeForest Richards [Thu, 12 Sep 2019 22:17:04 +0000 (22:17 +0000)]
[Docs] Adds page for reference docs

Adds a Reference Documentation page for LLVM and API reference documentation.

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

5 years ago[AArch64][GlobalISel] Support sibling calls with outgoing arguments
Jessica Paquette [Thu, 12 Sep 2019 22:10:36 +0000 (22:10 +0000)]
[AArch64][GlobalISel] Support sibling calls with outgoing arguments

This adds support for lowering sibling calls with outgoing arguments.

e.g

```
define void @foo(i32 %a)
```

Support is ported from AArch64ISelLowering's `isEligibleForTailCallOptimization`.
The only thing that is missing is a full port of
`TargetLowering::parametersInCSRMatch`. So, if we're using swiftself,
we'll never tail call.

- Rename `analyzeCallResult` to `analyzeArgInfo`, since the function is now used
  for both outgoing and incoming arguments
- Teach `OutgoingArgHandler` about tail calls. Tail calls use frame indices for
  stack arguments.
- Teach `lowerFormalArguments` to set the bytes in the caller's stack argument
  area. This is used later to check if the tail call's parameters will fit on
  the caller's stack.
- Add `areCalleeOutgoingArgsTailCallable` to perform the eligibility check on
  the callee's outgoing arguments.

For testing:

- Update call-translator-tail-call to verify that we can now tail call with
  outgoing arguments, use G_FRAME_INDEX for stack arguments, and respect the
  size of the caller's stack
- Remove GISel-specific check lines from speculation-hardening.ll, since GISel
  now tail calls like the other selectors
- Add a GISel test line to tailcall-string-rvo.ll since we can tail call in that
  test now
- Add a GISel test line to tailcall_misched_graph.ll since we tail call there
  now. Add specific check lines for GISel, since the debug output from the
  machine-scheduler differs with GlobalISel. The dependency still holds, but
  the output comes out in a different order.

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

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

5 years ago[PowerPC] Remove the SPE4RC register class and instead add f32 to the GPRC register...
Craig Topper [Thu, 12 Sep 2019 22:07:35 +0000 (22:07 +0000)]
[PowerPC] Remove the SPE4RC register class and instead add f32 to the GPRC register class.

Summary:
Since the SPE4RC register class contains an identical set of registers
and an identical spill size to the GPRC class its slightly confusing
the tablegen emitter. It's preventing the GPRC_and_GPRC_NOR0 synthesized
register class from inheriting VTs and AltOrders from GPRC or GPRC_NOR0.
This is because SPE4C is found first in the super register class list
when inheriting these properties and it doesn't set the VTs or
AltOrders the same way as GPRC or GPRC_NOR0.

This patch replaces all uses of GPE4RC with GPRC and allows GPRC and
GPRC_NOR0 to contain f32.

The test changes here are because the AltOrders are being inherited
to GPRC_NOR0 now.

Found while trying to determine if getCommonSubClass needs to take
a VT argument. It was originally added to support fp128 on x86-64,
I've changed some things about that so that it might be needed
anymore. But a PowerPC test crashed without it and I think its
due to this subclass issue.

Reviewers: jhibbits, nemanjai, kbarton, hfinkel

Subscribers: wuzish, nemanjai, mehdi_amini, hiraditya, kbarton, MaskRay, dexonsmith, jsji, shchenz, steven.zhang, llvm-commits

Tags: #llvm

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

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

5 years agoRemove a duplicate test
Philip Reames [Thu, 12 Sep 2019 21:40:15 +0000 (21:40 +0000)]
Remove a duplicate test

Turns out I'd already added exactly the same test under the name non_unit_stride.

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

5 years ago[SCEV] Add smin support to getRangeRef
Philip Reames [Thu, 12 Sep 2019 21:32:27 +0000 (21:32 +0000)]
[SCEV] Add smin support to getRangeRef

We were failing to compute trip counts (both exact and maximum) for any loop which involved a comparison against either an umin or smin. It looks like this simply got missed when we added smin/umin to SCEV.  (Note: umin was submitted separately earlier today.  Turned out two folks hit this at the same time.)

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

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

5 years ago[DAGCombiner][X86] Pass the CmpOpVT to reduceSelectOfFPConstantLoads so X86 can exclu...
Craig Topper [Thu, 12 Sep 2019 21:30:18 +0000 (21:30 +0000)]
[DAGCombiner][X86] Pass the CmpOpVT to reduceSelectOfFPConstantLoads so X86 can exclude fp128 compares.

The X86 decision assumes the compare will produce a result in an XMM
register, but that can't happen for an fp128 compare since those
go to a libcall the returns an i32. Pass the VT so X86 can check
the type.

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

5 years ago[ConstantFolding] Expand folding of some library functions
Evandro Menezes [Thu, 12 Sep 2019 21:23:22 +0000 (21:23 +0000)]
[ConstantFolding] Expand folding of some library functions

Expanding the folding of `nearbyint()`, `rint()` and `trunc()` to library
functions, in addition to the current support for intrinsics.

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

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

5 years agoFix llvm-reduce tests so that they don't assume the source code is
Tim Shen [Thu, 12 Sep 2019 21:03:49 +0000 (21:03 +0000)]
Fix llvm-reduce tests so that they don't assume the source code is
writable.

Instead of copying over the original file permissions, just create
a new file and add the executable bit.

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

5 years ago[SelectionDAGBuilder] Simplify loop in visitSelect back to how it was before r255558.
Craig Topper [Thu, 12 Sep 2019 21:00:32 +0000 (21:00 +0000)]
[SelectionDAGBuilder] Simplify loop in visitSelect back to how it was before r255558.

This code was changed to accomodate fp128 being softened to itself
during type legalization on x86-64. This was done in order to create
libcalls while having fp128 as a legal type. We're now doing the
libcall creation during LegalizeDAG and the type legalization changes
to enable the old behavior have been removed. So this change to
SelectionDAGBuilder is no longer needed.

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

5 years ago[X86] Move negateFMAOpcode helper earlier to help future patch. NFCI.
Simon Pilgrim [Thu, 12 Sep 2019 20:39:56 +0000 (20:39 +0000)]
[X86] Move negateFMAOpcode helper earlier to help future patch. NFCI.

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

5 years ago[LV] Update test case after r371768.
Florian Hahn [Thu, 12 Sep 2019 20:07:17 +0000 (20:07 +0000)]
[LV] Update test case after r371768.

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

5 years ago[SCEV] Support SCEVUMinExpr in getRangeRef.
Florian Hahn [Thu, 12 Sep 2019 20:03:32 +0000 (20:03 +0000)]
[SCEV] Support SCEVUMinExpr in getRangeRef.

This patch adds support for SCEVUMinExpr to getRangeRef,
similar to the support for SCEVUMaxExpr.

Reviewers: sanjoy.google, efriedma, reames, nikic

Reviewed By: sanjoy.google

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

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

5 years agollvm-reduce: For now, mark these tests as requiring a shell
David Blaikie [Thu, 12 Sep 2019 19:50:54 +0000 (19:50 +0000)]
llvm-reduce: For now, mark these tests as requiring a shell

(since they execute shell scripts/that's the only entry point at the
moment)

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

5 years agoPrecommit tests for D67514
Philip Reames [Thu, 12 Sep 2019 19:34:27 +0000 (19:34 +0000)]
Precommit tests for D67514

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

5 years agoAMDGPU: Fix bug in r371671 on some builds.
Austin Kerbow [Thu, 12 Sep 2019 19:12:21 +0000 (19:12 +0000)]
AMDGPU: Fix bug in r371671 on some builds.

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

5 years agollvm-reduce: Remove unused plugin support/requirements
David Blaikie [Thu, 12 Sep 2019 18:52:31 +0000 (18:52 +0000)]
llvm-reduce: Remove unused plugin support/requirements

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

5 years ago[LICM/AST] Check if the AliasAny set is removed from the tracker.
Alina Sbirlea [Thu, 12 Sep 2019 18:09:47 +0000 (18:09 +0000)]
[LICM/AST] Check if the AliasAny set is removed from the tracker.

Summary:
Resolves PR38513.
Credit to @bjope for debugging this.

Reviewers: hfinkel, uabelho, bjope

Subscribers: sanjoy.google, bjope, llvm-commits

Tags: #llvm

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

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

5 years ago[InstCombine] add tests for fptrunc; NFC
Sanjay Patel [Thu, 12 Sep 2019 18:00:11 +0000 (18:00 +0000)]
[InstCombine] add tests for fptrunc; NFC

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

5 years ago[MemorySSA] Pass (for update) MSSAU when hoisting instructions.
Alina Sbirlea [Thu, 12 Sep 2019 17:12:51 +0000 (17:12 +0000)]
[MemorySSA] Pass (for update) MSSAU when hoisting instructions.

Summary: Pass MSSAU to makeLoopInvariant in order to properly update MSSA.

Reviewers: george.burgess.iv

Subscribers: Prazek, sanjoy.google, uabelho, llvm-commits

Tags: #llvm

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

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

5 years agoPrecommit tests for generalization of load dereferenceability in loop
Philip Reames [Thu, 12 Sep 2019 17:09:01 +0000 (17:09 +0000)]
Precommit tests for generalization of load dereferenceability in loop

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

5 years ago[InstCombine] reduce test noise and regenerate CHECK lines; NFC
Sanjay Patel [Thu, 12 Sep 2019 17:07:01 +0000 (17:07 +0000)]
[InstCombine] reduce test noise and regenerate CHECK lines; NFC

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

5 years ago[LV] Support invariant addresses in speculation logic
Philip Reames [Thu, 12 Sep 2019 16:49:10 +0000 (16:49 +0000)]
[LV] Support invariant addresses in speculation logic

Implement a TODO from rL371452, and handle loop invariant addresses in predicated blocks. If we can prove that the load is safe to speculate into the header, then we can avoid using a masked.load in favour of a normal load.

This is mostly about vectorization robustness. In the common case, it's generally expected that LICM/LoadStorePromotion would have eliminated such loads entirely.

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

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

5 years ago[CGP] Ensure sinking multiple instructions does not invalidate dominance checks
David Green [Thu, 12 Sep 2019 16:00:07 +0000 (16:00 +0000)]
[CGP] Ensure sinking multiple instructions does not invalidate dominance checks

In MVE, as of rL371218, we are attempting to sink chains of instructions such as:
  %l1 = insertelement <8 x i8> undef, i8 %l0, i32 0
  %broadcast.splat26 = shufflevector <8 x i8> %l1, <8 x i8> undef, <8 x i32> zeroinitializer
In certain situations though, we can end up breaking the dominance relations of
instructions. This happens when we sink the instruction into a loop, but cannot
remove the originals. The Use is updated, which might in fact be a Use from the
second instruction to the first.

This attempts to fix that by reversing the order of instruction that are sunk,
and ensuring that we update the uses on new instructions if they have already
been sunk, not the old ones.

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

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

5 years ago[Alignment] Move OffsetToAlignment to Alignment.h
Guillaume Chatelet [Thu, 12 Sep 2019 15:20:36 +0000 (15:20 +0000)]
[Alignment] Move OffsetToAlignment to Alignment.h

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, alexshap, rupprecht, jhenderson

Subscribers: sdardis, nemanjai, hiraditya, kbarton, jakehehrlich, jrtc27, MaskRay, atanasyan, jsji, seiya, cfe-commits, llvm-commits

Tags: #clang, #llvm

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

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

5 years agotest-release.sh: Don't use chrpath on Solaris
Rainer Orth [Thu, 12 Sep 2019 14:50:32 +0000 (14:50 +0000)]
test-release.sh: Don't use chrpath on Solaris

When trying to run test-release.sh on Solaris 11.4 for 9.0.0 rc4, I failed initially
because Solaris lacks chrpath.  This patch accounts for that and allowed the run to
continue.

Tested on amd64-pc-solaris2.11 and sparcv9-sun-solaris2.11.

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

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

5 years ago[docs][llvm-strip] Remove unnecessary whitespace for consistency
James Henderson [Thu, 12 Sep 2019 14:24:04 +0000 (14:24 +0000)]
[docs][llvm-strip] Remove unnecessary whitespace for consistency

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

5 years ago[InstCombine][InstSimplify] Move constant-folding tests in result-of-usub-is-non...
Roman Lebedev [Thu, 12 Sep 2019 14:12:31 +0000 (14:12 +0000)]
[InstCombine][InstSimplify] Move constant-folding tests in result-of-usub-is-non-zero-and-no-overflow.ll

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

5 years ago[NFC][InstCombine][InstSimplify] Add test for "add-of-negative is non-zero and no...
Roman Lebedev [Thu, 12 Sep 2019 14:12:20 +0000 (14:12 +0000)]
[NFC][InstCombine][InstSimplify] Add test for "add-of-negative is non-zero and no overflow" (PR43259)

https://rise4fun.com/Alive/ska
https://rise4fun.com/Alive/9iX

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

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

5 years ago[ConstProp] allow folding for fma that produces NaN
Sanjay Patel [Thu, 12 Sep 2019 14:10:50 +0000 (14:10 +0000)]
[ConstProp] allow folding for fma that produces NaN

Folding for fma/fmuladd was added here:
rL202914
...and as seen in existing/unchanged tests, that works to propagate NaN
if it's already an input, but we should fold an fma() that creates NaN too.

From IEEE-754-2008 7.2 "Invalid Operation", there are 2 clauses that apply
to fma, so I added tests for those patterns:

  c) fusedMultiplyAdd: fusedMultiplyAdd(0, âˆž, c) or fusedMultiplyAdd(∞, 0, c)
     unless c is a quiet NaN; if c is a quiet NaN then it is implementation
     defined whether the invalid operation exception is signaled
  d) addition or subtraction or fusedMultiplyAdd: magnitude subtraction of
     infinities, such as: addition(+∞, âˆ’∞)

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

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

5 years ago[MIPS GlobalISel] Select indirect branch
Petar Avramovic [Thu, 12 Sep 2019 11:44:36 +0000 (11:44 +0000)]
[MIPS GlobalISel] Select indirect branch

Select G_BRINDIRECT for MIPS32.

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

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

5 years ago[MIPS GlobalISel] Lower G_DYN_STACKALLOC
Petar Avramovic [Thu, 12 Sep 2019 11:39:50 +0000 (11:39 +0000)]
[MIPS GlobalISel] Lower G_DYN_STACKALLOC

IRTranslator creates G_DYN_STACKALLOC instruction during expansion of
alloca when argument that tells number of elements to allocate on stack
is a virtual register. Use default lowering for MIPS32.

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

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

5 years ago[MIPS GlobalISel] Select G_IMPLICIT_DEF
Petar Avramovic [Thu, 12 Sep 2019 11:32:38 +0000 (11:32 +0000)]
[MIPS GlobalISel] Select G_IMPLICIT_DEF

G_IMPLICIT_DEF is used for both integer and floating point implicit-def.
Handle G_IMPLICIT_DEF as ambiguous opcode in MipsRegisterBankInfo.
Select G_IMPLICIT_DEF for MIPS32.

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

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

5 years ago[DAGCombine] visitFDIV - Use isCheaperToUseNegatedFPOps helper for (fdiv (fneg X...
Simon Pilgrim [Thu, 12 Sep 2019 11:03:09 +0000 (11:03 +0000)]
[DAGCombine] visitFDIV - Use isCheaperToUseNegatedFPOps helper for (fdiv (fneg X), (fneg Y)) -> (fdiv X, Y). NFCI.

Minor cleanup to use equivalent helper code.

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

5 years agoAArch64: support arm64_32, an ILP32 slice for watchOS.
Tim Northover [Thu, 12 Sep 2019 10:22:23 +0000 (10:22 +0000)]
AArch64: support arm64_32, an ILP32 slice for watchOS.

This is the main CodeGen patch to support the arm64_32 watchOS ABI in LLVM.
FastISel is mostly disabled for now since it would generate incorrect code for
ILP32.

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

5 years agoCodeGenPrep: add separate hook say when GEPs should be used for sinking. NFCI.
Tim Northover [Thu, 12 Sep 2019 10:21:00 +0000 (10:21 +0000)]
CodeGenPrep: add separate hook say when GEPs should be used for sinking. NFCI.

Up to now, we've decided whether to sink address calculations using GEPs or
normal arithmetic based on the useAA hook, but there are other reasons GEPs
might be preferred. So this patch splits the two questions, with a default
implementation falling back to useAA.

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

5 years ago[InstSimplify] simplifyUnsignedRangeCheck(): handle more cases (PR43251)
Roman Lebedev [Thu, 12 Sep 2019 09:26:17 +0000 (09:26 +0000)]
[InstSimplify] simplifyUnsignedRangeCheck(): handle more cases (PR43251)

Summary:
I don't have a direct motivational case for this,
but it would be good to have this for completeness/symmetry.

This pattern is basically the motivational pattern from
https://bugs.llvm.org/show_bug.cgi?id=43251
but with different predicate that requires that the offset is non-zero.

The completeness bit comes from the fact that a similar pattern (offset != zero)
will be needed for https://bugs.llvm.org/show_bug.cgi?id=43259,
so it'd seem to be good to not overlook very similar patterns..

Proofs: https://rise4fun.com/Alive/21b

Also, there is something odd with `isKnownNonZero()`, if the non-zero
knowledge was specified as an assumption, it didn't pick it up (PR43267)

Reviewers: spatel, nikic, xbolva00

Reviewed By: spatel

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

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

5 years ago[PowerPC][MCP][NFC] Pre-commit test cases for https://reviews.llvm.org/D65267
Kai Luo [Thu, 12 Sep 2019 09:00:44 +0000 (09:00 +0000)]
[PowerPC][MCP][NFC] Pre-commit test cases for https://reviews.llvm.org/D65267

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

5 years ago[DAGCombiner] Improve division estimation of floating points.
Qiu Chaofan [Thu, 12 Sep 2019 07:51:24 +0000 (07:51 +0000)]
[DAGCombiner] Improve division estimation of floating points.

Current implementation of estimating divisions loses precision since it
estimates reciprocal first and does multiplication.  This patch is to re-order
arithmetic operations in the last iteration in DAGCombiner to improve the
accuracy.

Reviewed By: Sanjay Patel, Jinsong Ji

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

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

5 years ago[LegalizeTypes] Remove code for softening a float type to itself.
Craig Topper [Thu, 12 Sep 2019 05:55:14 +0000 (05:55 +0000)]
[LegalizeTypes] Remove code for softening a float type to itself.

This was previously used to turn fp128 operations into libcalls
on X86. This is now done through op legalization after r371672.

This restores much of this code to before r254653.

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

5 years agoMake SwitchInstProfUpdateWrapper strict permanently
Yevgeny Rouban [Thu, 12 Sep 2019 03:41:34 +0000 (03:41 +0000)]
Make SwitchInstProfUpdateWrapper strict permanently

We have been using -switch-inst-prof-update-wrapper-strict
set to true by default for some time. It is time to remove
the safety stuff and make SwitchInstProfUpdateWrapper
intolerant to inconsistencies in !prof branch_weights
metadata of SwitchInst.

This patch gets rid of the Invalid state of
SwitchInstProfUpdateWrapper and the option
-switch-inst-prof-update-wrapper-strict. So there is only
two states: changed and unchanged.

Reviewers: davidx, nikic, eraman, reames, chandlerc
Reviewed By: davidx
Differential Revision: https://reviews.llvm.org/D67435

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

5 years agogn build: Merge r371700
Nico Weber [Thu, 12 Sep 2019 01:25:34 +0000 (01:25 +0000)]
gn build: Merge r371700

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

5 years agoReapply llvm-reduce: Add pass to reduce parameters""
David Blaikie [Thu, 12 Sep 2019 01:20:48 +0000 (01:20 +0000)]
Reapply llvm-reduce: Add pass to reduce parameters""

Fixing a couple of asan-identified bugs
* use of an invalid "Use" iterator after the element was removed
* use of StringRef to Function name after the Function was erased

This reapplies r371567, which was reverted in r371580.

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

5 years agoPR43278: llvm-reduce: Use temporary file names (and ToolOutputFile) rather than uniqu...
David Blaikie [Thu, 12 Sep 2019 00:31:57 +0000 (00:31 +0000)]
PR43278: llvm-reduce: Use temporary file names (and ToolOutputFile) rather than unique ones - to ensure they're cleaned up

This modifies the tool somewhat to only create files when about to run
the "interestingness" test, and delete them immediately after - this
means some more files will be created sometimes (when "double checking"
work - which should probably be fixed/avoided anyway).

This now creates temporary files, rather than only unique ones, and also
uses ToolOutputFile (without ever calling "keep") to ensure the files
are deleted as soon as the interestingness test is run.

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

5 years ago[X86] Enable -mprefer-vector-width=256 by default for Skylake-avx512 and later Intel...
Craig Topper [Wed, 11 Sep 2019 23:54:36 +0000 (23:54 +0000)]
[X86] Enable -mprefer-vector-width=256 by default for Skylake-avx512 and later Intel CPUs.

AVX512 instructions can cause a frequency drop on these CPUs. This
can negate the performance gains from using wider vectors. Enabling
prefer-vector-width=256 will prevent generation of zmm registers
unless explicit 512 bit operations are used in the original source
code.

I believe gcc and icc both do something similar to this by default.

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

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

5 years ago[AArch64][GlobalISel] Fall back on attempts to allocate split types on the stack.
Amara Emerson [Wed, 11 Sep 2019 23:53:23 +0000 (23:53 +0000)]
[AArch64][GlobalISel] Fall back on attempts to allocate split types on the stack.

First we were asserting that the ValNo of a VA was the wrong value. It doesn't actually
make a difference for us in CallLowering but fix that anyway to silence the assert.

The bigger issue was that after fixing the assert we were generating invalid MIR
because the merging/unmerging of values split across multiple registers wasn't
also implemented for memory locs. This happens when we run out of registers and
have to pass the split types like i128 -> i64 x 2 on the stack. This is do-able, but
for now just fall back.

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

5 years ago[GlobalISel][AArch64] Check caller for swifterror params in tailcall eligibility
Jessica Paquette [Wed, 11 Sep 2019 23:44:16 +0000 (23:44 +0000)]
[GlobalISel][AArch64] Check caller for swifterror params in tailcall eligibility

Before, we only checked the callee for swifterror. However, we should also be
checking the caller to see if it has a swifterror parameter.

Since we don't currently handle outgoing arguments, this didn't show up in the
swifterror.ll testcase.

Also, remove the swifterror checks from call-translator-tail-call.ll, since
they are covered by the existing swifterror testing. Better to have it all in
one place.

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

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

5 years ago[TableGen] Skip CRLF conversion when writing output
Reid Kleckner [Wed, 11 Sep 2019 22:33:50 +0000 (22:33 +0000)]
[TableGen] Skip CRLF conversion when writing output

Doing the CRLF translation while writing the file defeats our
optimization to not update the file if it hasn't changed.

Fixes PR43271.

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

5 years ago[InstCombine] rename variable for readability; NFC
Sanjay Patel [Wed, 11 Sep 2019 22:31:34 +0000 (22:31 +0000)]
[InstCombine] rename variable for readability; NFC

There's more that can be done here, but "OpI"
doesn't convey that we casted to BinaryOperator.

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

5 years agoAdd some missing changes to GSYM that was addressing a gcc compilation error due...
David Blaikie [Wed, 11 Sep 2019 22:24:45 +0000 (22:24 +0000)]
Add some missing changes to GSYM that was addressing a gcc compilation error due to a type and variable with the same name

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

5 years agoPR43278: Temporarily disable llvm-reduce tests due to exhausting temp files
David Blaikie [Wed, 11 Sep 2019 22:15:16 +0000 (22:15 +0000)]
PR43278: Temporarily disable llvm-reduce tests due to exhausting temp files

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

5 years ago[X86] Fix latent bugs in 32-bit CMPXCHG8B inserter
Reid Kleckner [Wed, 11 Sep 2019 21:56:17 +0000 (21:56 +0000)]
[X86] Fix latent bugs in 32-bit CMPXCHG8B inserter

I found three issues:
1. the loop over E[ABCD]X copies run over BB start
2. the direct address of cmpxchg8b could be a frame index
3. the displacement of cmpxchg8b could be a global instead of an
   immediate

These were all introduced together in r287875, and should be fixed with
this change.

Issue reported by Zachary Turner.

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

5 years ago[ConstantFolding] Refactor math functions to use LLVM ones (NFC)
Evandro Menezes [Wed, 11 Sep 2019 21:46:57 +0000 (21:46 +0000)]
[ConstantFolding] Refactor math functions to use LLVM ones (NFC)

When possible, replace calls to library routines on the host with equivalent
ones in LLVM.

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

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

5 years agoRevert [llvm-nm] Add tapi file support
Cyndy Ishida [Wed, 11 Sep 2019 21:35:28 +0000 (21:35 +0000)]
Revert [llvm-nm] Add tapi file support

This reverts r371576 (git commit f88f46358dbffa20af3b054a9346e5154789d50f)

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

5 years agoRevert [Object][TextAPI] NFC, fix tapi lit tests
Cyndy Ishida [Wed, 11 Sep 2019 21:32:55 +0000 (21:32 +0000)]
Revert [Object][TextAPI] NFC, fix tapi lit tests

This reverts r371577 (git commit b2b0ccab2f76733679eeceecf31b21ebc1fe23ac)

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

5 years ago[X86] Add test case for v16i64->v16i32 truncate on min-legal-vector-width=256.
Craig Topper [Wed, 11 Sep 2019 21:30:42 +0000 (21:30 +0000)]
[X86] Add test case for v16i64->v16i32 truncate on min-legal-vector-width=256.

I think this case would crash before I added back the -x86-experimental-vector-widening command line option. Adding this test case to prevent breaking it again when we remove the option.

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

5 years ago[X86] Move x86_64 fp128 conversion to libcalls from type legalization to DAG legalization
Craig Topper [Wed, 11 Sep 2019 21:30:09 +0000 (21:30 +0000)]
[X86] Move x86_64 fp128 conversion to libcalls from type legalization to DAG legalization

fp128 is considered a legal type for a register, but has almost no legal operations so everything needs to be converted to a libcall. Previously this was implemented by tricking type legalization into softening the operations with various checks for "is legal in hardware register" to change the behavior to still use f128 as the resulting type instead of converting to i128.

This patch abandons this approach and instead moves the libcall conversions to LegalizeDAG. This is the approach taken by AArch64 where they also have a legal fp128 type, but no legal operations. I think this is more in spirit with how SelectionDAG's phases are supposed to work.

I had to make some hacks for STRICT_FP_ROUND because some of the strict FP handling checks if ISD::FP_ROUND is Legal for a given result type, but I had to make ISD::FP_ROUND Custom to allow making a libcall when the input is f128. For all other types the Custom handler just returns the original node. These hacks are incomplete and don't work for a strict truncate from f128, but I don't think it worked before either since LegalizeFloatTypes doesn't know about strict ops yet. I've also raised PR43209 against AArch64 which currently crashes on a strict ftrunc from f64->f32 because of FP_ROUND being marked Custom for the same reason there.

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

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

5 years agoAMDGPU: Move m0 initializations earlier
Austin Kerbow [Wed, 11 Sep 2019 21:28:41 +0000 (21:28 +0000)]
AMDGPU: Move m0 initializations earlier

Summary:
After hoisting and merging m0 initializations schedule them as early as
possible in the MBB. This helps the scheduler avoid hazards in some
cases.

Reviewers: rampitec, arsenm

Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, arphaman, llvm-commits

Tags: #llvm

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

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

5 years agogn build: Merge r371661
Nico Weber [Wed, 11 Sep 2019 21:24:15 +0000 (21:24 +0000)]
gn build: Merge r371661

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

5 years agogn build: Merge r371657
Nico Weber [Wed, 11 Sep 2019 21:24:11 +0000 (21:24 +0000)]
gn build: Merge r371657

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

5 years ago[DWARF] Emit call site parameter info when tuning for lldb
Vedant Kumar [Wed, 11 Sep 2019 21:23:39 +0000 (21:23 +0000)]
[DWARF] Emit call site parameter info when tuning for lldb

Emit debug entry values using standard DWARF5 opcodes when the debugger
tuning is set to lldb.

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

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

5 years agoAll Errors must be checked
Chris Bieneman [Wed, 11 Sep 2019 20:54:38 +0000 (20:54 +0000)]
All Errors must be checked

Summary: If an error is ever returned from any of the functions called here, the error must be joined with the Result Error before being returned otherwise the Result Error will assert on destruction.

Reviewers: lhames

Subscribers: llvm-commits

Tags: #llvm

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

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

5 years agoAdd a LineTable class to GSYM and test it.
Greg Clayton [Wed, 11 Sep 2019 20:51:03 +0000 (20:51 +0000)]
Add a LineTable class to GSYM and test it.

This patch adds the ability to create a gsym::LineTable object, populate it, encode and decode it and test all functionality.

The full format of the LineTable encoding is specified in the header file LineTable.h.

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

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

5 years ago[llvm-reduce] Fix a bug, improve error handling when running test
Reid Kleckner [Wed, 11 Sep 2019 20:29:22 +0000 (20:29 +0000)]
[llvm-reduce] Fix a bug, improve error handling when running test

llvm::sys::ExecuteAndWait can report errors, so let's make use of that.

Second, while iterating uses of functions to remove, a call can appear
multiple times. Use a SetVector so we don't attempt to erase such a call
twice.

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

5 years agoUpdate link to the DWARF spec.
Adrian Prantl [Wed, 11 Sep 2019 19:57:29 +0000 (19:57 +0000)]
Update link to the DWARF spec.

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

5 years ago[AMDGPU] Fix crash in phi-elimination hook.
Michael Liao [Wed, 11 Sep 2019 19:55:20 +0000 (19:55 +0000)]
[AMDGPU] Fix crash in phi-elimination hook.

Summary: - Pre-check in case there's just a single PHI insn.

Reviewers: alex-t, rampitec, arsenm

Subscribers: kzhuravl, jvesely, wdng, nhaehnle, dstuttard, tpr, t-tye, hiraditya, llvm-commits, yaxunl

Tags: #llvm

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

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

5 years agoUpdate documentation.
Adrian Prantl [Wed, 11 Sep 2019 19:49:38 +0000 (19:49 +0000)]
Update documentation.

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

5 years agoFix test failures after r371640
Matt Arsenault [Wed, 11 Sep 2019 18:55:20 +0000 (18:55 +0000)]
Fix test failures after r371640

r371640 evidently fixed bug 39481

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

5 years ago[ConstantHoisting] Fix non-determinism.
Eli Friedman [Wed, 11 Sep 2019 18:55:00 +0000 (18:55 +0000)]
[ConstantHoisting] Fix non-determinism.

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

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

5 years ago[IRMover] Don't map globals if their types are the same
Pirama Arumuga Nainar [Wed, 11 Sep 2019 18:35:49 +0000 (18:35 +0000)]
[IRMover] Don't map globals if their types are the same

Summary:
During IR Linking, if the types of two globals in destination and source
modules are the same, it can only be because the global in the
destination module is originally from the source module and got added to
the destination module from a shared metadata.

We shouldn't map this type to itself in case the type's components get
remapped to a new type from the destination (for instance, during the
loop over SrcM->getIdentifiedStructTypes() further below in
IRLinker::computeTypeMapping()).

Fixes PR40312.

Reviewers: tejohnson, pcc, srhines

Subscribers: mehdi_amini, hiraditya, steven_wu, dexonsmith, llvm-commits

Tags: #llvm

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

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

5 years agoLiveIntervals: Split live intervals on multiple dead defs
Matt Arsenault [Wed, 11 Sep 2019 17:59:21 +0000 (17:59 +0000)]
LiveIntervals: Split live intervals on multiple dead defs

If there are multiple dead defs of the same virtual register, these
are required to be split into multiple virtual registers with separate
live intervals to avoid a verifier error.

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

5 years agogn build: Merge r371635
Nico Weber [Wed, 11 Sep 2019 16:26:59 +0000 (16:26 +0000)]
gn build: Merge r371635

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