]> granicus.if.org Git - llvm/log
llvm
5 years agoRecommit r367901 "[X86] Enable -x86-experimental-vector-widening-legalization by...
Craig Topper [Wed, 7 Aug 2019 16:24:26 +0000 (16:24 +0000)]
Recommit r367901 "[X86] Enable -x86-experimental-vector-widening-legalization by default."

The assert that caused this to be reverted should be fixed now.

Original commit message:

This patch changes our defualt legalization behavior for 16, 32, and
64 bit vectors with i8/i16/i32/i64 scalar types from promotion to
widening. For example, v8i8 will now be widened to v16i8 instead of
promoted to v8i16. This keeps the elements widths the same and pads
with undef elements. We believe this is a better legalization strategy.
But it carries some issues due to the fragmented vector ISA. For
example, i8 shifts and multiplies get widened and then later have
to be promoted/split into vXi16 vectors.

This has the potential to cause regressions so we wanted to get
it in early in the 10.0 cycle so we have plenty of time to
address them.

Next steps will be to merge tests that explicitly test the command
line option. And then we can remove the option and its associated
code.

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

5 years ago[ARM] Expand CTPOP intrinsic for MVE
Oliver Cruickshank [Wed, 7 Aug 2019 15:47:45 +0000 (15:47 +0000)]
[ARM] Expand CTPOP intrinsic for MVE

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

5 years agogn build: Merge r368158
Nico Weber [Wed, 7 Aug 2019 15:30:44 +0000 (15:30 +0000)]
gn build: Merge r368158

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

5 years agogn build: Merge r368119
Nico Weber [Wed, 7 Aug 2019 15:29:01 +0000 (15:29 +0000)]
gn build: Merge r368119

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

5 years ago[InstCombine] Add a TODO comment
Jay Foad [Wed, 7 Aug 2019 15:18:34 +0000 (15:18 +0000)]
[InstCombine] Add a TODO comment

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

5 years ago[InstCombine] Propagate fast math flags through selects
Jay Foad [Wed, 7 Aug 2019 15:16:28 +0000 (15:16 +0000)]
[InstCombine] Propagate fast math flags through selects

Summary:
In SimplifySelectsFeedingBinaryOp, propagate fast math flags from the
outer op into both arms of the new select, to take advantage of
simplifications that require fast math flags.

Reviewers: mcberg2017, majnemer, spatel, arsenm, xbolva00

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

Tags: #llvm

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

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

5 years ago[UpdateTestChecks] Update tests option
David Bolvansky [Wed, 7 Aug 2019 14:44:50 +0000 (14:44 +0000)]
[UpdateTestChecks] Update tests option

Summary:
Port of new feature introduced https://reviews.llvm.org/D65610 to other update scripts.

- update_*_checks.py: add an alias -u for --update-only
- port --update-only to other update_*_test_checks.py scripts
- update script aborts if the test file was generated by another update_*_test_checks.py utility

Reviewers: lebedev.ri, RKSimon, MaskRay, reames, gbedwell

Reviewed By: MaskRay

Subscribers: llvm-commits

Tags: #llvm

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

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

5 years ago[EarlyCSE] Add support for unary FNeg to EarlyCSE
Cameron McInally [Wed, 7 Aug 2019 14:34:41 +0000 (14:34 +0000)]
[EarlyCSE] Add support for unary FNeg to EarlyCSE

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

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

5 years ago[RISCV][NFC] Document RISC-V-specific assembly constraints
Sam Elliott [Wed, 7 Aug 2019 13:08:07 +0000 (13:08 +0000)]
[RISCV][NFC] Document RISC-V-specific assembly constraints

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

5 years agoGlobalISel: factor common code from translateCall and translateInvoke. NFC.
Tim Northover [Wed, 7 Aug 2019 12:43:53 +0000 (12:43 +0000)]
GlobalISel: factor common code from translateCall and translateInvoke. NFC.

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

5 years ago[X86] EltsFromConsecutiveLoads - early out for non-byte sized memory (PR42909)
Simon Pilgrim [Wed, 7 Aug 2019 12:41:59 +0000 (12:41 +0000)]
[X86] EltsFromConsecutiveLoads - early out for non-byte sized memory (PR42909)

Don't attempt to merge loads for types that aren't modulo 8-bits.

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

5 years ago[AArch64][WinCFI] Do not pair callee-save instructions in LoadStoreOptimizer
Sander de Smalen [Wed, 7 Aug 2019 12:41:38 +0000 (12:41 +0000)]
[AArch64][WinCFI] Do not pair callee-save instructions in LoadStoreOptimizer

Prevent the LoadStoreOptimizer from pairing any load/store instructions with
instructions from the prologue/epilogue if the CFI information has encoded the
operations as separate instructions.  This would otherwise lead to a mismatch
of the actual prologue size from the size as recorded in the Windows CFI.

Reviewers: efriedma, mstorsjo, ssijaric

Reviewed By: efriedma

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

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

5 years ago[mips] Make a couple of class methods plain static functions. NFC
Simon Atanasyan [Wed, 7 Aug 2019 12:21:41 +0000 (12:21 +0000)]
[mips] Make a couple of class methods plain static functions. NFC

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

5 years ago[mips] Use isMicroMips() function to check enabled feature flag. NFC
Simon Atanasyan [Wed, 7 Aug 2019 12:21:32 +0000 (12:21 +0000)]
[mips] Use isMicroMips() function to check enabled feature flag. NFC

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

