1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
Commit Graph

186283 Commits

Author SHA1 Message Date
Joel E. Denny
2c2c40daf4 [lit] Try again to fix new tests that fail on Windows bots
Based on the bot logs, when lit's internal diff runs on Windows, it
looks like binary diffs must be decoded also for Python 2.7.
Otherwise, writing the diff to stdout fails with:

```
UnicodeEncodeError: 'ascii' codec can't encode characters in position 7-8: ordinal not in range(128)
```

I did not need to decode using Python 2.7.15 under Ubuntu.  When I do
it anyway in that case, `errors="backslashreplace"` fails for me:

```
TypeError: don't know how to handle UnicodeDecodeError in error callback
```

However, `errors="ignore"` works, so this patch uses that, hoping
it'll work on Windows as well.

This patch leaves `errors="backslashreplace"` for Python >= 3.5 as
there's no evidence yet that doesn't work and it produces more
informative binary diffs.  This patch also adjusts some lit tests to
succeed for either error handler.

This patch adjusts changes introduced by D68664.

llvm-svn: 374657
2019-10-12 14:58:43 +00:00
Joel E. Denny
c7a6363e4e Revert r374654: "[lit] Try to fix new tests that fail on Windows bots"
llvm-svn: 374656
2019-10-12 14:58:30 +00:00
Simon Pilgrim
a95636568c [CostModel][X86] Improve sum reduction costs.
I can't see any notable differences in costs between SSE2 and SSE42 arches for FADD/ADD reduction, so I've lowered the target to just SSE2.

I've also added vXi8 sum reduction costs in line with the PSADBW codegen and discussions on PR42674.

llvm-svn: 374655
2019-10-12 13:21:50 +00:00
Joel E. Denny
54241b4586 [lit] Try to fix new tests that fail on Windows bots
llvm-svn: 374654
2019-10-12 13:08:21 +00:00
Joel E. Denny
4e060cb8b6 [lit] Fix a few oversights in r374651 that broke some bots
llvm-svn: 374653
2019-10-12 12:32:00 +00:00
Joel E. Denny
f27acb89d1 [lit] Fix internal diff's --strip-trailing-cr and use it
Using GNU diff, `--strip-trailing-cr` removes a `\r` appearing before
a `\n` at the end of a line.  Without this patch, lit's internal diff
only removes `\r` if it appears as the last character.  That seems
useless.  This patch fixes that.

This patch also adds `--strip-trailing-cr` to some tests that fail on
Windows bots when D68664 is applied.  Based on what I see in the bot
logs, I think the following is happening.  In each test there, lit
diff is comparing a file with `\r\n` line endings to a file with `\n`
line endings.  Without D68664, lit diff reads those files with
Python's universal newlines support activated, causing `\r` to be
dropped.  However, with D68664, lit diff reads the files in binary
mode instead and thus reports that every line is different, just as
GNU diff does (at least under Ubuntu).  Adding `--strip-trailing-cr`
to those tests restores the previous behavior while permitting the
behavior of lit diff to be more like GNU diff.

Reviewed By: rnk

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

llvm-svn: 374652
2019-10-12 11:58:30 +00:00
Joel E. Denny
57c8d7e7d7 Reland r374392: [lit] Extend internal diff to support -U
To avoid breaking some tests, D66574, D68664, D67643, and D68668
landed together.  However, D68664 introduced an issue now addressed by
D68839, with which these are now all relanding.

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

llvm-svn: 374651
2019-10-12 11:58:03 +00:00
Joel E. Denny
c9e5247388 Reland r374390: [lit] Extend internal diff to support - argument
To avoid breaking some tests, D66574, D68664, D67643, and D68668
landed together.  However, D68664 introduced an issue now addressed by
D68839, with which these are now all relanding.

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

llvm-svn: 374650
2019-10-12 11:57:41 +00:00
Joel E. Denny
9fc517081f Reland r374389: [lit] Clean up internal diff's encoding handling
To avoid breaking some tests, D66574, D68664, D67643, and D68668
landed together.  However, D68664 introduced an issue now addressed by
D68839, with which these are now all relanding.

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

llvm-svn: 374649
2019-10-12 11:57:20 +00:00
Joel E. Denny
c14a613f67 Reland r374388: [lit] Make internal diff work in pipelines
To avoid breaking some tests, D66574, D68664, D67643, and D68668
landed together.  However, D68664 introduced an issue now addressed by
D68839, with which these are now all relanding.

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

llvm-svn: 374648
2019-10-12 11:56:57 +00:00
Benjamin Kramer
8ac85c7928 [Attributor] Extend anonymous namespace. NFC.
llvm-svn: 374647
2019-10-12 11:01:52 +00:00
Benjamin Kramer
2d3816bb5d [LV] Merge LLVM_DEBUG blocks.
Avoids unused variable warnings about the range-based for loops in
there. NFCI.

