]> granicus.if.org Git - llvm/log
llvm
5 years agoFileCheck [3/12]: Stricter parsing of @LINE expressions
Thomas Preud'homme [Mon, 29 Apr 2019 17:46:26 +0000 (17:46 +0000)]
FileCheck [3/12]: Stricter parsing of @LINE expressions

Summary:
This patch is part of a patch series to add support for FileCheck
numeric expressions. This specific patch gives earlier and better
diagnostics for the @LINE expressions.

Rather than detect parsing errors at matching time, this commit adds
enhance parsing to detect issues with @LINE expressions at parse time
and diagnose them more accurately.

Copyright:
    - Linaro (changes up to diff 183612 of revision D55940)
    - GraphCore (changes in later versions of revision D55940 and
                 in new revision created off D55940)

Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk

Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield

Tags: #llvm

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

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

5 years ago[TableGen] Fix null pointer dereferencing.
Simon Pilgrim [Mon, 29 Apr 2019 17:41:27 +0000 (17:41 +0000)]
[TableGen] Fix null pointer dereferencing.

Reported in https://www.viva64.com/en/b/0629/

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

5 years agoAvoid "checking a pointer after dereferencing" warning. NFCI.
Simon Pilgrim [Mon, 29 Apr 2019 17:38:18 +0000 (17:38 +0000)]
Avoid "checking a pointer after dereferencing" warning. NFCI.

Reported in https://www.viva64.com/en/b/0629/

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

5 years agoMove if() to newline to stop ambiguity over whether it should be else if. NFCI.
Simon Pilgrim [Mon, 29 Apr 2019 17:34:26 +0000 (17:34 +0000)]
Move if() to newline to stop ambiguity over whether it should be else if. NFCI.

Reported in https://www.viva64.com/en/b/0629/

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

5 years agoFix operator precedence warning. NFCI.
Simon Pilgrim [Mon, 29 Apr 2019 17:04:14 +0000 (17:04 +0000)]
Fix operator precedence warning. NFCI.

Reported in https://www.viva64.com/en/b/0629/

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

5 years agoRemove superfluous break from switch statement. NFCI.
Simon Pilgrim [Mon, 29 Apr 2019 16:45:35 +0000 (16:45 +0000)]
Remove superfluous break from switch statement. NFCI.

Reported in https://www.viva64.com/en/b/0629/

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

5 years ago[llvm-extract] Expose the group extraction feature of the BlockExtractor
Quentin Colombet [Mon, 29 Apr 2019 16:14:03 +0000 (16:14 +0000)]
[llvm-extract] Expose the group extraction feature of the BlockExtractor

This patch extends the `-bb` option to be able to use the group
extraction feature from the BlockExtractor.
In particular, `-bb=func:bb` is modified to support a list of basic
blocks per function: `-bb=func:bb1[;bb2...]` that will be extracted
together if at all possible (region must be single entry.)

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

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

5 years ago[BlockExtractor] Expose a constructor for the group extraction
Quentin Colombet [Mon, 29 Apr 2019 16:14:02 +0000 (16:14 +0000)]
[BlockExtractor] Expose a constructor for the group extraction

NFC

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

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

5 years ago[BlockExtractor] Change the basic block separator from ',' to ';'
Quentin Colombet [Mon, 29 Apr 2019 16:14:00 +0000 (16:14 +0000)]
[BlockExtractor] Change the basic block separator from ',' to ';'

This change aims at making the file format be compatible with the
way LLVM handles command line options.

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

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

5 years agoAdd AVX support to this test.
Kevin P. Neal [Mon, 29 Apr 2019 16:06:04 +0000 (16:06 +0000)]
Add AVX support to this test.

Requested by Craig Topper and Andrew Kaylor as part of D55897.

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

5 years ago[X86] Remove duplicate string comparison
Simon Pilgrim [Mon, 29 Apr 2019 16:03:35 +0000 (16:03 +0000)]
[X86] Remove duplicate string comparison

Fix typo introduced in rL332824 where we simplified the extact string matches for "avx512.mask.permvar.sf.256" and "avx512.mask.permvar.si.256" to a string startswith test for "avx512.mask.permvar."

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

5 years ago[AArch64][SVE] Asm: add aliases for unpredicated bitwise logical instructions
Cullen Rhodes [Mon, 29 Apr 2019 15:27:27 +0000 (15:27 +0000)]
[AArch64][SVE] Asm: add aliases for unpredicated bitwise logical instructions

This patch adds aliases for element sizes .B/.H/.S to the
AND/ORR/EOR/BIC bitwise logical instructions. The assembler now accepts
these instructions with all element sizes up to 64-bit (.D). The
preferred disassembly is .D.

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

5 years ago[X86][SSE] Add scalar horizontal add/sub tests for non-0/1 element extractions
Simon Pilgrim [Mon, 29 Apr 2019 14:26:27 +0000 (14:26 +0000)]
[X86][SSE] Add scalar horizontal add/sub tests for non-0/1 element extractions

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

5 years agoFileCheck [2/12]: Stricter parsing of -D option
Thomas Preud'homme [Mon, 29 Apr 2019 13:32:36 +0000 (13:32 +0000)]
FileCheck [2/12]: Stricter parsing of -D option

Summary:
This patch is part of a patch series to add support for FileCheck
numeric expressions. This specific patch gives earlier and better
diagnostics for the -D option.