5 years ago[Mips] Instruction `sc` now accepts symbol as an argument
Simon Atanasyan [Wed, 7 Aug 2019 12:21:26 +0000 (12:21 +0000)]
[Mips] Instruction `sc` now accepts symbol as an argument

Function MipsAsmParser::expandMemInst() did not properly handle
instruction `sc` with a symbol as an argument because first argument
would be counted twice. We add additional checks and handle this case
separately.

Patch by Mirko Brkusanin.

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

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

5 years ago[Support] Base SmartMutex on std::recursive_mutex
Benjamin Kramer [Wed, 7 Aug 2019 11:59:57 +0000 (11:59 +0000)]
[Support] Base SmartMutex on std::recursive_mutex

- Remove support for non-recursive mutexes. This was unused.
- The std::recursive_mutex is now created/destroyed unconditionally.
  Locking is still only done if threading is enabled.
- Alias SmartScopedLock to std::lock_guard.

This should make no semantic difference on the existing APIs.

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

5 years agoReplace non-recursive sys::Mutex users with std::mutex
Benjamin Kramer [Wed, 7 Aug 2019 11:59:44 +0000 (11:59 +0000)]
Replace non-recursive sys::Mutex users with std::mutex

Also remove a use of sys::MutexImpl, that's just evil. No functionality
change intended.

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

5 years agoRemove support for 32-bit offsets in utility classes (5/5)
Igor Kudrin [Wed, 7 Aug 2019 11:44:47 +0000 (11:44 +0000)]
Remove support for 32-bit offsets in utility classes (5/5)

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

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

5 years ago[TargetLowering] SimplifyDemandedBits - call SimplifyMultipleUseDemandedBits for...
Simon Pilgrim [Wed, 7 Aug 2019 11:43:13 +0000 (11:43 +0000)]
[TargetLowering] SimplifyDemandedBits - call SimplifyMultipleUseDemandedBits for ISD::VECTOR_SHUFFLE

In particular this helps the SSE vector shift cvttps2dq+add+shl pattern by avoiding the need for zeros in shuffle style extensions to vXi32 types as we'll be shifting out those bits anyway

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

5 years agoReplace llvm::MutexGuard/UniqueLock with their standard equivalents
Benjamin Kramer [Wed, 7 Aug 2019 10:57:25 +0000 (10:57 +0000)]
Replace llvm::MutexGuard/UniqueLock with their standard equivalents

All supported platforms have <mutex> now, so we don't need our own
copies any longer. No functionality change intended.

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

5 years ago[ARM] Generate MVE VHADDs/VHSUBs
Oliver Cruickshank [Wed, 7 Aug 2019 10:26:57 +0000 (10:26 +0000)]
[ARM] Generate MVE VHADDs/VHSUBs

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

5 years ago[InstCombine] Recommit: Shift amount reassociation: shl-trunc-shl pattern
Roman Lebedev [Wed, 7 Aug 2019 09:41:50 +0000 (09:41 +0000)]
[InstCombine] Recommit: Shift amount reassociation: shl-trunc-shl pattern

