1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00
Commit Graph

170691 Commits

Author SHA1 Message Date
Simon Pilgrim
11acac8d7e [X86][AVX] Enable lowerVectorShuffleAsLanePermuteAndPermute v16i16/v32i8 unary shuffle lowering
llvm-svn: 344868
2018-10-21 17:07:50 +00:00
Simon Pilgrim
4948c4bc15 [X86] Only extract constant pool shuffle mask data with zero offsets
D53306 exposes an issue where we sometimes use constant pool data from bigger vectors than the target shuffle mask. This should be safe to do, but we have to be certain that we're using the bottom most part of the vector as the shuffle mask decoders have no way to peek into subvectors with non-zero offsets.

llvm-svn: 344867
2018-10-21 11:55:56 +00:00
Heejin Ahn
fb35f8f333 [WebAssembly] Change tabs to spaces in basic-assembly.s
llvm-svn: 344866
2018-10-21 11:16:50 +00:00
Lang Hames
16b394732e [ORC] Add some more basic sanity tests for the LLJIT.
minimal.ll contains a main function that returns zero, and
single-function-call.ll contains a main function that calls a foo function that
returns zero. These minimal tests can help to rule out some trivial JIT bugs
when other tests fail.

This commit also renames hello.ll to global-ctors-and-dtors.ll, which better
reflects what it is actually testing.

llvm-svn: 344863
2018-10-20 20:39:53 +00:00
Sanjay Patel
1ed130bc19 [InstCombine] add test for possible shuffle fold; NFC
llvm-svn: 344860
2018-10-20 18:18:55 +00:00
Simon Pilgrim
22d066d4c8 [CostModel][X86] Add some initial extract/insert subvector shuffle cost tests
Just f64/i64 tests initially to demonstrate PR39368

llvm-svn: 344857
2018-10-20 17:38:33 +00:00
Sanjay Patel
fbc0f38d34 [InstCombine] use 'match' to simplify code; NFC
llvm-svn: 344855
2018-10-20 17:15:57 +00:00
Sanjay Patel
8167a32abc [InstCombine] make code more flexible with lambda; NFC
I couldn't tell from svn history when these checks were added,
but it pre-dates the split of instcombine into its own directory
at rL92459.

The motivation for changing the check is partly shown by the
code in PR34724:
https://bugs.llvm.org/show_bug.cgi?id=34724

There are also existing regression tests for SLPVectorizer with
sequences of extract+insert that are likely assumed to become
shuffles by the vectorizer cost models.

