1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
Commit Graph

187029 Commits

Author SHA1 Message Date
Alexander Shaposhnikov
0acc35fd3b [llvm-objcopy][MachO] Add support for min os version load commands
Add support for min os version load commands.

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D69419
2019-10-25 11:42:29 -07:00
Stanislav Mekhanoshin
8136d749b5 [AMDGPU] Fold AGPR reg_sequence initializers
Differential Revision: https://reviews.llvm.org/D69413
2019-10-25 11:39:02 -07:00
vpykhtin
7d2c3bcc82 [AMDGPU] Disallow dpp combining for dpp instructions without Src2 operand (when Src2 is required)
Differential revision: https://reviews.llvm.org/D69430
2019-10-25 21:30:37 +03:00
Craig Topper
7245746772 [X86] Add a check for SSE2 to the top of combineReductionToHorizontal.
Without this, we can create a PSADBW node that isn't legal.
2019-10-25 11:11:32 -07:00
Sanjay Patel
e414386896 [DAGCombiner] widen zext of popcount based on target support
zext (ctpop X) --> ctpop (zext X)

This is a prerequisite step for canonicalizing in the other direction (narrow the popcount) in IR - PR43688:
https://bugs.llvm.org/show_bug.cgi?id=43688

I'm not sure if any other targets are affected, but I found a missing fold for PPC, so added tests based on that.
The reason we widen all the way to 64-bit in these tests is because the initial DAG looks something like this:

  t5: i8 = ctpop t4
  t6: i32 = zero_extend t5  <-- created based on IR, but unused node?
    t7: i64 = zero_extend t5

Differential Revision: https://reviews.llvm.org/D69127
2019-10-25 14:10:51 -04:00
Austin Kerbow
2b4fed1026 AMDGPU/GlobalISel: Legalize FDIV16
Reviewers: arsenm

Reviewed By: arsenm

Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, rovka, dstuttard, tpr, t-tye, hiraditya, volkan, Petar.Avramovic, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69347
2019-10-25 11:07:17 -07:00
Philip Reames
2801c47571 [SCEV] Add a clarifying comment around ExitLimit construction 2019-10-25 10:33:02 -07:00
Kevin P. Neal
4046a6eb15 [FPEnv] Teach the IRBuilder about correct use of the strictfp attribute.
The IRBuilder needs to add the strictfp attribute to function
definitions and calls when constrained floating point is enabled.

Since so far all front ends have had to do is flip the constrained
switch, I've made this patch always add the required attributes
when said constrained switch is enabled. This continues to keep
changes to front ends minimal.

Differential Revision: D69312
2019-10-25 12:57:52 -04:00
LLVM GN Syncbot
bb64eb3026 gn build: Merge 8e567b0730f 2019-10-25 16:49:07 +00:00
Sanjay Patel
4f884b9be0 [PowerPC] add test for popcnt with any_extend; NFC
A zext-specific variation of this case is proposed in D69127.
2019-10-25 12:43:44 -04:00
Amy Huang
9f76a00d08 Add an instruction marker field to the ExtraInfo in MachineInstrs.
Summary:
Add instruction marker to MachineInstr ExtraInfo. This does almost the
same thing as Pre/PostInstrSymbols, except that it doesn't create a label until
printing instructions. This allows for labels to be put around instructions that
are deleted/duplicated somewhere.

Also undo the workaround in r375137.

Reviewers: rnk

Subscribers: MatzeB, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69136
2019-10-25 09:21:10 -07:00
Saleem Abdulrasool
a7c91a3847 build: reindent text (NFC)
Replace some hard tabs with spaces.  NFC.
2019-10-25 08:54:39 -07:00
Scott Linder
e3c14856ec [AMDGPU] Remove update_llc_test_checks for a test
The test split-arg-dbg-value.ll has a host-specific path in the
full output captured by update_llc_test_checks.

Fix for test failures introduced in https://reviews.llvm.org/D69402