This was initially committed in r368059 but got reverted in r368084
because there was a faulty logic in how the shift amounts type mismatch
was being handled (it simply wasn't).

I've added an explicit bailout before we SimplifyAddInst() - i don't think
it's designed in general to handle differently-typed values, even though
the actual problem only comes from ConstantExpr's.

I have also changed the common type deduction, to not just blindly
look past zext, but try to do that so that in the end types match.

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

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

5 years ago[obj2yaml] - MIPS: move and improve testing of the e_flags
George Rimar [Wed, 7 Aug 2019 09:35:04 +0000 (09:35 +0000)]
[obj2yaml] - MIPS: move and improve testing of the e_flags

Mips/elf-flags.yaml and Mips/elf-abi.yaml are tests that intention was to
show that yaml2obj/obj2yaml are able to read/dump MIPS specific e_flags.

They were not complete, contained an excessive YAML parts and were placed
at a wrong location.

I removed them and created the obj2yaml/elf-mips-eflags.yaml instead.

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

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

5 years ago[ELF.h] - Check the case when e_shstrndx=SHN_XINDEX, but the corresponding sh_link...
George Rimar [Wed, 7 Aug 2019 09:29:42 +0000 (09:29 +0000)]
[ELF.h] - Check the case when e_shstrndx=SHN_XINDEX, but the corresponding sh_link is broken.

When e_shstrndx is equal to SHN_XINDEX,
the index of the section string table section should
be taken from the sh_link field of the section
header at index 0.

If sh_link is broken, e.g. contains an index that is
larger than number of sections, then error is reported.

This error message was untested before.

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

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

5 years ago[llvm-readelf] --notes: move 'Data size' column left by 1
Fangrui Song [Wed, 7 Aug 2019 09:13:11 +0000 (09:13 +0000)]
[llvm-readelf] --notes: move 'Data size' column left by 1

readelf -n:

```
// "Data size" is not left justified
  Owner                 Data size       Description
  GNU                  0x00000010       NT_GNU_ABI_TAG (ABI version tag)
```

llvm-readelf -n (before):
```
// "Data size" column shifted by 1
  Owner                 Data size        Description
  GNU                   0x00000010       NT_GNU_ABI_TAG (ABI version tag)
```

llvm-readelf -n (after):
```
  Owner                Data size        Description
  GNU                  0x00000010       NT_GNU_ABI_TAG (ABI version tag)
```

This change is made to reduce the diff with readelf -n, so that it is
slightly easier to check what features readelf implements but we don't.

Reviewed By: grimar, jhenderson

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

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

5 years ago[unittests] Mark private gmock headers with IWYU pragmas. NFC
Ilya Biryukov [Wed, 7 Aug 2019 08:45:38 +0000 (08:45 +0000)]
[unittests] Mark private gmock headers with IWYU pragmas. NFC

Summary: To prevent clangd from adding #include of those headers.

Reviewers: gribozavr

Reviewed By: gribozavr

Subscribers: kadircet, llvm-commits, cfe-commits

Tags: #llvm

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

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

5 years agoRe-submit r367649: Improve raw_ostream so that you can "write" colors using operator<<
Rui Ueyama [Wed, 7 Aug 2019 08:08:17 +0000 (08:08 +0000)]
Re-submit r367649: Improve raw_ostream so that you can "write" colors using operator<<

The original patch broke buildbots, perhaps because it changed the
default setting whether colors are enabled or not.

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

5 years ago[ARM][LowOverheadLoops] Revert after read/write
Sam Parker [Wed, 7 Aug 2019 07:39:19 +0000 (07:39 +0000)]
[ARM][LowOverheadLoops] Revert after read/write

Currently we check whether LR is stored/loaded to/from inbetween the
loop decrement and loop end pseudo instructions. There's two problems
here:
- It relies on all load/store instructions being labelled as such in
  tablegen.
- Actually any use of loop decrement is troublesome because the value
  doesn't exist!

So we need to check for any read/write of LR that occurs between the
two instructions and revert if we find anything.

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

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

5 years agoForce check prof branch_weights consistency in SwitchInstProfUpdateWrapper
Yevgeny Rouban [Wed, 7 Aug 2019 07:17:45 +0000 (07:17 +0000)]
Force check prof branch_weights consistency in SwitchInstProfUpdateWrapper

This patch turns on the prof branch_weights metadata consistency
check in SwitchInstProfUpdateWrapper.

If this patch causes a failure then please before reverting do report
the IR that hits the assertion and try identifying the pass that
introduces the inconsistency. We have to fix all such passes.

See also the upcoming change https://reviews.llvm.org/D61179
in the Verifier.

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

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

5 years ago[X86] Allow any 8-bit immediate to be used with bt/btc/btr/bts memory aliases.
Craig Topper [Wed, 7 Aug 2019 06:17:58 +0000 (06:17 +0000)]
[X86] Allow any 8-bit immediate to be used with bt/btc/btr/bts memory aliases.

We have aliases that disambiguate memory forms of bt/btc/btr/bts
without suffixes to the 32-bit form. These aliases should have
been updated when the instructions were updated in r356413.

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

5 years ago[X86] Use isInt<8> to simplify some code. NFC
Craig Topper [Wed, 7 Aug 2019 06:17:55 +0000 (06:17 +0000)]
[X86] Use isInt<8> to simplify some code. NFC

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

5 years ago[MachineCSE][NFC] Use 'profitable' rather than 'beneficial' to name method.
Kai Luo [Wed, 7 Aug 2019 05:40:21 +0000 (05:40 +0000)]
[MachineCSE][NFC] Use 'profitable' rather than 'beneficial' to name method.

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

5 years ago[X86] Limit vpermil2pd/vpermil2ps immediates to 4 bits in the assembly parser.
Craig Topper [Wed, 7 Aug 2019 05:34:27 +0000 (05:34 +0000)]
[X86] Limit vpermil2pd/vpermil2ps immediates to 4 bits in the assembly parser.

The upper 4 bits of the immediate byte are used to encode a
register. We need to limit the explicit immediate to fit in the
remaining 4 bits.

Fixes PR42899.

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

5 years agoReverts commit r368117, r368115 and r368112
Petr Hosek [Wed, 7 Aug 2019 05:15:34 +0000 (05:15 +0000)]
Reverts commit r368117, r368115 and r368112

This reverts commits:

  "Added Delta IR Reduction Tool"
  "[Bugpoint redesign] Added Pass to Remove Global Variables"
  "Added Tool as Dependency to tests & fixed warnings"

Reduce/remove-funcs.ll is failing on bots.

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

5 years agoAppend an executable suffix to the toolchain tool paths on Windows platform.
Galina Kistanova [Wed, 7 Aug 2019 03:19:40 +0000 (03:19 +0000)]
Append an executable suffix to the toolchain tool paths on Windows platform.

Append a default CMake suffix (CMAKE_EXECUTABLE_SUFFIX) for the build host to the toolchain tool path when adding a LLVM external project.
The tool binary files should contain .exe suffix to run them properly on Windows platform when building the projects.

Patch by Vlad Vereschaka.

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

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

5 years agoFixes failing test cases on Windows for rL368119
Alex Brachet [Wed, 7 Aug 2019 03:18:23 +0000 (03:18 +0000)]
Fixes failing test cases on Windows for rL368119

Windows test cases were failing because the executable is called yaml2obj.exe
not just yaml2obj. I removed FileCheck patterns including yaml2obj so they
start matching at the error message not the program name.

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

5 years ago[yaml2obj] Move core yaml2obj code into lib and include for use in unit tests
Alex Brachet [Wed, 7 Aug 2019 02:44:49 +0000 (02:44 +0000)]
[yaml2obj] Move core yaml2obj code into lib and include for use in unit tests

Reviewers: jhenderson, rupprecht, MaskRay, grimar, labath

Reviewed By: rupprecht

Subscribers: gribozavr, mgrang, seiya, mgorny, sbc100, hiraditya, aheejin, jakehehrlich, llvm-commits

Tags: #llvm

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

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

5 years agoAdded Tool as Dependency to tests & fixed warnings
Diego Trevino Ferrer [Wed, 7 Aug 2019 01:51:56 +0000 (01:51 +0000)]
Added Tool as Dependency to tests & fixed warnings

Summary: Fixes http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-bootstrap-msan/builds/14002 and http://lab.llvm.org:8011/builders/lld-x86_64-darwin13/builds/35392/steps/build_Lld/logs/stdio

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

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

5 years ago[Bugpoint redesign] Added Pass to Remove Global Variables
Diego Trevino Ferrer [Wed, 7 Aug 2019 00:42:50 +0000 (00:42 +0000)]
[Bugpoint redesign] Added Pass to Remove Global Variables

Summary:
This pass tries to remove Global Variables, as well as their derived uses. For example if a variable `@x` is used by `%call1` and `%call2`, both these uses and the definition of `@x` are deleted. Moreover if `%call1` or `%call2` are used elsewhere those uses are also deleted, and so on recursively.

I'm still uncertain if this pass should remove derived uses, I'm open to suggestions.

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

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

5 years agoTLI: darwin does not support _bcmp
Alex Lorenz [Wed, 7 Aug 2019 00:03:37 +0000 (00:03 +0000)]
TLI: darwin does not support _bcmp

Not all Darwin targets support _bcmp in all circumstances.

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

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

5 years agoAdded Delta IR Reduction Tool
Diego Trevino Ferrer [Wed, 7 Aug 2019 00:00:52 +0000 (00:00 +0000)]
Added Delta IR Reduction Tool

Summary: Tool parses input IR file, and runs the delta debugging algorithm to reduce the functions inside the input file.

Reviewers: alexshap, chandlerc

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

llvm-svn: 368071

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

5 years agoRegenerate mmx-arith.ll.
Mitch Phillips [Tue, 6 Aug 2019 23:39:07 +0000 (23:39 +0000)]
Regenerate mmx-arith.ll.

This test golden file has become out of date since the rollback of
rL368081. Update the test to have the correct values.

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

5 years agoRevert "[X86] Add more extract subvector cost model tests for smaller element sizes...
Mitch Phillips [Tue, 6 Aug 2019 23:38:14 +0000 (23:38 +0000)]
Revert "[X86] Add more extract subvector cost model tests for smaller element sizes and smaller than 128-bit vectors."

This reverts commit fc33e33776b7a7ce22e539f0ec2e3bfdb09ad361.

This commit depends on the rolled back commit rL367901, and thus needs
to be rolled back.

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

5 years agoRevert "[X86] Enable -x86-experimental-vector-widening-legalization by default."
Mitch Phillips [Tue, 6 Aug 2019 23:00:43 +0000 (23:00 +0000)]
Revert "[X86] Enable -x86-experimental-vector-widening-legalization by default."

This reverts commit 3de33245d2c992c9e0af60372043540b60f3a810.

This commit broke the MSan buildbots. See
https://reviews.llvm.org/rL367901 for more information.

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

5 years agoRevert "[X86] Remove uses of the -x86-experimental-vector-widening-legalization flag...
Mitch Phillips [Tue, 6 Aug 2019 23:00:30 +0000 (23:00 +0000)]
Revert "[X86] Remove uses of the -x86-experimental-vector-widening-legalization flag from test/CodeGen/X86/"

This reverts commit 3f572c7b8405f36993ec8a226dcddd57283a7c1e.

The MSan sanitizer buildbot was broken by rL367901. This commit
(rL368079) depends on the broken commit that need to be reverted, and
thus itself is being reverted.

See https://reviews.llvm.org/rL367901 for more information.

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

5 years agoUse parenthses to silence warning.
Bill Wendling [Tue, 6 Aug 2019 22:47:47 +0000 (22:47 +0000)]
Use parenthses to silence warning.

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

5 years agohwasan: Instrument globals.
Peter Collingbourne [Tue, 6 Aug 2019 22:07:29 +0000 (22:07 +0000)]
hwasan: Instrument globals.

Globals are instrumented by adding a pointer tag to their symbol values
and emitting metadata into a special section that allows the runtime to tag
their memory when the library is loaded.

Due to order of initialization issues explained in more detail in the comments,
shadow initialization cannot happen during regular global initialization.
Instead, the location of the global section is marked using an ELF note,
and we require libc support for calling a function provided by the HWASAN
runtime when libraries are loaded and unloaded.

Based on ideas discussed with @evgeny777 in D56672.

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

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

5 years ago[WebAssembly] Lower ASan constructor priority on Emscripten
Guanzhong Chen [Tue, 6 Aug 2019 21:52:58 +0000 (21:52 +0000)]
[WebAssembly] Lower ASan constructor priority on Emscripten

Summary:
This change gives Emscripten the ability to use more than one constructor
priorities that runs before ASan. By convention, constructor priorites 0-100
are reserved for use by the system. ASan on Emscripten now uses priority 50,
leaving plenty of room for use by Emscripten before and after ASan.

This change is done in response to:
https://github.com/emscripten-core/emscripten/pull/9076#discussion_r310323723

Reviewers: kripken, tlively, aheejin

Reviewed By: tlively

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

Tags: #llvm, #clang

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

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

5 years agogn build: Merge r368065.
Peter Collingbourne [Tue, 6 Aug 2019 21:48:06 +0000 (21:48 +0000)]
gn build: Merge r368065.

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

5 years agogn build: Merge r368052.
Peter Collingbourne [Tue, 6 Aug 2019 21:47:55 +0000 (21:47 +0000)]
gn build: Merge r368052.

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

5 years agogn build: Merge r368054.
Peter Collingbourne [Tue, 6 Aug 2019 21:47:46 +0000 (21:47 +0000)]
gn build: Merge r368054.

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

5 years agogn build: Merge r368086.
Peter Collingbourne [Tue, 6 Aug 2019 21:47:37 +0000 (21:47 +0000)]
gn build: Merge r368086.

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

5 years agogn build: Merge r368070.
Peter Collingbourne [Tue, 6 Aug 2019 21:47:27 +0000 (21:47 +0000)]
gn build: Merge r368070.

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

5 years agoIR: Disable verifier check for GlobalValues with private linkage named after a comdat...
Peter Collingbourne [Tue, 6 Aug 2019 21:47:18 +0000 (21:47 +0000)]
IR: Disable verifier check for GlobalValues with private linkage named after a comdat for non-COFF.

This check is only meaningful for COFF and it is perfectly valid to create
such a GlobalValue in ELF.

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

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

5 years ago[X86] Don't allow combineSIntToFP to create v2i32 vectors after type legalization.
Craig Topper [Tue, 6 Aug 2019 21:43:15 +0000 (21:43 +0000)]
[X86] Don't allow combineSIntToFP to create v2i32 vectors after type legalization.

If we're after type legalization we should only be trying to turn
v2i64 into v2i32. So bitcast to v4i32, shuffle the even elements
together. Then use X86ISD::CVTSI2P. The alternative is to leave
the v2i64 type alone and let it scalarized. Hopefully keeping
it packed is better.

Fixes PR42905.

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

5 years agoRevert [InstCombine] Shift amount reassociation: shl-trunc-shl pattern
Reid Kleckner [Tue, 6 Aug 2019 20:32:07 +0000 (20:32 +0000)]
Revert [InstCombine] Shift amount reassociation: shl-trunc-shl pattern

This reverts r368059 (git commit 0f957109761913c563922f1afd4ceb29ef21bbd0)

This caused Clang to assert while self-hosting and compiling
SystemZInstrInfo.cpp. Reduction is running.

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

5 years ago[X86] Add more extract subvector cost model tests for smaller element sizes and small...
Craig Topper [Tue, 6 Aug 2019 20:12:41 +0000 (20:12 +0000)]
[X86] Add more extract subvector cost model tests for smaller element sizes and smaller than 128-bit vectors.

With the switch to widening legalization, we need to a better
job of costing extractions of less than 128-bits.

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

5 years ago[X86] Remove tests for -x86-experimental-vector-widening-legalization from test/Analy...
Craig Topper [Tue, 6 Aug 2019 20:12:34 +0000 (20:12 +0000)]
[X86] Remove tests for -x86-experimental-vector-widening-legalization from test/Analysis/CostModel/X86/

This flag is now the default behavior so we don't need separate
tests.

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

5 years ago[X86] Remove uses of the -x86-experimental-vector-widening-legalization flag from...
Craig Topper [Tue, 6 Aug 2019 20:12:20 +0000 (20:12 +0000)]
[X86] Remove uses of the -x86-experimental-vector-widening-legalization flag from test/CodeGen/X86/

This flag is now the default behavior so we no longer need to
set it in tests.

Some redundant tests have been removed after verifying we have
an equivalent test that didn't use the flag.

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

5 years ago[Attributor][modulemap] Revert r368064 but fix the build
Kristina Brooks [Tue, 6 Aug 2019 19:53:19 +0000 (19:53 +0000)]
[Attributor][modulemap] Revert r368064 but fix the build

Commit r368064 was necessary after r367953 (D65712) broke the module
build. That happened, apparently, because the template class IRAttribute
defined in the header had a virtual method defined in the corresponding
source file (IRAttribute::manifest). To unbreak the situation this patch
introduces a helper function IRAttributeManifest::manifestAttrs which
is used to implement IRAttribute::manifest in the header. The deifnition
of the helper function is still in the source file.

Patch by jdoerfert (Johannes Doerfert)

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

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

5 years agoAdd order-dependencies to object libraries
Chris Bieneman [Tue, 6 Aug 2019 19:41:23 +0000 (19:41 +0000)]
Add order-dependencies to object libraries

Summary: If you are generating an object library that depends on table-gen generate sources, you need the object library to depend on the tablgen target. Currently llvm_add_library doesn't add dependencies for object libraries at all, which is clearly problematic.

Reviewers: compnerd, hintonda, smeenai

Reviewed By: smeenai

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

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

5 years agoRevert "Added Delta IR Reduction Tool"
Dmitri Gribenko [Tue, 6 Aug 2019 19:40:37 +0000 (19:40 +0000)]
Revert "Added Delta IR Reduction Tool"

This reverts commit r368071, it broke buildbots.

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

5 years agoAdded Delta IR Reduction Tool
Diego Trevino Ferrer [Tue, 6 Aug 2019 18:59:11 +0000 (18:59 +0000)]
Added Delta IR Reduction Tool

Summary: Tool parses input IR file, and runs the delta debugging algorithm to reduce the functions inside the input file.

Reviewers: alexshap, chandlerc

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

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

5 years ago[GISel]: Fix trivial build breakage
Aditya Nandakumar [Tue, 6 Aug 2019 17:53:04 +0000 (17:53 +0000)]
[GISel]: Fix trivial build breakage

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

5 years ago[GISel]: Add GISelKnownBits analysis
Aditya Nandakumar [Tue, 6 Aug 2019 17:18:29 +0000 (17:18 +0000)]
[GISel]: Add GISelKnownBits analysis

https://reviews.llvm.org/D65698

This adds a KnownBits analysis pass for GISel. This was done as a
pass (compared to static functions) so that we can add other features
such as caching queries(within a pass and across passes) in the future.
This patch only adds the basic pass boiler plate, and implements a lazy
non caching knownbits implementation (ported from SelectionDAG). I've
also hooked up the AArch64PreLegalizerCombiner pass to use this - there
should be no compile time regression as the analysis is lazy.

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

5 years ago[modulemap] exclude a non-module friendly header
Kristina Brooks [Tue, 6 Aug 2019 17:16:56 +0000 (17:16 +0000)]
[modulemap] exclude a non-module friendly header

Exclude Attributor.h from LLVM_Transforms to avoid
a link failure when building modular LLVM.

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

5 years ago[globalisel] Allow SrcOp to convert an APInt and render it as an immediate operand...
Daniel Sanders [Tue, 6 Aug 2019 17:16:27 +0000 (17:16 +0000)]
[globalisel] Allow SrcOp to convert an APInt and render it as an immediate operand (MO.isImm() == true)

Summary:
This is tested by D61289 but has been pulled into a separate patch at
a reviewers request.

Reviewers: bogner, aditya_nandakumar, volkan, aemerson, paquette, arsenm, rovka

Reviewed By: arsenm

Subscribers: javed.absar, hiraditya, wdng, kristof.beyls, Petar.Avramovic, llvm-commits

Tags: #llvm

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

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

5 years ago[X86] Move CPU features for Barcelona/K10 out of line
Roman Lebedev [Tue, 6 Aug 2019 17:04:02 +0000 (17:04 +0000)]
[X86] Move CPU features for Barcelona/K10 out of line

Summary:
Cleans X86.td's Barcelona entry to be more like the others,
by moving the features out of the `Proc<>`, thus potentially
making it possible to inherit from them.
Split off from D63628

Reviewers: craig.topper, RKSimon

Reviewed By: craig.topper

Subscribers: hiraditya, jfb, llvm-commits

Tags: #llvm

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

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

5 years ago[TableGen] FieldInit: improve assertion message
Roman Lebedev [Tue, 6 Aug 2019 17:03:50 +0000 (17:03 +0000)]
[TableGen] FieldInit: improve assertion message

Summary:
When fiddling with sched profiles, especially creating new ones, it's amazingly easy
to end up with malformed .td that crashes tablegen, without explanation of the bug.
This changes the most common assertion i have encountered to dump enough information
to be able to fix the .td

Split of from D63628

Reviewers: RKSimon, craig.topper, nhaehnle

Reviewed By: craig.topper

Subscribers: llvm-commits

Tags: #llvm

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

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

5 years ago[InstCombine] Shift amount reassociation: shl-trunc-shl pattern
Roman Lebedev [Tue, 6 Aug 2019 17:03:40 +0000 (17:03 +0000)]
[InstCombine] Shift amount reassociation: shl-trunc-shl pattern

Summary:
Currently `reassociateShiftAmtsOfTwoSameDirectionShifts()` only handles
two shifts one after another. If the shifts are `shl`, we still can
easily perform the fold, with no extra legality checks:
https://rise4fun.com/Alive/OQbM

If we have right-shift however, we won't be able to make it
any simpler than it already is.

After this the only thing missing here is constant-folding: (`NewShAmt >= bitwidth(X)`)
* If it's a logical shift, then constant-fold to `0` (not `undef`)
* If it's a `ashr`, then a splat of original signbit
https://rise4fun.com/Alive/E1K
https://rise4fun.com/Alive/i0V

Reviewers: spatel, nikic, xbolva00

Reviewed By: spatel

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

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

5 years ago[NFC][EarlyCSE] Pre-commit unary FNeg tests.
Cameron McInally [Tue, 6 Aug 2019 16:41:30 +0000 (16:41 +0000)]
[NFC][EarlyCSE] Pre-commit unary FNeg tests.

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

5 years agoRe-land D65760/r367944
Diego Caballero [Tue, 6 Aug 2019 16:24:17 +0000 (16:24 +0000)]
Re-land D65760/r367944

Fixed most vexing parse ambiguation.

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

5 years ago[Path] Fix bug in make_absolute logic
Jonas Devlieghere [Tue, 6 Aug 2019 15:46:45 +0000 (15:46 +0000)]
[Path] Fix bug in make_absolute logic

This fixes a bug for making path with a //net style root absolute. I
discovered the bug while writing a test case for the VFS, which uses
these paths because they're both legal absolute paths on Windows and
Unix.

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

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

5 years ago[CMake] Add mapping for IBM XL -qnoeh and -qnortti
Hubert Tong [Tue, 6 Aug 2019 15:08:13 +0000 (15:08 +0000)]
[CMake] Add mapping for IBM XL -qnoeh and -qnortti

Summary:
This patch maps in the `-qnoeh` and `-qnortti` options for building with
IBM XL compilers.

Reviewers: daltenty, xingxue, jasonliu

Reviewed By: daltenty

Subscribers: mgorny, llvm-commits

Tags: #llvm

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

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

5 years ago[AArch64] NFC: Generalize emitFrameOffset to support more than byte offsets.
Sander de Smalen [Tue, 6 Aug 2019 15:06:31 +0000 (15:06 +0000)]
[AArch64] NFC: Generalize emitFrameOffset to support more than byte offsets.

Refactor emitFrameOffset to accept a StackOffset struct as its offset argument.
This method currently only supports byte offsets (MVT::i8) but will be extended
in a later patch to support scalable offsets (MVT::nxv1i8) as well.

Reviewers: thegameg, rovka, t.p.northover, efriedma, greened

Reviewed By: efriedma

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

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

5 years ago[XCOFF][MC] report_fatal_error before dereferencing NULL
Hubert Tong [Tue, 6 Aug 2019 15:05:20 +0000 (15:05 +0000)]
[XCOFF][MC] report_fatal_error before dereferencing NULL

This patch replaces a TODO comment with a call to `report_fatal_error`.
The path that reaches the added call to `report_fatal_error` manifestly
dereferences a null pointer.

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

5 years ago[test/Object] - Cleanup the Object\obj2yaml.test a bit.
George Rimar [Tue, 6 Aug 2019 14:34:39 +0000 (14:34 +0000)]
[test/Object] - Cleanup the Object\obj2yaml.test a bit.

This makes 2 changes:

1) Removes unwind-section.elf-x86-64 object and the corresponding test case,
because SHT_X86_64_UNWIND is already tested here:
https://github.com/llvm-mirror/llvm/blob/master/test/tools/obj2yaml/section-type.yaml