Prior to this change, parsing of -D option was very loose: it assumed
that there is an equal sign (which to be fair is now checked by the
FileCheck executable) and that the part on the left of the equal sign
was a valid variable name. This commit adds logic to ensure that this
is the case and gives diagnostic when it is not, making it clear that
the issue came from a command-line option error. This is achieved by
sharing the variable parsing code into a new function ParseVariable.

Copyright:
    - Linaro (changes up to diff 183612 of revision D55940)
    - GraphCore (changes in later versions of revision D55940 and
                 in new revision created off D55940)

Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk

Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield

Tags: #llvm

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

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

5 years ago[LoopSimplifyCFG] Suppress expensive DomTree verification
Yevgeny Rouban [Mon, 29 Apr 2019 13:29:55 +0000 (13:29 +0000)]
[LoopSimplifyCFG] Suppress expensive DomTree verification

This patch makes verification level lower for builds with
inexpensive checks.

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

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

5 years ago[yaml2obj] - Simplify and reduce the code. NFC.
George Rimar [Mon, 29 Apr 2019 12:25:01 +0000 (12:25 +0000)]
[yaml2obj] - Simplify and reduce the code. NFC.

This inlines 2 single line static methods
and simplifies the code.

It is also possible to remove the `Is64Bit`
variable since it is used only once,
but I am not sure it will be better for readability.

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

5 years ago[yaml2obj] - Replace a loop with write_zeros(). NFCI.
George Rimar [Mon, 29 Apr 2019 12:05:53 +0000 (12:05 +0000)]
[yaml2obj] - Replace a loop with write_zeros(). NFCI.

This looks better.

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

5 years ago[yaml2obj] - Cleanup and simplify the code. NFCI.
George Rimar [Mon, 29 Apr 2019 11:54:10 +0000 (11:54 +0000)]
[yaml2obj] - Cleanup and simplify the code. NFCI.

The current code has the following problems:
`initSymtabSectionHeader` and `initStrtabSectionHeader` method
names saying us they are going to initialize the section headers.
Though for a few cases sh_flags field is initialized outside of them.
It does not look clean. This patch moves initialization of the
sh_flags inside these methods.

Also, it removes an excessive variable, what together with the above
change hopefully makes the code a bit more readable.

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

5 years ago[X86][SSE] Moved haddps test from phaddsub.ll to haddsub.ll (D61245)
Simon Pilgrim [Mon, 29 Apr 2019 11:30:47 +0000 (11:30 +0000)]
[X86][SSE] Moved haddps test from phaddsub.ll to haddsub.ll (D61245)

Also merged duplicate PR39921 + PR39936 tests

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

5 years ago[InstCombine][X86] Add PACKSS tests for truncation of sign-extended comparisons
Simon Pilgrim [Mon, 29 Apr 2019 10:36:20 +0000 (10:36 +0000)]
[InstCombine][X86] Add PACKSS tests for truncation of sign-extended comparisons

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

5 years ago[ARM] Add bitcast/extract_subvec. of fp16 vectors
Diogo N. Sampaio [Mon, 29 Apr 2019 10:28:07 +0000 (10:28 +0000)]
[ARM] Add bitcast/extract_subvec. of fp16 vectors

Summary:
This patch adds some basic operations for fp16
vectors, such as bitcast from fp16 to i16,
required to perform extract_subvector (also added
here) and extract_element.

Reviewers: SjoerdMeijer, DavidSpickett, t.p.northover, ostannard

Reviewed By: ostannard

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

Tags: #llvm

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

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

5 years ago[ARM] Add v4f16 and v8f16 types to the CallingConv
Diogo N. Sampaio [Mon, 29 Apr 2019 10:10:37 +0000 (10:10 +0000)]
[ARM] Add v4f16 and v8f16 types to the CallingConv

Summary:
The Procedure Call Standard for the Arm Architecture
states that float16x4_t and float16x8_t behave just
as uint16x4_t and uint16x8_t for argument passing.
This patch adds the fp16 vectors to the
ARMCallingConv.td file.

Reviewers: miyuki, ostannard

Reviewed By: ostannard

Subscribers: ostannard, javed.absar, kristof.beyls, llvm-commits

Tags: #llvm

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

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

5 years agovs integration: Use llvm-lib for librarian
Russell Gallop [Mon, 29 Apr 2019 10:10:17 +0000 (10:10 +0000)]
vs integration: Use llvm-lib for librarian

This uses llvm-lib.exe for the librarian instead of Visual Studio
provided lib.exe. Without this it is not possible to create static
libraries with -flto using the plugin.

Original patch by Steven Noonan

This fixes: PR41147

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

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

5 years agogn: Fix check-clang build after r359179
Hans Wennborg [Mon, 29 Apr 2019 09:58:48 +0000 (09:58 +0000)]
gn: Fix check-clang build after r359179

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

5 years agoTry to use /proc on FreeBSD for getExecutablePath
David Chisnall [Mon, 29 Apr 2019 09:24:51 +0000 (09:24 +0000)]
Try to use /proc on FreeBSD for getExecutablePath

Currently, clang's libTooling passes this function a fake argv0, which
means that no libTooling tools can find the standard headers on FreeBSD.
With this change, these will now work on any FreeBSD systems that have
procfs mounted.  This isn't the right fix for the libTooling issue, but
it does bring the FreeBSD implementation of getExecutablePath closer to
the Linux and macOS implementations.

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

5 years ago[DebugInfo] Terminate more location-list ranges at the end of blocks
Jeremy Morse [Mon, 29 Apr 2019 09:13:16 +0000 (09:13 +0000)]
[DebugInfo] Terminate more location-list ranges at the end of blocks