Tags: #llvm
2019-10-25 11:47:33 -04:00
Sanjay Patel
f47575c561 [SLP] adjust code comment; NFC
(check commit access)
2019-10-25 11:39:43 -04:00
Roman Lebedev
992c28afd0 [APInt] Add saturating left-shift ops
Summary:
There are `*_ov()` functions already, so at least for consistency it may be good to also have saturating variants.
These may or may not be needed for `ConstantRange`'s `shlWithNoWrap()`

Reviewers: spatel, nikic

Reviewed By: nikic

Subscribers: hiraditya, dexonsmith, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69398
2019-10-25 18:20:00 +03:00
Roman Lebedev
e17580f84d [APInt] Add saturating multiply ops
Summary:
There are `*_ov()` functions already, so at least for consistency it may be good to also have saturating variants.
These may or may not be needed for `ConstantRange`'s `mulWithNoWrap()`

Reviewers: spatel, nikic

Reviewed By: nikic

Subscribers: hiraditya, dexonsmith, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69397
2019-10-25 18:19:54 +03:00
Itay Bookstein
bb7869a22f [CodeGen][SelectionDAG] Fix tiny bug in ExpandIntRes_UADDSUBO
Summary:
Ternary expression checks for ISD::ADD instead of ISD::UADDO inside DAGTypeLegalizer::ExpandIntRes_UADDSUBO.
This means the ternary expression will evaluate to ISD::SUBCARRY for both ISD::UADDO and ISD::USUBO nodes.
Targets are likely to implement both, so impact will be very limited in practice.

Reviewers: bogner, lebedev.ri

Reviewed By: lebedev.ri

Subscribers: lebedev.ri, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68123
2019-10-25 18:10:51 +03:00
David Tenty
90c61b7f75 [NFC] Rename LLVM_NO_DEAD_STRIP
Summary:
The variable LLVM_NO_DEAD_STRIP is set in LLVM cmake files when building executables that might make use of plugins .The name of the variable does not convey the actual intended usage (i.e. for use with tools that have plugins), just what the eventual effect of setting in on some (i.e. not garbage collecting unused symbols).

This patch renames it to LLVM_SUPPORT_PLUGINS to convey the intended usage, which will allow subsequent patches to add behavior to support that in different ways without confusion about whether it will do on, for example, non-gnu platforms.

Reviewers: hubert.reinterpretcast, stevewan

Reviewed By: stevewan

Subscribers: cfe-commits, mgorny, llvm-commits

Tags: #llvm, #clang

Differential Revision: https://reviews.llvm.org/D69356
2019-10-25 09:32:00 -04:00
Luís Marques
ef490b4e67 [RISCV] Add support for half-precision floats
Complete fp16 support by ensuring that load extension / truncate store
operations are properly expanded.

Reviewers: asb, lenary
Reviewed By: lenary
Differential Revision: https://reviews.llvm.org/D69246
2019-10-25 14:02:02 +01:00
Petar Avramovic
f0e9c21e95 [MIPS GlobalISel] Select MSA vector generic and builtin fsqrt
selectImpl is able to select G_FSQRT when we set bank for vector
operands to fprb. Add detailed tests.
Note: G_FSQRT is generated from llvm-ir intrinsics llvm.sqrt.*,
and at the moment MIPS is not able to generate this intrinsic for
vector type (some targets generate vector llvm.sqrt.* from calls
to a builtin function).
__builtin_msa_fsqrt_<format> will be transformed into G_FSQRT
in legalizeIntrinsic and selected in the same way.

Differential Revision: https://reviews.llvm.org/D69376
2019-10-25 14:45:14 +02:00
georgerim
f4f8838607 [yaml2obj, obj2yaml] - Add support for SHT_NOTE sections.
SHT_NOTE is the section that consists of
namesz, descsz, type, name + padding, desc + padding data.
This patch teaches yaml2obj, obj2yaml to dump and parse them.

This patch implements the section how it is described here:
https://docs.oracle.com/cd/E23824_01/html/819-0690/chapter6-18048.html
Which says: "For 64–bit objects and 32–bit objects, each entry is an array of 4-byte words in
the format of the target processor"