llvm-svn: 374646
2019-10-12 10:57:22 +00:00
Craig Topper
1be8c5bd99 [X86] Use pack instructions for packus/ssat truncate patterns when 256-bit is the largest legal vector and the result type is at least 256 bits.
Since the input type is larger than 256-bits we'll need to some
concatenating to reassemble the results. The pack instructions
ability to concatenate while packing make this a shorter/faster
sequence.

llvm-svn: 374643
2019-10-12 07:59:29 +00:00
Craig Topper
99a98930e2 [X86] Test SKX cpu in the vector-trunc-packus/ssat/usat.ll tests instad of min-legal-vector-width.ll
This adds "min-legal-vector-width"="256" function attributes to
all the tests for a larger than 256-bit input. Also switch any
larger than 512-bit inputs to use a load. This makes the
arguments consistent with min-legal-vector-width attribute which
should usually be at least as large as the arguments.

The SKX configuration will avoid using zmm registers on the
modified test cases. For many of them we should use something
closer to the AVX2 codegen with pack instructions instead of
the avx512 saturating truncates.

llvm-svn: 374642
2019-10-12 07:59:24 +00:00
Simon Atanasyan
3edfb2de0a [mips] Rely on GPR size not ABI when select instruction to load value into register
llvm-svn: 374641
2019-10-12 07:42:51 +00:00
Simon Atanasyan
cd018abee2 [mips] Fix loadImmediate calls when load non-address values.
llvm-svn: 374640
2019-10-12 07:42:44 +00:00
Martin Storsjo
1f4415f55d [lit] Remove setting of the target-windows feature
No other OSes use a target-<os> feature, and no tests depend on it
any lomger.

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

llvm-svn: 374639
2019-10-12 06:40:24 +00:00
Alexander Shaposhnikov
f44b178394 [llvm-lipo] Pass ArrayRef by value.
Pass ArrayRef by value, fix formatting. NFC.

Test plan: make check-all

llvm-svn: 374637
2019-10-12 06:14:02 +00:00
Vitaly Buka
4515dcd702 Revert 374629 "[sancov] Accommodate sancov and coverage report server for use under Windows"
http://lab.llvm.org:8011/builders/clang-s390x-linux/builds/27650/steps/ninja%20check%201/logs/stdio
http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/31759
http://lab.llvm.org:8011/builders/clang-s390x-linux-lnt/builds/15095
http://lab.llvm.org:8011/builders/clang-ppc64be-linux-multistage/builds/21075
http://lab.llvm.org:8011/builders/clang-ppc64be-linux-lnt/builds/31759

llvm-svn: 374636
2019-10-12 05:23:43 +00:00
Hubert Tong
36225c3b44 NFC: clang-format rL374420 and adjust comment wording
The commit of rL374420 had various formatting issues, including lines
that exceed 80 columns. This patch applies `git clang-format` on the
changes from commit 13bd3ef40d8b1586f26a022e01b21e56c91e05bd.

It further adjusts a comment to clarify the domain of inputs upon which
a newly added function is meant to operate. The adjustment to the
comment was suggested in a post-commit comment on D68721 and discussed
off-list with @sfertile.

llvm-svn: 374635
2019-10-12 04:08:31 +00:00
Zi Xuan Wu
5d5b98eb29 recommit: [LoopVectorize][PowerPC] Estimate int and float register pressure separately in loop-vectorize
In loop-vectorize, interleave count and vector factor depend on target register number. Currently, it does not
estimate different register pressure for different register class separately(especially for scalar type,
float type should not be on the same position with int type), so it's not accurate. Specifically,
it causes too many times interleaving/unrolling, result in too many register spills in loop body and hurting performance.

So we need classify the register classes in IR level, and importantly these are abstract register classes,
and are not the target register class of backend provided in td file. It's used to establish the mapping between
the types of IR values and the number of simultaneous live ranges to which we'd like to limit for some set of those types.

For example, POWER target, register num is special when VSX is enabled. When VSX is enabled, the number of int scalar register is 32(GPR),
float is 64(VSR), but for int and float vector register both are 64(VSR). So there should be 2 kinds of register class when vsx is enabled,
and 3 kinds of register class when VSX is NOT enabled.

It runs on POWER target, it makes big(+~30%) performance improvement in one specific bmk(503.bwaves_r) of spec2017 and no other obvious degressions.

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