2) Removes/partially moves "No such file or directory" test, because we already have a similar test here:
https://github.com/llvm-mirror/llvm/blob/master/test/tools/obj2yaml/invalid_input_file.test

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

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

5 years ago[TargetLowering] SimplifyMultipleUseDemandedBits - return UNDEF for undemanded ops
Simon Pilgrim [Tue, 6 Aug 2019 14:30:42 +0000 (14:30 +0000)]
[TargetLowering] SimplifyMultipleUseDemandedBits - return UNDEF for undemanded ops

If we demand no bits/elts from an Op, just return UNDEF

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

5 years ago[StructurizeCFG] Enable -structurizecfg-relaxed-uniform-regions by default
Tim Renouf [Tue, 6 Aug 2019 14:30:19 +0000 (14:30 +0000)]
[StructurizeCFG] Enable -structurizecfg-relaxed-uniform-regions by default

D62198 introduced an option to relax the checks for
hasOnlyUniformBranches. This commit turns the option on by default, for
better code generation in some cases in AMDGPU.

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

Change-Id: I9cbff002a1e74d3b7eb96b4192dc8129936d537d

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

5 years agoRevert "Fixed failing test cases"
Dmitri Gribenko [Tue, 6 Aug 2019 13:50:28 +0000 (13:50 +0000)]
Revert "Fixed failing test cases"