This patch fixes PR40795, where constant-valued variable locations can
"leak" into blocks placed at higher addresses. The root of this is that
DbgEntityHistoryCalculator terminates all register variable locations at
the end of each block, but not constant-value variable locations.

Fixing this requires constant-valued DBG_VALUE instructions to be
broadcast into all blocks where the variable location remains valid, as
documented in the LiveDebugValues section of SourceLevelDebugging.rst,
and correct termination in DbgEntityHistoryCalculator.

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

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

5 years ago[DWARF] Fix dump of local/foreign TU lists in .debug_names
Fangrui Song [Mon, 29 Apr 2019 08:55:10 +0000 (08:55 +0000)]
[DWARF] Fix dump of local/foreign TU lists in .debug_names

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

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

5 years ago[DWARF] Delete a redundant check in getFileNameByIndex()
Fangrui Song [Mon, 29 Apr 2019 08:15:13 +0000 (08:15 +0000)]
[DWARF] Delete a redundant check in getFileNameByIndex()

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

5 years ago[X86] Remove some intel syntax aliases on (v)cvtpd2(u)dq, (v)cvtpd2ps, (v)cvt(u)qq2ps...
Craig Topper [Mon, 29 Apr 2019 06:13:41 +0000 (06:13 +0000)]
[X86] Remove some intel syntax aliases on (v)cvtpd2(u)dq, (v)cvtpd2ps, (v)cvt(u)qq2ps. Add 'x' and'y' suffix aliases to masked version of the same in att syntax.

The 128/256 bit version of these instructions require an 'x' or 'y' suffix to
disambiguate the memory form in att syntax.

We were allowing the same suffix in intel syntax, but it appears gas does not
do that.

gas does allow the 'x' and 'y' suffix on register and broadcast forms even
though its not needed. We were allowing it on unmasked register form, but not on
masked versions or on masked or unmasked broadcast form.

While there fix some test coverage holes so they can be extended with the 'x'
and 'y' suffix tests.

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

5 years ago[llvm-nm] -print-size => --print-size
Fangrui Song [Mon, 29 Apr 2019 06:03:59 +0000 (06:03 +0000)]
[llvm-nm] -print-size => --print-size

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

5 years ago[llvm-nm] Simplify and fix a buffer overflow
Fangrui Song [Mon, 29 Apr 2019 05:38:22 +0000 (05:38 +0000)]
[llvm-nm] Simplify and fix a buffer overflow

* char SymbolAddrStr[18] can't hold "%" PRIo64 which may need 22 characters.
* Use range-based for
* Delete unnecessary typedef
* format(...).print(Str, sizeof(Str)) + outs() << Str => outs() << format(...)
* Use cascading outs() << .. << ..
* Use iterator_range(Container &&c)
* (A & B) == B => A & B   if B is a power of 2
* replace null sentinel in constants with makeArrayRef

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

5 years agollvm-cvtres: Attempt to make llvm-cvtres/duplicate.test work on big-endian systems
Nico Weber [Mon, 29 Apr 2019 00:51:41 +0000 (00:51 +0000)]
llvm-cvtres: Attempt to make llvm-cvtres/duplicate.test work on big-endian systems

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

5 years ago[X86] Add PR39921 HADD pairwise reduction test and AVX2 test coverage
Simon Pilgrim [Sun, 28 Apr 2019 21:04:47 +0000 (21:04 +0000)]
[X86] Add PR39921 HADD pairwise reduction test and AVX2 test coverage

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

5 years ago[X86][AVX] Add fast-hops target for add/fadd reduction tests
Simon Pilgrim [Sun, 28 Apr 2019 20:04:08 +0000 (20:04 +0000)]
[X86][AVX] Add fast-hops target for add/fadd reduction tests

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

5 years ago[X86] Add PR39936 HADD Tests
Simon Pilgrim [Sun, 28 Apr 2019 20:03:11 +0000 (20:03 +0000)]
[X86] Add PR39936 HADD Tests

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

5 years ago[X86][SSE] combineExtractVectorElt - add early-out to return zero/undef for out-of...
Simon Pilgrim [Sun, 28 Apr 2019 19:12:58 +0000 (19:12 +0000)]
[X86][SSE] combineExtractVectorElt - add early-out to return zero/undef for out-of-range extraction indices.

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

5 years ago[ConstantRange] Add makeExactNoWrapRegion()
Nikita Popov [Sun, 28 Apr 2019 15:40:56 +0000 (15:40 +0000)]
[ConstantRange] Add makeExactNoWrapRegion()

I got confused on the terminology, and the change in D60598 was not
correct. I was thinking of "exact" in terms of the result being
non-approximate. However, the relevant distinction here is whether
the result is

 * Largest range such that:
   Forall Y in Other: Forall X in Result: X BinOp Y does not wrap.
   (makeGuaranteedNoWrapRegion)
 * Smallest range such that:
   Forall Y in Other: Forall X not in Result: X BinOp Y wraps.
   (A hypothetical makeAllowedNoWrapRegion)
 * Both. (makeExactNoWrapRegion)

I'm adding a separate makeExactNoWrapRegion method accepting a
single APInt (same as makeExactICmpRegion) and using it in the
places where the guarantee is relevant.

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

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

5 years ago[X86][AVX] Enabled AVX512F tests and add PR40815 test case
Simon Pilgrim [Sun, 28 Apr 2019 15:04:30 +0000 (15:04 +0000)]
[X86][AVX] Enabled AVX512F tests and add PR40815 test case

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