llvm-svn: 374634
2019-10-12 02:53:04 +00:00
Vitaly Buka
438143157b [sancov] Accommodate sancov and coverage report server for use under Windows
Summary:
This patch makes the following changes to SanCov and its complementary Python script in order to resolve issues pertaining to non-UNIX file paths in JSON symbolization information:
* Convert all paths to use forward slash.
* Update `coverage-report-server.py` to correctly handle paths to sources which contain spaces.
* Remove Linux platform restriction for all SanCov unit tests. All SanCov tests passed when ran on my local Windows machine.

Patch by Douglas Gliner.

Reviewers: kcc, filcab, phosek, morehouse, vitalybuka, metzman

Reviewed By: vitalybuka

Subscribers: vsk, Dor1s, llvm-commits

Tags: #sanitizers, #llvm

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

llvm-svn: 374629
2019-10-12 02:29:26 +00:00
Vitaly Buka
325c19c5a1 [sancov] Use LLVM Support library JSON writer in favor of individual implementation
Summary:
In this diff, I've replaced the individual implementation of `JSONWriter` with `json::OStream` provided by `llvm/Support/JSON.h`.

Important Note: The output format of the JSON is considerably different compared to the original implementation. Important differences include:
* New line for each entry in an array (should make diffs cleaner)
* No space between keys and colon in attributed object entries.
* Attributes with empty strings will now print the attribute name and a quote pair rather than excluding the attribute altogether

Examples of these differences can be seen in the changes to the sancov tests which compare the JSON output.

Patch by Douglas Gliner.

Reviewers: kcc, filcab, phosek, morehouse, vitalybuka, metzman

Subscribers: mehdi_amini, dexonsmith, llvm-commits

Tags: #sanitizers, #llvm

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

llvm-svn: 374628
2019-10-12 02:29:24 +00:00
Vitaly Buka
fc074fc202 [asan] Return true from instrumentModule
createSanitizerCtorAndInitFunctions always change the module.

llvm-svn: 374623
2019-10-12 01:50:36 +00:00
David Blaikie
f0bf960e7f DebugInfo: Fix msan use-of-uninitialized exposed by r374600
llvm-svn: 374619
2019-10-12 00:27:12 +00:00
Vedant Kumar
f3a10076ef [llvm-profdata] Make "malformed-ptr-to-counter-array.test" textual
As pointed out in https://reviews.llvm.org/D66979 post-commit, making
this test textual would make it more maintainable.

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

llvm-svn: 374617
2019-10-12 00:23:15 +00:00
Craig Topper
5dd46d3111 [X86] Fold a VTRUNCS/VTRUNCUS+store into a saturating truncating store.
We already did this for VTRUNCUS with a specific combination of
types. This extends this to VTRUNCS and handles any types where
a truncating store is legal.

llvm-svn: 374615
2019-10-12 00:01:08 +00:00
Craig Topper
890a39900c [X86] Add test case showing missing opportunity to fold vmovsdb into a store after type legalization. NFC
llvm-svn: 374614
2019-10-12 00:00:59 +00:00
David Blaikie
8081e56d2e DebugInfo: Reduce the scope of some variables related to debug_ranges emission
Minor tidy up/NFC

llvm-svn: 374613
2019-10-11 23:51:24 +00:00
Nico Weber
28d3266ff9 gn build: (manually) merge r374606 better
llvm-svn: 374611
2019-10-11 23:22:36 +00:00
GN Sync Bot
adce698aaa gn build: Merge r235758
llvm-svn: 374610
2019-10-11 23:12:04 +00:00
Nico Weber
99ffec2f44 gn build: Cmanually) merge r374590
llvm-svn: 374608
2019-10-11 23:05:24 +00:00
Stanislav Mekhanoshin
c7ffaeb29e [AMDGPU] Use GCN prefix in dpp_combine.mir. NFC.
llvm-svn: 374607
2019-10-11 22:28:04 +00:00
Stanislav Mekhanoshin
99df21352a [AMDGPU] link dpp pseudos and real instructions on gfx10
This defaults to zero fi operand, but we do not expose it
anyway. Should we expose it later it needs to be added to
the pseudo.

This enables dpp combining on gfx10.

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

llvm-svn: 374604
2019-10-11 22:03:36 +00:00
Julian Lettner
90fe48ddb1 [lit] Small cleanups in main.py
* Extract separate function for running tests from main
* Push single-usage imports to point of usage
* Remove unnecessary sys.exit(0) calls

Reviewed By: rnk

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

llvm-svn: 374602
2019-10-11 21:57:09 +00:00
Julian Lettner
7efdea3492 [lit] Change regex filter to ignore case
Make regex filter `--filter=REGEX` option more lenient via
`re.IGNORECASE`.

Reviewed By: yln

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

llvm-svn: 374601
2019-10-11 21:57:06 +00:00
David Blaikie
49d1bdc990 DebugInfo: Use base address selection entries for debug_loc
Unify the range and loc emission (for both DWARFv4 and DWARFv5 style lists) and take advantage of that unification to use strategic base addresses for loclists.

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