This reverts commit r368030, which depends on r368021 that I reverted.

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

5 years agoRevert "[yaml2obj] Move core yaml2obj code into lib and include for use in unit tests"
Dmitri Gribenko [Tue, 6 Aug 2019 13:39:50 +0000 (13:39 +0000)]
Revert "[yaml2obj] Move core yaml2obj code into lib and include for use in unit tests"

This reverts commit r368021, it broke tests.

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

5 years agoRevert "gn build: Merge r368021"
Dmitri Gribenko [Tue, 6 Aug 2019 13:39:27 +0000 (13:39 +0000)]
Revert "gn build: Merge r368021"

This reverts commit r368025, which depends on r368021, which needs to be
reverted.

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

5 years agoAArch64: bail instead of asserting on unexpected type in G_CONSTANT 0.
Tim Northover [Tue, 6 Aug 2019 13:34:08 +0000 (13:34 +0000)]
AArch64: bail instead of asserting on unexpected type in G_CONSTANT 0.

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

5 years agoFixed failing test cases
Alex Brachet [Tue, 6 Aug 2019 13:29:55 +0000 (13:29 +0000)]
Fixed failing test cases

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

5 years ago[InstCombine] add tests for binop with FMF with select operands; NFC
Sanjay Patel [Tue, 6 Aug 2019 13:19:13 +0000 (13:19 +0000)]
[InstCombine] add tests for binop with FMF with select operands; NFC

