1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 20:43:44 +02:00
Commit Graph

154221 Commits

Author SHA1 Message Date
Igor Breger
1945fdd96b [GlobalISel][X86] Use correct physical register in mir tests.NFC.
llvm-svn: 313479
2017-09-17 08:30:42 +00:00
Igor Breger
f5aca70376 [GlobalISel][X86] G_FCONSTANT support.
Summary: G_FCONSTANT support, port the implementation from X86FastIsel.

Reviewers: zvi, delena, guyblank

Reviewed By: delena

Subscribers: rovka, llvm-commits, kristof.beyls

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

llvm-svn: 313478
2017-09-17 08:08:13 +00:00
Craig Topper
c9df7024c7 [X86] Remove integer X86ISD::SHUFP patterns. Lowering doesn't emit these.
llvm-svn: 313477
2017-09-17 06:09:32 +00:00
Craig Topper
2a324415cd [X86] Add patterns to make blends with immediate control commutable during isel for load folding.
llvm-svn: 313476
2017-09-17 05:06:05 +00:00
Craig Topper
d1020c20b9 [X86] Remove some unused defaults from some multiclass parameters.
llvm-svn: 313475
2017-09-17 05:06:03 +00:00
Lang Hames
32a06c15d8 [ORC] Hook up the LLVMOrcAddObjectFile function in the Orc C Bindings.
This can be used to add a relocatable object to the JIT session.

llvm-svn: 313474
2017-09-17 03:25:03 +00:00
Don Hinton
13c58ac2d4 [ORC][Kaleidoscope] Update ORCJit tutorial.
Summary: Fix a few typos and update names to match current source.

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

llvm-svn: 313473
2017-09-17 00:24:43 +00:00
Craig Topper
16eca3ad0c [X86] Make PLCMULQDQ instructions commutable during isel to fold loads.
This adds new patterns and SDNodeXForm to enable the immediate to commuted.

llvm-svn: 313472
2017-09-16 23:18:50 +00:00
Craig Topper
dbb60756e2 [X86] Add NoAVX predicates to the patterns for the legacy encoded PCLMUL and AES instructions.
Previously we were just relying on pattern order to define precedence. Which works, but isn't the best way.

llvm-svn: 313471
2017-09-16 23:18:48 +00:00
Zachary Turner
b09b2e026a Try to fix some failing bots.
It doesn't make sense to me why these bots are failing as the
traceback does not agree with the source code.  It's possible
something is stale or there is some other mysterious error,
but in any case hopefully this fixes it.

llvm-svn: 313469
2017-09-16 19:20:53 +00:00
Zachary Turner
682320b00d [llvm-symbolizer] Fix coff-dwarf.test
This was a bug in the test that was only exposed as a result of
refactoring some code in lit configuration files.  Previously,
llvm's lit configuration would only set the target-windows feature
if the system was also windows.  Since cross-compilation is
a thing, this isn't correct.  target-windows should be set
independently of system-windows.

Adding to that bug, this particular test then checked for
target-windows when it really meant "can I call a certain API on
the host machine", which is what system-windows is for.

Ultimately, this test only works if *both* the target and host
are Windows, so I've updated the test to reflect that.

llvm-svn: 313468
2017-09-16 19:01:04 +00:00
Zachary Turner
d6651447a4 Resubmit "Add a shared llvm.lit module that all test suites can use."
There were some issues surrounding Py2 / Py3 compatibility, but
I've now tested with both Py2 and Py3 and everything seems to
work.

llvm-svn: 313467
2017-09-16 18:46:21 +00:00
Zachary Turner
be538a206c [lit] Fix some Python 3 compatibility issues.
llvm-svn: 313466
2017-09-16 18:45:44 +00:00
Craig Topper
3ab295c547 [X86] Remove some extra code that snuck into r313450.
The same code appears earlier in the function. This represents an earlier version of what became r313373 that I still had sitting in my local repo.