5 years ago[X86][AVX] Combine non-lane crossing binary shuffles using X86ISD::VPERMV3
Simon Pilgrim [Sun, 28 Apr 2019 14:31:01 +0000 (14:31 +0000)]
[X86][AVX] Combine non-lane crossing binary shuffles using X86ISD::VPERMV3

Some of the combines might be further improved if we lower more shuffles with X86ISD::VPERMV3 directly, instead of waiting to combine the results.

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

5 years ago[SelectionDAG] include FP min/max variants as binary operators
Sanjay Patel [Sun, 28 Apr 2019 13:19:29 +0000 (13:19 +0000)]
[SelectionDAG] include FP min/max variants as binary operators

The x86 test diffs don't look great because of extra move ops,
but FP min/max should clearly be included in the list.

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

5 years ago[DAGCombiner] try repeated fdiv divisor transform before building estimate
Sanjay Patel [Sun, 28 Apr 2019 12:23:43 +0000 (12:23 +0000)]
[DAGCombiner] try repeated fdiv divisor transform before building estimate

This was originally part of D61028, but it's an independent diff.

If we try the repeated divisor reciprocal transform before producing an estimate sequence,
then we have an opportunity to use scalar fdiv. On x86, the trade-off is 1 divss vs. 5
vector FP ops in the default estimate sequence. On recent chips (Skylake, Ryzen), the
full-precision division is only 3 cycle throughput, so that's probably the better perf
default option and avoids problems from x86's inaccurate estimates.

The last 2 tests show that users still have the option to override the defaults by using
the function attributes for reciprocal estimates, but those patterns are potentially made
faster by converting the vector ops (including ymm ops) to scalar math.

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

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

5 years ago[MCA] Fix typo in AVX2 gather tests. NFC
Andrea Di Biagio [Sun, 28 Apr 2019 10:54:45 +0000 (10:54 +0000)]
[MCA] Fix typo in AVX2 gather tests. NFC

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

5 years ago[X86][SSE] Optimize llvm.experimental.vector.reduce.xor.vXi1 parity reduction (PR38840)
Simon Pilgrim [Sun, 28 Apr 2019 10:46:17 +0000 (10:46 +0000)]
[X86][SSE] Optimize llvm.experimental.vector.reduce.xor.vXi1 parity reduction (PR38840)

An xor reduction of a bool vector can be optimized to a parity check of the MOVMSK/BITCAST'd integer - if the population count is odd return 1, else return 0.

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

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

5 years ago[X86][AVX] Add AVX512DQ coverage for masked memory ops tests (PR34584)
Simon Pilgrim [Sun, 28 Apr 2019 10:02:34 +0000 (10:02 +0000)]
[X86][AVX] Add AVX512DQ coverage for masked memory ops tests (PR34584)

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

5 years ago[X86] Remove (V)MOV64toSDrr/m and (V)MOVDI2SSrr/m. Use 128-bit result MOVD/MOVQ and...
Craig Topper [Sun, 28 Apr 2019 06:25:33 +0000 (06:25 +0000)]
[X86] Remove (V)MOV64toSDrr/m and (V)MOVDI2SSrr/m. Use 128-bit result MOVD/MOVQ and COPY_TO_REGCLASS instead

Summary:
The register form of these instructions are CodeGenOnly instructions that cover
GR32->FR32 and GR64->FR64 bitcasts. There is a similar set of instructions for
the opposite bitcast. Due to the patterns using bitcasts these instructions get
marked as "bitcast" machine instructions as well. The peephole pass is able to
look through these as well as other copies to try to avoid register bank copies.

Because FR32/FR64/VR128 are all coalescable to each other we can end up in a
situation where a GR32->FR32->VR128->FR64->GR64 sequence can be reduced to
GR32->GR64 which the copyPhysReg code can't handle.

To prevent this, this patch removes one set of the 'bitcast' instructions. So
now we can only go GR32->VR128->FR32 or GR64->VR128->FR64. The instruction that
converts from GR32/GR64->VR128 has no special significance to the peephole pass
and won't be looked through.

I guess the other option would be to add support to copyPhysReg to just promote
the GR32->GR64 to a GR64->GR64 copy. The upper bits were basically undefined
anyway. But removing the CodeGenOnly instruction in favor of one that won't be
optimized seemed safer.

I deleted the peephole test because it couldn't be made to work with the bitcast
instructions removed.

The load version of the instructions were unnecessary as the pattern that selects
them contains a bitcasted load which should never happen.

Fixes PR41619.

Reviewers: RKSimon, spatel

Reviewed By: RKSimon

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

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

5 years agoRevert rL359389: [X86][SSE] Add support for <64 x i1> bool reduction
Simon Pilgrim [Sat, 27 Apr 2019 20:44:08 +0000 (20:44 +0000)]
Revert rL359389: [X86][SSE] Add support for <64 x i1> bool reduction

Minor generalization of the existing <32 x i1> pre-AVX2 split code.
........
Causing irregular buildbot failures.

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

5 years ago[X86][AVX] Add additional SSE/AVX expandload and compressstore targets
Simon Pilgrim [Sat, 27 Apr 2019 20:20:02 +0000 (20:20 +0000)]
[X86][AVX] Add additional SSE/AVX expandload and compressstore targets

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

5 years ago[X86][SSE] Add support for <64 x i1> bool reduction
Simon Pilgrim [Sat, 27 Apr 2019 20:04:44 +0000 (20:04 +0000)]
[X86][SSE] Add support for <64 x i1> bool reduction