Baseline coverage for D65658.

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

5 years agogn build: Merge r368024
Nico Weber [Tue, 6 Aug 2019 13:12:26 +0000 (13:12 +0000)]
gn build: Merge r368024

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

5 years ago[X86][SSE] Call SimplifyMultipleUseDemandedBits on PACKSS/PACKUS arguments.
Simon Pilgrim [Tue, 6 Aug 2019 13:10:42 +0000 (13:10 +0000)]
[X86][SSE] Call SimplifyMultipleUseDemandedBits on PACKSS/PACKUS arguments.

This mainly helps to replace unused arguments with UNDEF in the case where they have multiple users.

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

5 years agogn build: Merge r368021
Nico Weber [Tue, 6 Aug 2019 13:08:54 +0000 (13:08 +0000)]
gn build: Merge r368021

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

5 years ago[AArch64] NFC: Add generic StackOffset to describe scalable offsets.
Sander de Smalen [Tue, 6 Aug 2019 13:06:40 +0000 (13:06 +0000)]
[AArch64] NFC: Add generic StackOffset to describe scalable offsets.

To support spilling/filling of scalable vectors we need a more generic
representation of a stack offset than simply 'int'.

For this we introduce the StackOffset struct, which comprises multiple
offsets sized by their respective MVTs. Byte-offsets will thus be a simple
tuple such as { offset, MVT::i8 }. Adding two byte-offsets will result in a
byte offset { offsetA + offsetB, MVT::i8 }. When two offsets have different
types, we can canonicalise them to use the same MVT, as long as their
runtime sizes are guaranteed to have the same size-ratio as they would have
at compile-time.