The official specification is different
http://www.sco.com/developers/gabi/latest/ch5.pheader.html#note_section
And says: "n 64-bit objects (files with e_ident[EI_CLASS] equal to ELFCLASS64), each entry is an array
of 8-byte words in the format of the target processor. In 32-bit objects (files with e_ident[EI_CLASS]
equal to ELFCLASS32), each entry is an array of 4-byte words in the format of the target processor"

Since LLVM uses the first, 32-bit way, this patch follows it.

Differential revision: https://reviews.llvm.org/D68983
2019-10-25 13:25:56 +03:00
LLVM GN Syncbot
e77c71b3bf gn build: Merge 74d39a42f10 2019-10-25 10:01:34 +00:00
georgerim
0dde941ced [obj2yaml] - Better dumping for relocations without symbols associated.
This just reorders the code and removes an assignment
of an empty string for the case when a relocation has
no symbol associated. With this our output becomes
cleaner and shorter.

Differential revision: https://reviews.llvm.org/D69255
2019-10-25 12:29:31 +03:00
georgerim
791ddaf763 [llvm/Object] - Fix the error message reported for a broken SHT_SYMTAB_SHNDX section.
SHT_SYMTAB_SHNDX should have the same number of entries as the symbol table
associated (https://www.sco.com/developers/gabi/latest/ch4.sheader.html)

We currently can report the following message:
"SHT_SYMTAB_SHNDX section has sh_size (24) which is not equal to the number of symbols (2)"

It is just broken. This patch refines/fixes it.

Differential revision: https://reviews.llvm.org/D69305
2019-10-25 12:19:46 +03:00
David Stenberg
7f0aae4f14 Fix a variable typo in LiveDebugValues [NFC] 2019-10-25 11:21:43 +02:00
Simon Atanasyan
4e7839f5cd [docs] Update Mips feature table in CodeGenerator.rst
Patch by Miloš Stojanović

Differential Revision: https://reviews.llvm.org/D69381
2019-10-25 12:17:34 +03:00
czhengsz
bf78d763b4 [PowerPC] [Peephole] fold frame offset by using index form to save add.
renamable $x6 = ADDI8 $x1, -80      ;;; 0 is replaced with -80
renamable $x6 = ADD8 killed renamable $x6, renamable $x5
STW killed renamable $r3, 4, killed renamable $x6 :: (store 4 into %ir.14, !tbaa !2)

After PEI there is a peephole opt opportunity to combine above -80 in ADDI8 with 4 in the STW to eliminate unnecessary ADD8.

Expected result:
renamable $x6 = ADDI8 $x1, -76
STWX killed renamable $r3, renamable $x5, killed renamable $x6 :: (store 4 into %ir.6, !tbaa !2)

Reviewed by: stefanp

Differential Revision: https://reviews.llvm.org/D66329
2019-10-25 04:13:30 -04:00
Djordje Todorovic
7af4461381 [LiveDebugValues] Small code clean up; NFC 2019-10-25 09:39:42 +02:00
Tom Stellard
eb1d5607fb git-llvm: Drop dependency on github module
This was required for blocking merge commits, but now that we have
branch protections, we don't need this.
2019-10-25 00:04:31 -07:00
Tom Stellard
dc17c2ba64 git-llvm: Push to master branch by default
This allows pushing without specifying a branch, which is what the
documentations says to do.
2019-10-24 23:56:00 -07:00
LLVM GN Syncbot
7d31947b00 gn build: Merge ffa214ef228 2019-10-25 06:36:53 +00:00
LLVM GN Syncbot
924433c34e gn build: Merge d0bd3fc88be 2019-10-25 06:36:53 +00:00
LLVM GN Syncbot
5ab759fd6b gn build: Merge bb6a27fc257 2019-10-25 06:36:52 +00:00
Nico Weber
b90fe487ff gn build: (manually) merge 08074cc9 2019-10-25 02:35:14 -04:00
Craig Topper
73b615e9c7 [X86][GISel] Remove unneeded custom selection code for handling shifts. 2019-10-24 21:11:13 -07:00
Tom Stellard
2e60739b40 docs: Update instructions for requesting commit access 2019-10-24 20:42:02 -07:00
Philip Reames
b567b75641 [SCEV] Expose and use maximum constant exit counts for individual loop exits
We were already going to all of the trouble of computing maximum constant exit counts for each loop exit, we might as well expose them through the API.  The change in IndVars is mostly to demonstrate that the wired up code works, but it als very slightly strengthens the transform.  The strengthened case is rather narrow though: it requires one exactly analyzeable exit, one imprecisely analyzeable exit (with the upper bound less than the precise one), and one unanalyzeable exit.  I coudn't construct a reasonably stable test case.

This does increase the memory usage of the BackedgeTakenCount by a factor of 2 in the worst case.

I also noticed the loop in IndVars is O(#Exits ^ 2).  This doesn't change with this patch.  A future patch will cache this result inside of SCEV to avoid requering.
2019-10-24 19:07:33 -07:00
David Blaikie
2b53a6e5ce Fix Clang -Wcovered-switch-default warning by moving llvm_unreachable default to after the switch 2019-10-24 18:56:45 -07:00
Kai Luo
7b7501b312 Test commit via git. 2019-10-25 01:36:55 +00:00
Philip Reames
8339682e3f [SCEV] Start reworking backedge taken count APIs to unify max handling [NFC]
This is a first step in figuring out a proper API for maximum (non constant) exit counts.  This may evolve a bit as we get experience with the API needs; suggestions very welcome.  This patch just tried to provide a framework that we can later add maximum too in a clean and obvious way.
2019-10-24 18:21:55 -07:00
Philip Reames
b141a66992 [SCEV] Delete unused code from header 2019-10-24 16:34:49 -07:00
Joerg Sonnenberger
7fc5fc4254 Always flush pending errors in MCAsmParser
This has become visible with the --fatal-warnings support.
2019-10-25 00:48:12 +02:00
Philip Reames
1bfa346ba5 Test commit access via git 2019-10-24 15:10:17 -07:00
Hans Wennborg
06920058d2 Try harder to fix GCC 5.3 build
(This time verified locally.)

It was failing with:

llvm/lib/MC/XCOFFObjectWriter.cpp:168:56: error: array must be initialized with a brace-enclosed initializer
   std::array<Section *const, 2> Sections = {&Text, &BSS};
                                                        ^
2019-10-24 23:42:48 +02:00
Scott Linder
d6f495c298 [AMDGPU] Clean up update_llc_test_checks CodeGen tests
Summary:
Some tests have been hand edited without removing the
update_llc_test_checks header, some have slightly outdated CHECK lines
which still pass, and some have additional comments which
update_llc_test_checks pushes towards the function body.

Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D69402
2019-10-24 17:35:33 -04:00
Simon Pilgrim
7295651cdd Fix cppcheck shadow variable warning. NFCI. 2019-10-24 22:14:36 +01:00
jasonliu
ed419171cc Follow up on D69112, fix build break for skipping field initialization
Clang emit warning for skipping field initialization. Add {} to fix it.
This is a patch that fixes issue introduced in https://reviews.llvm.org/D69112
2019-10-24 21:10:06 +00:00
Simon Pilgrim
383f80717b Fix MSVC "switch statement contains 'default' but no 'case' labels" warning. NFCI. 2019-10-24 13:40:13 -07:00
Vedant Kumar
64ac19978b Revert "Disable exit-on-SIGPIPE in lldb"
This reverts commit 32ce14e55e5a99dd99c3b4fd4bd0ccaaf2948c30.

In post-commit review, Pavel pointed out that there's a simpler way to
ignore SIGPIPE in lldb that doesn't rely on llvm's handlers.
2019-10-24 13:19:49 -07:00
Akira Hatanaka
74a0f2314a [ObjC][ARC] Check whether the return and parameter types of the old and
new functions are compatible before upgrading a function call to an
intrinsic call.

Sometimes users insert calls to ARC runtime functions that are not
compatible with the corresponding intrinsic functions (for example,
'i8* @objc_storeStrong' instead of 'void @objc_storeStrong'). Don't
upgrade those calls.

rdar://problem/56447127
2019-10-24 13:08:50 -07:00