Minor generalization of the existing <32 x i1> pre-AVX2 split code.

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

5 years ago[X86][AVX] Cleanup and add additional expandload and compressstore tests
Simon Pilgrim [Sat, 27 Apr 2019 19:57:34 +0000 (19:57 +0000)]
[X86][AVX] Cleanup and add additional expandload and compressstore tests

sort order by types and add vXi32/vXi16/vXi8 test coverage

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

5 years ago[X86][AVX512] Improve vector bool reductions
Simon Pilgrim [Sat, 27 Apr 2019 17:32:46 +0000 (17:32 +0000)]
[X86][AVX512] Improve vector bool reductions

As predicate masks are legal on AVX512 targets, we avoid MOVMSK in these cases, but we can just bitcast the bool vector to the integer equivalent directly - avoiding expansion of the reduction to a shuffle pattern.

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

5 years ago[X86] Add vector boolean reduction tests (PR38840)
Simon Pilgrim [Sat, 27 Apr 2019 16:49:54 +0000 (16:49 +0000)]
[X86] Add vector boolean reduction tests (PR38840)

AND/OR/XOR tests for the @llvm.experimental.vector.reduce intrinsics

AND/OR are pretty good (pre-AVX512), XOR (not so common but used for parity reduction) is still pretty bad.

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

5 years ago[lli] Fix a typo in a cl::opt description.
Lang Hames [Sat, 27 Apr 2019 16:13:53 +0000 (16:13 +0000)]
[lli] Fix a typo in a cl::opt description.

Patch by Wasiher. Thanks Wasiher!

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

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

5 years ago[llvm-nm][llvm-readelf] Avoid single-dash -long-option in tests
Fangrui Song [Sat, 27 Apr 2019 16:12:14 +0000 (16:12 +0000)]
[llvm-nm][llvm-readelf] Avoid single-dash -long-option in tests

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

5 years agoFix check-prefixes typo
Simon Pilgrim [Sat, 27 Apr 2019 15:41:14 +0000 (15:41 +0000)]
Fix check-prefixes typo

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

5 years ago[DJB] Fix variable case after D61178
Fangrui Song [Sat, 27 Apr 2019 15:33:22 +0000 (15:33 +0000)]
[DJB] Fix variable case after D61178

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

5 years ago[llvm-nm] Support section type 'u': STB_GNU_UNIQUE
Fangrui Song [Sat, 27 Apr 2019 15:32:53 +0000 (15:32 +0000)]
[llvm-nm] Support section type 'u': STB_GNU_UNIQUE

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

5 years ago[X86][SSE] Add initial test case for subvector insert/extract of illegal types
Simon Pilgrim [Sat, 27 Apr 2019 15:30:06 +0000 (15:30 +0000)]
[X86][SSE] Add initial test case for subvector insert/extract of illegal types

Suggested by @nikic on D59188

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

5 years ago[X86][AVX] Merge mask select with shuffles across extract_subvector (PR40332)
Simon Pilgrim [Sat, 27 Apr 2019 13:35:32 +0000 (13:35 +0000)]
[X86][AVX] Merge mask select with shuffles across extract_subvector (PR40332)

Fixes PR40332 in the limited case where we're selecting between a target shuffle and a zero vector.

We can extend this in the future to handle more opcodes and non-zero selections.

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

5 years ago[MCA] Add field `IsEliminated` to class Instruction. NFCI
Andrea Di Biagio [Sat, 27 Apr 2019 11:59:11 +0000 (11:59 +0000)]
[MCA] Add field `IsEliminated` to class Instruction. NFCI

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

5 years ago[cmake] Disable a GCC optimization when building LLVM for MIPS
Simon Atanasyan [Sat, 27 Apr 2019 09:28:54 +0000 (09:28 +0000)]
[cmake] Disable a GCC optimization when building LLVM for MIPS

GCC when compiling LLVM for MIPS can introduce a jump to an uninitialized
value when shrink wrapping is enabled. As shrink wrapping is enabled in
GCC at all optimization levels, it must be disabled. This bug exists for
all versions of GCC since 4.9.2.

This partially resolves PR37701 / GCC PR target/86069.

Patch by Simon Dardis.

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

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

5 years ago[X86] Use MOVQ for i64 atomic_stores when SSE2 is enabled
Craig Topper [Sat, 27 Apr 2019 03:38:15 +0000 (03:38 +0000)]
[X86] Use MOVQ for i64 atomic_stores when SSE2 is enabled

Summary: If we have SSE2 we can use a MOVQ to store 64-bits and avoid falling back to a cmpxchg8b loop. If its a seq_cst store we need to insert an mfence after the store.

Reviewers: spatel, RKSimon, reames, jfb, efriedma

Reviewed By: RKSimon

Subscribers: hiraditya, dexonsmith, llvm-commits

Tags: #llvm

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

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

5 years agoRevert "AMDGPU: Split block for si_end_cf"
Mark Searles [Sat, 27 Apr 2019 00:51:18 +0000 (00:51 +0000)]
Revert "AMDGPU: Split block for si_end_cf"

This reverts commit 7a6ef3004655dd86d722199c471ae78c28e31bb4.

We discovered some internal test failures, so reverting for now.

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

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

5 years ago[AMDGPU] gfx1010 VOPC implementation
Stanislav Mekhanoshin [Fri, 26 Apr 2019 23:16:16 +0000 (23:16 +0000)]
[AMDGPU] gfx1010 VOPC implementation

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

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