When we have both scalable- and fixed-size objects on the stack, we can
create an offset that is:

  ({ offset_fixed, MVT::i8 } + { offset_scalable, MVT::nxv1i8 })

The struct also contains a getForFrameOffset() method that is specific to
AArch64 and decomposes the frame-offset to be used directly in instructions
that operate on the stack or index into the stack.

Note: This patch adds StackOffset as an AArch64-only concept, but we would
like to make this a generic concept/struct that is supported by all
interfaces that take or return stack offsets (currently as 'int'). Since
that would be a bigger change that is currently pending on D32530 landing,
we thought it makes sense to first show/prove the concept in the AArch64
target before proposing to roll this out further.

Reviewers: thegameg, rovka, t.p.northover, efriedma, greened

Reviewed By: rovka, greened

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

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

5 years ago[llvm/test/Object] Remove redundant test case. NFC
Simon Atanasyan [Tue, 6 Aug 2019 12:41:43 +0000 (12:41 +0000)]
[llvm/test/Object] Remove redundant test case. NFC

Remove redundant `yaml2obj-elf-file-headers-with-e_flags.yaml` test
case. The same functionality is checked by the `Mips/elf-flags.yaml`.

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

5 years ago[X86] SimplifyMultipleUseDemandedBits - target shuffles might not be identity
Simon Pilgrim [Tue, 6 Aug 2019 12:41:29 +0000 (12:41 +0000)]
[X86] SimplifyMultipleUseDemandedBits - target shuffles might not be identity