llvm-svn: 313465
2017-09-16 17:51:55 +00:00
Adrian Prantl
5aebf77e70 llvm-dwarfdump: support a --show-children option
This will print all children of a DIE when selectively printing only
one DIE at a given offset.

llvm-svn: 313464
2017-09-16 17:28:00 +00:00
Adrian Prantl
3f1c9a6b52 llvm-dwarfdump: Add support for -debug-types=<offset>.
llvm-svn: 313463
2017-09-16 16:58:18 +00:00
Zachary Turner
c0d3e3433c [lit] Fix the lit unit tests.
A few tests were manually constructing a LitConfig object, since
I added a new argument to it this was triggering some failures
I didn't detect.  `ninja check-lit` passes now.

llvm-svn: 313461
2017-09-16 15:48:30 +00:00
Zachary Turner
b44d337cf6 [lit] Add a single process mode.
This is helpful for debugging test failures since it removes
the multiprocessing pool from the picture.  This will obviously
slow down the test suite by a few orders of magnitude, so it
should only be used for debugging specific failures.

llvm-svn: 313460
2017-09-16 15:31:34 +00:00
George Rimar
cd7a7ea75d [llvm-readobj] - Teach tool to report error if some section is in multiple COMDAT groups at once.
readelf tool reports an error when output contains the same section
in multiple COMDAT groups. That can be useful.
Path teaches llvm-readobj to do the same.

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

llvm-svn: 313459
2017-09-16 14:29:51 +00:00
Sanjay Patel
62d8ec1120 [x86] enable storeOfVectorConstantIsCheap() target hook
This allows vector-sized store merging of constants in DAGCombiner using the existing code in MergeConsecutiveStores(). 
All of the twisted logic that decides exactly what vector operations are legal and fast for each particular CPU are 
handled separately in there using the appropriate hooks.

For the motivating tests in merge-store-constants.ll, we already produce the same vector code in IR via the SLP vectorizer. 
So this is just providing a backend backstop for code that doesn't go through that pass (-O1). More details in PR24449:
https://bugs.llvm.org/show_bug.cgi?id=24449 (this change should be the last step to resolve that bug)

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

llvm-svn: 313458
2017-09-16 13:29:12 +00:00
NAKAMURA Takumi
2733d852d4 Reformat.
llvm-svn: 313457
2017-09-16 12:13:03 +00:00
NAKAMURA Takumi
b78e2a72b9 llvm/IR/DiagnosticHandler.h: Add include guard, or -fmodules would be confused.
llvm-svn: 313456
2017-09-16 12:13:00 +00:00
Craig Topper
0b5789f3cc [X86] Add isel patterns to be able to fold loads into VPERM2F128 even when the load is on the first input to the SDNode.
We just need to toggle bits 1 and 5 of the immediate and swap the sources. The peephole pass could trigger commuting/folding for this later, but its easy enough to fix in isel.

Disable the peephole pass on the main vperm2x128 test so we know we're doing this through isel.

llvm-svn: 313455
2017-09-16 09:16:48 +00:00
Craig Topper
eba16bf7fe [X86] Remove unused check lines that got left behind when I moved tests to the instrinsic upgrade file and regenerated.
llvm-svn: 313454
2017-09-16 09:16:46 +00:00
Craig Topper
7542d6cd2e [X86] Remove VPERM2X128 isel patterns with 32-bit elements.
Now that the intrinsics are gone we only need 64-bit elements since that's what shuffle lowering uses.

llvm-svn: 313453
2017-09-16 08:15:52 +00:00
Craig Topper
31a3cdd6ec [X86] Remove the vperm2f128 test file I just added in r313450.
I missed the we already had a pretty thorough test file for these instructions.

llvm-svn: 313451
2017-09-16 07:51:01 +00:00
Craig Topper
9f5737a6bd [X86] Remove VPERM2F128/VPERM2I128 intrinsics and autoupgrade to native shuffles.
I've moved the test cases from the InstCombine optimizations to the backend to keep the coverage we had there. It covered every possible immediate so I've preserved the resulting shuffle mask for each of those immediates.