5 years ago[ORC] Add a 'plugin' interface to ObjectLinkingLayer for events/configuration.
Lang Hames [Fri, 26 Apr 2019 22:58:39 +0000 (22:58 +0000)]
[ORC] Add a 'plugin' interface to ObjectLinkingLayer for events/configuration.

ObjectLinkingLayer::Plugin provides event notifications when objects are loaded,
emitted, and removed. It also provides a modifyPassConfig callback that allows
plugins to modify the JITLink pass configuration.

This patch moves eh-frame registration into its own plugin, and teaches
llvm-jitlink to only add that plugin when performing execution runs on
non-Windows platforms. This should allow us to re-enable the test case that was
removed in r359198.

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

5 years ago[GlobalISel][AArch64] Use getConstantVRegValWithLookThrough for extracts
Jessica Paquette [Fri, 26 Apr 2019 21:53:13 +0000 (21:53 +0000)]
[GlobalISel][AArch64] Use getConstantVRegValWithLookThrough for extracts

getConstantVRegValWithLookThrough does the same thing as the
getConstantValueForReg function, and has more visibility across GISel. Plus, it
supports looking through G_TRUNC, G_SEXT, and G_ZEXT. So, we get better code
reuse and more functionality for free by using it.

Add some test cases to select-extract-vector-elt.mir to show that we can now
look through those instructions.

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

5 years ago[AsmPrinter] refactor to support %c w/ GlobalAddress'
Nick Desaulniers [Fri, 26 Apr 2019 18:45:04 +0000 (18:45 +0000)]
[AsmPrinter] refactor to support %c w/ GlobalAddress'

Summary:
Targets like ARM, MSP430, PPC, and SystemZ have complex behavior when
printing the address of a MachineOperand::MO_GlobalAddress. Move that
handling into a new overriden method in each base class. A virtual
method was added to the base class for handling the generic case.

Refactors a few subclasses to support the target independent %a, %c, and
%n.

The patch also contains small cleanups for AVRAsmPrinter and
SystemZAsmPrinter.

It seems that NVPTXTargetLowering is possibly missing some logic to
transform GlobalAddressSDNodes for
TargetLowering::LowerAsmOperandForConstraint to handle with "i" extended
inline assembly asm constraints.

Fixes:
- https://bugs.llvm.org/show_bug.cgi?id=41402
- https://github.com/ClangBuiltLinux/linux/issues/449

Reviewers: echristo, void

Reviewed By: void

Subscribers: void, craig.topper, jholewinski, dschuff, jyknight, dylanmckay, sdardis, nemanjai, javed.absar, sbc100, jgravelle-google, eraman, kristof.beyls, hiraditya, aheejin, kbarton, fedor.sergeev, jrtc27, atanasyan, jsji, llvm-commits, kees, tpimh, nathanchance, peter.smith, srhines

Tags: #llvm

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

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

5 years ago[X86][AVX] Fold extract_subvector(broadcast(x)) -> broadcast(x) iff x has one use
Simon Pilgrim [Fri, 26 Apr 2019 18:02:14 +0000 (18:02 +0000)]
[X86][AVX] Fold extract_subvector(broadcast(x)) -> broadcast(x) iff x has one use

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

5 years ago[AArch64][GlobalISel] Select G_BSWAP for vectors of s32 and s64
Jessica Paquette [Fri, 26 Apr 2019 18:00:01 +0000 (18:00 +0000)]
[AArch64][GlobalISel] Select G_BSWAP for vectors of s32 and s64

There are instructions for these, so mark them as legal. Select the correct
instruction in AArch64InstructionSelector.cpp.

Update select-bswap.mir and arm64-rev.ll to reflect the changes.

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

5 years ago[AMDGPU] gfx1010 VOP3 and VOP3P implementation
Stanislav Mekhanoshin [Fri, 26 Apr 2019 17:56:03 +0000 (17:56 +0000)]
[AMDGPU] gfx1010 VOP3 and VOP3P implementation

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

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

5 years ago[DAGCombine] Cleanup visitEXTRACT_SUBVECTOR. NFCI.
Simon Pilgrim [Fri, 26 Apr 2019 17:49:02 +0000 (17:49 +0000)]
[DAGCombine] Cleanup visitEXTRACT_SUBVECTOR. NFCI.

Use ArrayRef::slice, reduce some rather awkward long lines for legibility and run clang-format.

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

5 years ago[ConstantRange] Add abs() support
Nikita Popov [Fri, 26 Apr 2019 16:50:31 +0000 (16:50 +0000)]
[ConstantRange] Add abs() support

Add support for abs() to ConstantRange. This will allow to handle
SPF_ABS select flavor in LVI and will also come in handy as a
primitive for the srem implementation.

The implementation is slightly tricky, because a) abs of signed min
is signed min and b) sign-wrapped ranges may have an abs() that is
smaller than a full range, so we need to explicitly handle them.

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

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

5 years ago[X86] Sink NoRegister creation for unused Base/Index registers into getAddressOperand...
Craig Topper [Fri, 26 Apr 2019 16:39:38 +0000 (16:39 +0000)]
[X86] Sink NoRegister creation for unused Base/Index registers into getAddressOperands. NFCI

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

5 years ago[X86] Segment registers should have i16 type not i32.
Craig Topper [Fri, 26 Apr 2019 16:39:35 +0000 (16:39 +0000)]
[X86] Segment registers should have i16 type not i32.

Probably doesn't really matter, but was inconsistent with the rest of the code.

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

5 years ago[AMDGPU] gfx1010 VOP2 changes
Stanislav Mekhanoshin [Fri, 26 Apr 2019 16:37:51 +0000 (16:37 +0000)]
[AMDGPU] gfx1010 VOP2 changes

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

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