If we don't demand any non-undef shuffle elements then the assert will fail as all shuffle inputs would still be flagged as 'identity' safe.

Exposed by an incoming patch.

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

5 years ago[yaml2obj] Move core yaml2obj code into lib and include for use in unit tests
Alex Brachet [Tue, 6 Aug 2019 12:15:18 +0000 (12:15 +0000)]
[yaml2obj] Move core yaml2obj code into lib and include for use in unit tests

Reviewers: jhenderson, rupprecht, MaskRay, grimar, labath

Reviewed By: rupprecht

Subscribers: seiya, mgorny, sbc100, hiraditya, aheejin, jakehehrlich, llvm-commits

Tags: #llvm

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

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

5 years agoTry to unbreak buildbots after r368014
Igor Kudrin [Tue, 6 Aug 2019 11:12:13 +0000 (11:12 +0000)]
Try to unbreak buildbots after r368014

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

5 years ago[X86][SSE] Enable min/max partial reduction
Simon Pilgrim [Tue, 6 Aug 2019 11:00:34 +0000 (11:00 +0000)]
[X86][SSE] Enable min/max partial reduction

As mentioned on D65047 / rL366933 the plan is to enable partial reduction handling wherever possible.

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

5 years ago[X86][SSE] Add tests for min/max partial reduction
Simon Pilgrim [Tue, 6 Aug 2019 10:52:44 +0000 (10:52 +0000)]
[X86][SSE] Add tests for min/max partial reduction

As mentioned on D65047 / rL366933 the plan is to enable partial reduction handling wherever possible.

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

5 years agoSwitch LLVM to use 64-bit offsets (2/5)
Igor Kudrin [Tue, 6 Aug 2019 10:49:40 +0000 (10:49 +0000)]
Switch LLVM to use 64-bit offsets (2/5)

This updates all libraries and tools in LLVM Core to use 64-bit offsets
which directly or indirectly come to DataExtractor.

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

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

5 years agoSupport 64-bit offsets in utility classes (1/5)
Igor Kudrin [Tue, 6 Aug 2019 10:47:20 +0000 (10:47 +0000)]
Support 64-bit offsets in utility classes (1/5)

Using 64-bit offsets is required to fully implement 64-bit DWARF.
As these classes are used in many different libraries they should
temporarily support both 32- and 64-bit offsets.

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

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

5 years ago[Strict FP] Allow custom operation actions
Ulrich Weigand [Tue, 6 Aug 2019 10:43:13 +0000 (10:43 +0000)]
[Strict FP] Allow custom operation actions

This patch changes the DAG legalizer to respect the operation actions
set by the target for strict floating-point operations. (Currently, the
legalizer will usually fall back to mutate to the non-strict action
(which is assumed to be legal), and only skip mutation if the strict
operation is marked legal.)

With this patch, if whenever a strict operation is marked as Legal or
Custom, it is passed to the target as usual. Only if it is marked as
Expand will the legalizer attempt to mutate to the non-strict operation.
Note that this will now fail if the non-strict operation is itself
marked as Custom -- the target will have to provide a Custom definition
for the strict operation then as well.

Reviewed By: hfinkel

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

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

5 years agoChange two unnecessary uses of llvm::size(C) to C.size()
Fangrui Song [Tue, 6 Aug 2019 10:24:36 +0000 (10:24 +0000)]
Change two unnecessary uses of llvm::size(C) to C.size()

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

5 years ago[SelectionDAG] Extend base addressing modes supported by MGATHER/MSCATTER
Cullen Rhodes [Tue, 6 Aug 2019 09:46:13 +0000 (09:46 +0000)]
[SelectionDAG] Extend base addressing modes supported by MGATHER/MSCATTER

Summary:
Before this patch MGATHER/MSCATTER is capable of representing all
common addressing modes, but only when illegal types are used.
This patch adds an IndexType property so more representations
are available when using legal types only.

Original modes:
 vector of bases
 base + vector of signed scaled offsets

New modes:
 base + vector of signed unscaled offsets
 base + vector of unsigned scaled offsets
 base + vector of unsigned unscaled offsets

The current behaviour of addressing modes for gather/scatter remains
unchanged.

Patch by Paul Walker.

Reviewed By: craig.topper

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

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