llvm-svn: 313450
2017-09-16 07:36:14 +00:00
Craig Topper
1c7a2bfb5e [X86] Fix some FileCheck lines that use the wrong prefix.
Assume they were moved during autoupgrading and not changed.

llvm-svn: 313448
2017-09-16 07:13:39 +00:00
Chandler Carruth
87be303362 [git] Update the llvm git helper script to work correctly with the
latest Python versions.

llvm-svn: 313435
2017-09-16 02:13:35 +00:00
Craig Topper
ba533dd56f [X86] Don't set reserved bits in the immediate in the test cases for vperm2f128.
I'm going to autoupgrade these intrinsics in a future commit. This bit will never be set in the resulting output so pre-removing the bit.

llvm-svn: 313434
2017-09-16 02:11:21 +00:00
Craig Topper
3970d1d489 [X86] Remove slash in front of a CHECK line in a test.
llvm-svn: 313433
2017-09-16 01:43:21 +00:00
Eric Beckmann
7da768a52e Revert "Fix Bug 30978 by emitting cv file checksums."
This reverts commit 6389e7aa724ea7671d096f4770f016c3d86b0d54.

There is a bug in this implementation where the string value of the
checksum is outputted, instead of the actual hex bytes.  Therefore the
checksum is incorrect, and this prevent pdbs from being loaded by visual
studio.  Revert this until the checksum is emitted correctly.

llvm-svn: 313431
2017-09-16 01:14:36 +00:00
Zachary Turner
e6c2effc3f Revert lit changes related to lit.llvm module.
It looks like this is going to be non-trivial to get working
in both Py2 and Py3, so for now I'm reverting until I have time
to fully test it under Python 3.

llvm-svn: 313429
2017-09-16 00:52:49 +00:00
Zachary Turner
4735a2032e [lit] Fix another Python 3 error.
Apparently we have a buildbot running Python 3.  This is going
to be fun :-/

llvm-svn: 313428
2017-09-16 00:43:16 +00:00
Zachary Turner
363a95ae02 [lit] Better check for integral value.
Some versions of python don't have 'long'.  Use numbers.Number
instead.

llvm-svn: 313427
2017-09-16 00:38:20 +00:00
Zachary Turner
49da297d64 Resubmit "[lit] Add a lit.llvm module that all llvm projects can use"
This was reverted alongside the revert of the lit/llvm-lit refactor,
but now that that has re-landed, I'm relanding this as well.

llvm-svn: 313426
2017-09-16 00:25:58 +00:00
Craig Topper
c4e64d2f93 [X86] Remove usages of vperm2f intrinsics from fast isel tests to match what clang generates after r313418.
llvm-svn: 313424
2017-09-15 23:53:43 +00:00
Vedant Kumar
9bf41686e1 [llvm-cov] Fix a bot failure due to r313417
There's a type mismatch issue with the arguments to a call to std::min
introduced in r313417.

http://lab.llvm.org:8011/builders/clang-cmake-thumbv7-a15/builds/11174

llvm-svn: 313422
2017-09-15 23:14:22 +00:00
Craig Topper
948dca7019 [X86] Remove GCCBuiltin names from perm2f128/perm2i128 intrinsics so we can provide a custom implementation in clang.
llvm-svn: 313420
2017-09-15 23:05:51 +00:00
Adrian Prantl
978de38747 llvm-dwarfdump: Add support for -debug-info=<offset>.
This is the first of many commits that enable selectively dumping just
one record from the debug info.

This reapplies r313412 with some extra qualification to appease GCC and MSVC.

llvm-svn: 313419
2017-09-15 23:04:04 +00:00
Vedant Kumar
b939a54424 [llvm-cov] Avoid over-counting covered lines and regions
* Fix an unsigned integer overflow in the logic that computes the
  number of uncovered lines in a function.