5 years ago[llvm-nm] Revert inadvertently committed 'i' change in r359314
Fangrui Song [Fri, 26 Apr 2019 16:27:11 +0000 (16:27 +0000)]
[llvm-nm] Revert inadvertently committed 'i' change in r359314

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

5 years ago[ThinLTO] Fix X86/strong_non_prevailing.ll after llvm-nm 'r' change
Fangrui Song [Fri, 26 Apr 2019 16:21:51 +0000 (16:21 +0000)]
[ThinLTO] Fix X86/strong_non_prevailing.ll after llvm-nm 'r' change

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

5 years ago[PowerPC] Update P9 vector costs for insert/extract element
Roland Froese [Fri, 26 Apr 2019 16:14:17 +0000 (16:14 +0000)]
[PowerPC] Update P9 vector costs for insert/extract element

The PPC vector cost model values for insert/extract element reflect older
processors that lacked vector insert/extract and move-to/move-from VSR
instructions.  Update getVectorInstrCost to give appropriate values for when
the newer instructions are present.

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

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

5 years ago[llvm-nm] Generalize symbol types 'N', 'n' and '?'
Fangrui Song [Fri, 26 Apr 2019 16:03:31 +0000 (16:03 +0000)]
[llvm-nm] Generalize symbol types 'N', 'n' and '?'

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

5 years ago[llvm-nm] Fix handling of symbol types 't' 'd' 'r'
Fangrui Song [Fri, 26 Apr 2019 16:01:48 +0000 (16:01 +0000)]
[llvm-nm] Fix handling of symbol types 't' 'd' 'r'

In addition, fix and convert the two tests to yaml2obj based. This
allows us to delete two executables.

X86/weak.test: 'v' was not tested
X86/init-fini.test: symbol types of __bss_start _edata _end were wrong
  GNU nm reports __init_array_start as 't', and __preinit_array_start as 'd'.
  __init_array_start is 't' just because its section ".init_array" starts with ".init"

  'd' makes more sense and allows us to drop the weird SHT_INIT_ARRAY rule.
  So, change __init_array_start to 'd' instead.

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

5 years ago[docs] Put DefaultOption bullet in alphabetical order.
Don Hinton [Fri, 26 Apr 2019 15:22:21 +0000 (15:22 +0000)]
[docs] Put DefaultOption bullet in alphabetical order.

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

5 years ago[llvm-nm][llvm-size] Use --double-dash options in tests
Fangrui Song [Fri, 26 Apr 2019 13:42:16 +0000 (13:42 +0000)]
[llvm-nm][llvm-size] Use --double-dash options in tests

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

5 years agos/Dwarf 5/DWARF v5/ NFC
Fangrui Song [Fri, 26 Apr 2019 13:41:19 +0000 (13:41 +0000)]
s/Dwarf 5/DWARF v5/ NFC

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

5 years ago[x86] add tests for fmin/fmax; NFC
Sanjay Patel [Fri, 26 Apr 2019 13:36:37 +0000 (13:36 +0000)]
[x86] add tests for fmin/fmax; NFC

'maximum' and 'minimum' still crash, so they are commented out.

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

5 years agoFix llvm-objcopy/ELF/preserve-segment-contents test on UTF-8 locale
Alexandre Ganea [Fri, 26 Apr 2019 13:09:26 +0000 (13:09 +0000)]
Fix llvm-objcopy/ELF/preserve-segment-contents test on UTF-8 locale

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

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

5 years ago[yaml2obj] - Make implicitSectionNames() return std::vector<StringRef>. NFCI.
George Rimar [Fri, 26 Apr 2019 13:09:11 +0000 (13:09 +0000)]
[yaml2obj] - Make implicitSectionNames() return std::vector<StringRef>. NFCI.

No need to use SmallVector of char* here.
This simplifies the code.

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

5 years ago[yaml2obj] - Remove excessive variable. NFC.
George Rimar [Fri, 26 Apr 2019 12:45:54 +0000 (12:45 +0000)]
[yaml2obj] - Remove excessive variable. NFC.

`auto &Strtab` was used only once.

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

5 years agoFix Wparentheses warning. NFCI.
Simon Pilgrim [Fri, 26 Apr 2019 12:23:42 +0000 (12:23 +0000)]
Fix Wparentheses warning. NFCI.

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

5 years ago[yaml2obj] - Make the code to match the LLVM style. NFCI.
George Rimar [Fri, 26 Apr 2019 12:20:51 +0000 (12:20 +0000)]
[yaml2obj] - Make the code to match the LLVM style. NFCI.

This renames the variables to uppercase and
removes use of `auto` for unobvious type.

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

5 years ago[yaml2elf] - Cleanup the initSectionHeaders(). NFCI.
George Rimar [Fri, 26 Apr 2019 12:15:32 +0000 (12:15 +0000)]
[yaml2elf] - Cleanup the initSectionHeaders(). NFCI.

This encapsulates the section specific code inside the
corresponding writeSectionContent methods.
Making the code a bit more consistent.

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

5 years ago[X86][SSE] Pull out OR(EXTRACTELT(X,0),OR(EXTRACTELT(X,1),...)) matching code from...
Simon Pilgrim [Fri, 26 Apr 2019 11:45:54 +0000 (11:45 +0000)]
[X86][SSE] Pull out OR(EXTRACTELT(X,0),OR(EXTRACTELT(X,1),...)) matching code from LowerVectorAllZeroTest