llvm-svn: 344854
2018-10-20 16:58:27 +00:00
Sanjay Patel
4482bbdac9 [InstCombine] add explanatory comment for strange vector logic; NFC
llvm-svn: 344852
2018-10-20 16:25:55 +00:00
Simon Pilgrim
51d177a471 [SLPVectorizer][X86] Add mul/and/or/xor unrolled reduction tests
We miss arithmetic reduction for everything but Add/FAdd (I assume because that's the only cases which x86 has horizontal ops for.....)

llvm-svn: 344849
2018-10-20 15:17:27 +00:00
Sanjay Patel
944c3c14c4 [SLPVectorizer] regenerate test checks; NFC
llvm-svn: 344848
2018-10-20 14:53:07 +00:00
Simon Pilgrim
5d8ef8c33b [CostModel][X86] Add integer vector reduction cost tests
llvm-svn: 344846
2018-10-20 14:29:59 +00:00
Simon Pilgrim
035fbe3d4b Replace setFeature macro with lambda to fix MSVC "shift count negative or too big" warnings. NFCI.
llvm-svn: 344843
2018-10-20 13:16:31 +00:00
David Blaikie
9bdbb91bf8 DebugInfo: Use base address specifiers more aggressively
Using a base address specifier even for a single-element range is a size
win for object files (7 words versus 8 words - more significant savings
if the debug info is compressed (since it's 3 words of uncompressable
reloc + 4 compressable words compared to 6 uncompressable reloc + 2
compressable words) - does trade off executable size increase though.

llvm-svn: 344841
2018-10-20 09:16:49 +00:00
David Blaikie
9e39d41f65 Add missed file from previous commit (r344838)
llvm-svn: 344839
2018-10-20 08:55:51 +00:00
David Blaikie
147f244b3f DebugInfo: Use DW_OP_addrx in DWARFv5
Reuse addresses in the address pool, even in non-split cases.

llvm-svn: 344838
2018-10-20 08:54:05 +00:00
David Blaikie
c4f6838283 DebugInfo: Implement debug_rnglists.dwo
Save space/relocations in .o files by keeping dwo ranges in the dwo
file rather than the .o file.

llvm-svn: 344837
2018-10-20 08:12:36 +00:00
David Blaikie
1edc4789b6 DebugInfo: Use address pool forms in debug_rnglists
Save no relocations by reusing addresses from the address pool.

llvm-svn: 344836
2018-10-20 07:36:39 +00:00
David Blaikie
a79c8f8708 llvm-dwarfdump: Support RLE_addressx and RLE_startx_length in .debug_rnglists
llvm-svn: 344835
2018-10-20 06:16:25 +00:00
David Blaikie
1acbf3bdd4 DebugInfo: Use debug_addr for non-dwo addresses in DWARF 5
Putting addresses in the address pool, even with non-fission, can reduce
relocations - reusing the addresses from debug_info and debug_rnglists
(the latter coming soon)

llvm-svn: 344834
2018-10-20 06:02:15 +00:00
Craig Topper
54afca5f0d [X86] Add additional CPUs and features to Host.cpp and X86TargetParser.def to match compiler-rt and enable __builtin_cpu_supports/__builtin_cpu_is support in clang
Summary: This matches LLVM to D53461 for compiler-rt.

Reviewers: echristo, erichkeane

Reviewed By: echristo

Subscribers: dberris, llvm-commits

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

llvm-svn: 344831
2018-10-20 03:51:43 +00:00
Thomas Lively
a1eb8666fa [WebAssembly] Implement vector sext_inreg and tests with comparisons
Summary: Depends on D53251.

Reviewers: aheejin, dschuff

Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits

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

llvm-svn: 344826
2018-10-20 01:35:23 +00:00
Thomas Lively
e840b7a5ec [WebAssembly] Custom lower i64x2 constant shifts to avoid wrap
Summary: Depends on D53057.

Reviewers: aheejin, dschuff

Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits

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

llvm-svn: 344825
2018-10-20 01:31:18 +00:00
Roman Tereshin
32ecb08040 [MachineCSE][GlobalISel] Making sure MachineCSE works mid-GlobalISel (again)
Change of approach, it looks like it's a much better idea to deal with
the vregs that have LLTs and reg classes both properly, than trying to
avoid creating those across all GlobalISel passes and all targets.

The change mostly touches MachineRegisterInfo::constrainRegClass,
which is apparently only used by MachineCSE. The changes are NFC for
any pipeline but one that contains MachineCSE mid-GlobalISel.

NOTE on isCallerPreservedOrConstPhysReg change in MachineCSE:

    There is no test covering it as the only way to insert a new pass
(MachineCSE) from a command line I know of is llc's -run-pass option,
which only works with MIR, but MIRParser freezes reserved registers upon
MachineFunctions creation, making it impossible to reproduce the state
that exposes the issue.

Reviwed By: aditya_nandakumar

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

llvm-svn: 344822
2018-10-20 00:06:15 +00:00
Petar Jovanovic
a8b511d699 [llvm-objdump] Fix --file-headers (-f) option
Changed the format call to match the surrounding code. Previously it was
printing an unsigned int while the return type being printed was
long unsigned int or wider. This caused problems for big-endian systems
which were discovered on mips64.
Also, the printed address had less characters than it should because the
character count was directly obtained from the number of bytes in the
address.
The tests were adapted to fit this fix and now use longer addresses.

Patch by Milos Stojanovic.

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

llvm-svn: 344818
2018-10-19 22:16:49 +00:00
Thomas Lively
12ba036023 [LoopVectorize] Loop vectorization for minimum and maximum
Summary: Depends on D52766.

Reviewers: aheejin, dschuff

Subscribers: llvm-commits

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

llvm-svn: 344816
2018-10-19 21:11:43 +00:00
Changpeng Fang
256bacc1fa AMDGPU: Add support pattern for SUB of one bit
Summary:
  Add selection patterns to support one bit Sub.

Reviewers:
  rampitec, arsenm

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

llvm-svn: 344815
2018-10-19 21:09:21 +00:00
Evandro Menezes
c7543624d1 [NFC][InstCombine] Undo stray change
Undo stray change introduced by r344725.

llvm-svn: 344814
2018-10-19 20:57:45 +00:00
Craig Topper
90bb1c4b9b [X86] Remove some left over code from when MVT:i1 was a legal type for AVX512.
llvm-svn: 344813
2018-10-19 20:44:33 +00:00
Matt Arsenault
021135b3a0 Fix typos in assert message
llvm-svn: 344812
2018-10-19 20:17:05 +00:00
Aditya Nandakumar
3db77bf659 [GISel]: Allow PHIs to be DCEd
https://reviews.llvm.org/D53304

Currently dead phis are not cleaned up during DCE. This patch allows
dead PHI and G_PHI insts to be deleted.

Reviewed by: dsanders

llvm-svn: 344811
2018-10-19 20:11:52 +00:00
Craig Topper
b3aace0037 [X86] In PostprocessISelDAG, start from allnodes_end, not the root.
There is no guarantee the root is at the end if isel created any nodes without morphing them. This includes the nodes created by manual isel from C++ code in X86ISelDAGToDAG.

This is similar to r333415 from PowerPC which is where I originally stole the peephole loop from.

I don't have a test case, but without this a future patch doesn't work which is how I found it.

llvm-svn: 344808
2018-10-19 19:24:42 +00:00
Wolfgang Pieb
88d764c628 [DWARF] Make llvm-dwarfdump display location lists in a .dwp file correctly. Fixes PR38990.
Considers the index when extracting location lists from a .dwp file.
Majority of the patch by David Blaikie.

Reviewers: dblaikie

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

llvm-svn: 344807
2018-10-19 19:23:16 +00:00
Thomas Lively
eb4c08db47 [WebAssembly] Handle undefined lane indices in SIMD patterns
Summary:
Undefined indices in shuffles can be used when not all lanes of the
output vector will be used. This happens for example in the expansion
of vector reduce operations. Regardless, undefs are legal as lane
indices in IR and should be supported.

Reviewers: aheejin, dschuff

Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits

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

llvm-svn: 344803
2018-10-19 19:08:06 +00:00
Krzysztof Pszeniczny
c99c915bfa Fix a use-after-RAUW bug in large GEP splitting
Summary:
Large GEP splitting, introduced in rL332015, uses a `DenseMap<AssertingVH<Value>, ...>`. This causes an assertion to fail (in debug builds) or undefined behaviour to occur (in release builds) when a value is RAUWed.

This manifested itself in the 7zip benchmark from the llvm test suite built on ARM with `-fstrict-vtable-pointers` enabled while RAUWing invariant group launders and splits in CodeGenPrepare.

This patch merges the large offsets of the argument and the result of an invariant.group strip/launder intrinsic before RAUWing.

Reviewers: Prazek, javed.absar, haicheng, efriedma

Reviewed By: Prazek, efriedma

Subscribers: kristof.beyls, hiraditya, llvm-commits

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

llvm-svn: 344802
2018-10-19 19:02:16 +00:00
Thomas Lively
5a23f5e279 [InstCombine] InstCombine and InstSimplify for minimum and maximum
Summary: Depends on D52765

Reviewers: aheejin, dschuff

Subscribers: llvm-commits

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

llvm-svn: 344799
2018-10-19 19:01:26 +00:00
Andrea Di Biagio
b3f40cd534 [llvm-mca] Remove a stale TODO comment. NFC
Starting from revision r344334, we can now describe optimizable
register-register moves in the machine scheduling models.

llvm-svn: 344797
2018-10-19 18:39:29 +00:00
Thomas Lively
4f94a73c0f [ConstantFolding] Constant fold minimum and maximum intrinsics
Summary: Depends on D52764

Reviewers: aheejin, dschuff

Subscribers: llvm-commits

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

llvm-svn: 344796
2018-10-19 18:15:32 +00:00
Jonas Devlieghere
1a0a38a91c [dwarfdump] Hide ranges in diff-mode.
llvm-dwarfdump --diff should not print DW_AT_ranges. This patch fixes
that.

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

llvm-svn: 344794
2018-10-19 17:57:53 +00:00
Sanjay Patel
bf6a8791fd [InstCombine] use m_Neg() in dyn_castNegVal() to match vectors with undef elts
llvm-svn: 344793
2018-10-19 17:54:53 +00:00
Krzysztof Parzyszek
f9268a010f [Hexagon] Remove support for V4
llvm-svn: 344791
2018-10-19 17:31:11 +00:00
Sanjay Patel
754f85cbae [InstCombine] move/add tests for sub/neg; NFC
These should all be handled using "dyn_castNegVal",
but that misses vectors with undef elements.

llvm-svn: 344790
2018-10-19 17:26:22 +00:00
Clement Courbet
2050f6b378 [llvm-exegesis] Mark second-form X87 instructions as unsupported.
Summary:
We only support the first form because we rely on information that is
only available there.

Reviewers: gchatelet

Subscribers: tschuett, llvm-commits

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

llvm-svn: 344782
2018-10-19 12:24:49 +00:00
Kristina Brooks
9ea879365e [MC][DWARF][AsmParser] Ensure nested CFI frames are diagnosed.
This avoids a crash (with asserts) or bad codegen (without asserts)
in Dwarf streamer later on. This patch fixes this condition in 
MCStreamer and propogates SMLoc down when it's available with an
added bonus of source locations for those specific types of errors.

Further patches could use similar improvements as currently most
non-Windows CFI directives lack an SMLoc parameter.

Modified an existing test to verify source location propogation and
added an object-file version of it to verify that it does not crash in
addition to a standalone test to only ensure it does not crash.

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

llvm-svn: 344781
2018-10-19 12:14:30 +00:00
Clement Courbet
f0c6fb5469 [llvm-exegesis] Re-enable liveliness tracker.
Reviewers: gchatelet

Subscribers: tschuett, llvm-commits

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

llvm-svn: 344780
2018-10-19 12:08:05 +00:00
Clement Courbet
3197da5dd9 [llvm-exegesis] X87 RFP setup code.
Summary:
This was lost during refactoring in rL342644.

Fix and simplify simplify value size handling: always go through a 80 bit value,
because the value can be 1 byte). Add unit tests.

Reviewers: gchatelet

Subscribers: tschuett, llvm-commits

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

llvm-svn: 344779
2018-10-19 09:56:54 +00:00
Fangrui Song
2c64c3e40c [pipeliner] Fix test added in rL344748 to require asserts
llvm-svn: 344775
2018-10-19 06:20:01 +00:00
Fangrui Song
db2f6ced8d Use llvm::{all,any,none}_of instead std::{all,any,none}_of. NFC
llvm-svn: 344774
2018-10-19 06:12:02 +00:00
Hsiangkai Wang
57387db2a5 [CodeGen] Fix for PR39094.
When using MachineInstr to get SlotIndex, the MI could not be a debug
instruction. mi2iMap does not contain debug instructions in it.

After enabling DBG_LABEL in the generated code, the first instruction in
the bundle may be a debug instruction. In this patch, I use the first
non-debug instruction in the bundle to query SlotIndex in mi2iMap.

Bugzilla report: https://bugs.llvm.org/show_bug.cgi?id=39094

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

llvm-svn: 344770
2018-10-19 01:52:54 +00:00
Chandler Carruth
a1534b99fa [TI removal] Remove TerminatorInst from the IR type system!
llvm-svn: 344769
2018-10-19 00:22:37 +00:00