* When aggregating region and line coverage summaries, take into account
  that different instantiations may have a different number of regions.

The new test case provides test coverage for both bugs. I also verified
this change by preparing a coverage report for a stage2 build of llc --
the new assertions should detect any outstanding over-counting bugs.

Fixes PR34613.

llvm-svn: 313417
2017-09-15 23:00:02 +00:00
Vedant Kumar
a4cb081af1 [llvm-cov] Make some summary info fields private. NFC.
There's a bug in the way the line and region summary objects are merged.
It would have been less likely to occur if those objects kept some data
private.

llvm-svn: 313416
2017-09-15 23:00:01 +00:00
Vedant Kumar
9a91c24748 [llvm-cov] Remove a redundant field. NFC.
The "NotCovered" fields in the region and line summary structs are
redundant. We should remove them to make the code clearer.

As a follow-up, the "NotCovered" entries should be removed from the
reports as well.

llvm-svn: 313415
2017-09-15 23:00:00 +00:00
Adrian Prantl
fb4efe8f9b Revert "llvm-dwarfdump: Add support for -debug-info=<offset>."
This reverts commit r313412 because of a g++ incompatibility.

llvm-svn: 313413
2017-09-15 22:47:16 +00:00
Adrian Prantl
8da0c20511 llvm-dwarfdump: Add support for -debug-info=<offset>.
This is the first of many commits that enable selectively dumping just
one record from the debug info.

llvm-svn: 313412
2017-09-15 22:37:56 +00:00
Guozhi Wei
24cd70c139 [TargetTransformInfo] Static alloca has 0 cost
Static alloca usually doesn't generate any machine instructions, so it has 0 cost.

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

llvm-svn: 313410
2017-09-15 22:28:12 +00:00
Chandler Carruth
4a434efc2a [SLP] Revert r312791 and other necessary commits, except for TTI and
CostModel.

The original patch added support for horizontal min/max reductions to
the SLP vectorizer.

This patch causes LLVM to miscompile fairly simple signed min
reductions. I have attached a test progrom to http://llvm.org/PR34635
that shows the behavior change after this patch. We found this in a test
for the open source Eigen library, but also in other code.

Unfortunately, the revert is moderately challenging. It required
reverting:
r313042: [SLP] Test with multiple uses of conditional op and wrong parent.
r312853: [SLP] Fix buildbots, NFC.
r312793: [SLP] Fix the warning about paths not returning the value, NFC.
r312791: [SLP] Support for horizontal min/max reduction.

And even then, I had to completely skip reverting the changes to TTI and
CostModel because r312832 rewrote so much of this code. Plus, the cost
modeling changes aren implicated in the miscompile, so they should be
fine and will just not be used until this gets re-introduced.

llvm-svn: 313409
2017-09-15 22:23:27 +00:00
Zachary Turner
34baee188e Resubmit "[lit] Force site configs to run before source-tree configs"
This is a resubmission of r313270.  It broke standalone builds of
compiler-rt because we were not correctly generating the llvm-lit
script in the standalone build directory.

The fixes incorporated here attempt to find llvm/utils/llvm-lit
from the source tree returned by llvm-config.  If present, it
will generate llvm-lit into the output directory.  Regardless,
the user can specify -DLLVM_EXTERNAL_LIT to point to a specific
lit.py on their file system.  This supports the use case of
someone installing lit via a package manager.  If it cannot find
a source tree, and -DLLVM_EXTERNAL_LIT is either unspecified or
invalid, then we print a warning that tests will not be able
to run.

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

llvm-svn: 313407
2017-09-15 22:10:46 +00:00
Reid Kleckner
828ccd75fb Name the sentinel value used for the location number of the undefined register NFC
llvm-svn: 313405
2017-09-15 22:08:50 +00:00
Jake Ehrlich
f5ef94ca90 Test patch to check my commit access
llvm-svn: 313404
2017-09-15 22:04:09 +00:00