Create a matchBitOpReduction helper that checks for the pattern with any opcode.

First step towards reusing this code to recognize other scalar reduction patterns.

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

5 years agoMinor formatting tweak, no behavior change
Nico Weber [Fri, 26 Apr 2019 11:44:10 +0000 (11:44 +0000)]
Minor formatting tweak, no behavior change

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

5 years agocaseFoldingDjbHash: simplify and make the US-ASCII fast path faster
Fangrui Song [Fri, 26 Apr 2019 10:56:10 +0000 (10:56 +0000)]
caseFoldingDjbHash: simplify and make the US-ASCII fast path faster

The slow path (with at least one non US-ASCII) will be slower but that
doesn't matter.

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

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

5 years ago[X86][SSE] Disable shouldFoldConstantShiftPairToMask for btver1/btver2 targets (PR40758)
Simon Pilgrim [Fri, 26 Apr 2019 10:49:13 +0000 (10:49 +0000)]
[X86][SSE] Disable shouldFoldConstantShiftPairToMask for btver1/btver2 targets (PR40758)

As detailed on PR40758, Bobcat/Jaguar can perform vector immediate shifts on the same pipes as vector ANDs with the same latency - so it doesn't make sense to replace a shl+lshr with a shift+and pair as it requires an additional mask (with the extra constant pool, loading and register pressure costs).

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

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

5 years ago[X86][AVX] Combine shuffles extracted from a common vector
Simon Pilgrim [Fri, 26 Apr 2019 09:56:14 +0000 (09:56 +0000)]
[X86][AVX] Combine shuffles extracted from a common vector

A small step towards combining shuffles across vector sizes - this recognizes when a shuffle's operands are all extracted from the same larger source and tries to combine to an unary shuffle of that source instead. Fixes one of the test cases from PR34380.

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

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

5 years ago[InferAddressSpaces] Add AS parameter to the pass factory
Sven van Haastregt [Fri, 26 Apr 2019 09:21:25 +0000 (09:21 +0000)]
[InferAddressSpaces] Add AS parameter to the pass factory

This enables the pass to be used in the absence of
TargetTransformInfo. When the argument isn't passed, the factory
defaults to UninitializedAddressSpace and the flat address space is
obtained from the TargetTransformInfo as before this change. Existing
users won't have to change.

Patch by Kevin Petit.

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

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

5 years agoFix alignment in AArch64InstructionSelector::emitConstantPoolEntry()
Hans Wennborg [Fri, 26 Apr 2019 08:31:00 +0000 (08:31 +0000)]
Fix alignment in AArch64InstructionSelector::emitConstantPoolEntry()

The code was using the alignment of a pointer to the value, not the
alignment of the constant itself.

Maybe we got away with it so far because the pointer alignment is
fairly high, but we did end up under-aligning <16 x i8> vectors,
which was caught in the Chromium build after lld stopped over-aligning
the .rodata.cst16 section in r356428. (See crbug.com/953815)

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

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

5 years ago[GlobalISel] Fix inserting copies in the right position for reg definitions
Marcello Maggioni [Fri, 26 Apr 2019 07:21:56 +0000 (07:21 +0000)]
[GlobalISel] Fix inserting copies in the right position for reg definitions

When constrainRegClass is called if the constraining happens on a use the COPY
needs to be inserted before the instruction that contains the MachineOperand,
but if we are constraining a definition it actually needs to be added
after the instruction. In addition, the COPY needs to have its operands
flipped (in the use case we are copying from the old unconstrained register
to the new constrained register, while in the definition case we are copying
from the new constrained register that the instruction defines to the old
unconstrained register).

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

5 years agoFix typos: (re)?sor?uce -> (re)?source
Fangrui Song [Fri, 26 Apr 2019 05:56:23 +0000 (05:56 +0000)]
Fix typos: (re)?sor?uce -> (re)?source

Closes: https://github.com/llvm/llvm-project/pull/10
In-collaboration-with: Olivier Cochard-LabbĂ© <olivier@FreeBSD.org>
Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
Differential Revision: https://reviews.llvm.org/D61021

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

5 years ago[NFC] Add baseline tests for int isKnownNonZero
Dan Robertson [Fri, 26 Apr 2019 02:55:54 +0000 (02:55 +0000)]
[NFC] Add baseline tests for int isKnownNonZero

Add baseline tests for improvements of isKnownNonZero for integer types.

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

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

5 years ago[llvm-objcopy] Accept --long-option but not -long-option
Fangrui Song [Fri, 26 Apr 2019 02:10:10 +0000 (02:10 +0000)]
[llvm-objcopy] Accept --long-option but not -long-option

Summary:

llvm-{objcopy,strip} (and many other LLVM binary utilities) accept
cl::opt style -long-option as well as many short options (e.g. -p -S
-x). People who use them as replacement of GNU binutils often use the
grouped option syntax (POSIX Utility Conventions), e.g. -Sx => -S -x,
-Wd => -W -d, -sj.text => -s -j.text

There is ambiguity if a long option starts with the character used by a
short option. Drop the support for -long-option to resolve the ambiguity.

This divergence from other utilities is accepted (other utilities
continue supporting -long-option).
https://lists.llvm.org/pipermail/llvm-dev/2019-April/131786.html

Reviewers: alexshap, jakehehrlich, jhenderson, rupprecht, espindola

Reviewed By: jakehehrlich, jhenderson, rupprecht

Subscribers: grimar, emaste, arichardson, llvm-commits

Tags: #llvm

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

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