llvm-svn: 374600
2019-10-11 21:52:41 +00:00
Simon Atanasyan
d4f97d5629 [mips] Remove unused local variables. NFC
llvm-svn: 374599
2019-10-11 21:51:39 +00:00
Simon Atanasyan
47f37ce2fc [mips] Store 64-bit `li.d' operand as a single 8-byte value
Now assembler generates two consecutive `.4byte` directives to store
64-bit `li.d' operand. The first directive stores high 4-byte of the
value. The second directive stores low 4-byte of the value. But on
64-bit system we load this value at once and get wrong result if the
system is little-endian.

This patch fixes the bug. It stores the `li.d' operand as a single
8-byte value.

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

llvm-svn: 374598
2019-10-11 21:51:33 +00:00
Simon Atanasyan
649e4c7138 [mips] Use less instruction to load zero into FPR by li.s / li.d pseudos
If `li.s` or `li.d` loads zero into a FPR, it's not necessary to load
zero into `at` GPR register and then move its value into a floating
point register. We can use as a source register the `zero / $0` one.

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

llvm-svn: 374597
2019-10-11 21:51:23 +00:00
Quentin Colombet
aaf0a6880e [GISel][UnitTest] Fix a bunch of tests that were not doing anything
After r368065, all the tests using GISelMITest must call setUp() before
doing anything, otherwise the TargetMachine is not going to be set up.
A few tests added after that commit were not doing that and ended up
testing effectively nothing.

Fix the setup of all the tests and fix the failing tests.

llvm-svn: 374595
2019-10-11 20:58:26 +00:00
David Green
a149508f24 Revert 374373: [Codegen] Alter the default promotion for saturating adds and subs
This commit is not extending the promoted integers as it should. Reverting
whilst I look into the details.

llvm-svn: 374592
2019-10-11 20:33:03 +00:00
Simon Atanasyan
c51d842f96 [Mips][llvm-exegesis] Add a Mips target
The target does just enough to be able to run llvm-exegesis in latency
mode for at least some opcodes.

Patch by Miloš Stojanović.

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

llvm-svn: 374590
2019-10-11 20:26:08 +00:00
Quentin Colombet
db1c54b8f2 [GISel][CallLowering] Enable vector support in argument lowering
The exciting code is actually already enough to handle the splitting
of vector arguments but we were lacking a test case.

This commit adds a test case for vector argument lowering involving
splitting and enable the related support in call lowering.

llvm-svn: 374589
2019-10-11 20:22:57 +00:00
Quentin Colombet
8b663db389 [MachineIRBuilder] Fix an assertion failure with buildMerge
Teach buildMerge how to deal with scalar to vector kind of requests.

Prior to this patch, buildMerge would issue either a G_MERGE_VALUES
when all the vregs are scalars or a G_CONCAT_VECTORS when the destination
vreg is a vector.
G_CONCAT_VECTORS was actually not the proper instruction when the source
vregs were scalars and the compiler would assert that the sources must
be vectors. Instead we want is to issue a G_BUILD_VECTOR when we are
in this situation.

This patch fixes that.

llvm-svn: 374588
2019-10-11 20:22:47 +00:00
David Blaikie
a899b875f9 llvm-dwarfdump: Add verbose printing for debug_loclists
llvm-svn: 374582
2019-10-11 19:06:35 +00:00
Simon Pilgrim
c4a41913ea [X86][SSE] Add support for v4i8 add reduction
llvm-svn: 374579
2019-10-11 17:54:15 +00:00
Nico Weber
4645e6d90c gn build: (manually) merge r374110
llvm-svn: 374575
2019-10-11 17:42:24 +00:00
Sanjay Patel
97f09845d6 [AArch64] add tests for (v)select-of-constants; NFC
These are copied from existing test files in x86/PPC.

llvm-svn: 374568
2019-10-11 16:10:23 +00:00
Kerry McLaughlin
2a15bc3680 [AArch64][SVE] Implement sdot and udot (lane) intrinsics
Summary:
Implements the following arithmetic intrinsics:
  - int_aarch64_sve_sdot
  - int_aarch64_sve_sdot_lane
  - int_aarch64_sve_udot
  - int_aarch64_sve_udot_lane

This patch includes tests for the Subdivide4Argument type added by D67549

Reviewers: sdesmalen, SjoerdMeijer, greened, rengolin, rovka

Reviewed By: sdesmalen

Subscribers: tschuett, kristof.beyls, rkruppe, psnobl, cfe-commits, llvm-commits

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

llvm-svn: 374566
2019-10-11 15:53:41 +00:00