]> granicus.if.org Git - llvm/log
llvm
5 years ago[PowerPC][NFC] Format comments in P9InstrResrouce.td
Jinsong Ji [Fri, 14 Jun 2019 17:04:24 +0000 (17:04 +0000)]
[PowerPC][NFC] Format comments in P9InstrResrouce.td

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

5 years ago[SimpligyCFG] NFC intended, remove GCD that was only used for powers of two
Shawn Landden [Fri, 14 Jun 2019 16:56:49 +0000 (16:56 +0000)]
[SimpligyCFG] NFC intended, remove GCD that was only used for powers of two

and replace with an equilivent countTrailingZeros.

GCD is much more expensive than this, with repeated division.

This depends on D60823

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

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

5 years agobuild: don't attempt to run config.guess on Windows
Saleem Abdulrasool [Fri, 14 Jun 2019 16:47:04 +0000 (16:47 +0000)]
build: don't attempt to run config.guess on Windows

When cross-compiling LLVM to android from Windows (for LLVMSupport), we would
attempt to execute `config.guess` to determine the host triple since
`CMAKE_SYSTEM_NAME` is not Windows and `CMAKE_C_COMPILER` will be set to GNU or
Clang.  This will fail as `config.guess` is a shell script which cannot be
executed on Windows.  Simply log a warning instead.  The user can specify the
value for this instead in those cases.

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

5 years ago[AMDGPU] Don't constrain callees with inlinehint from inlining on MaxBB check
Valery Pykhtin [Fri, 14 Jun 2019 16:37:33 +0000 (16:37 +0000)]
[AMDGPU] Don't constrain callees with inlinehint from inlining on MaxBB check

Summary: Function bodies marked inline in an opencl source are eliminated but MaxBB check may prevent inlining them leaving undefined references.

Reviewers: rampitec, arsenm

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

Tags: #llvm

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

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

5 years ago[FPEnv] Lower STRICT_FP_EXTEND and STRICT_FP_ROUND nodes in preprocess phase of ISelL...
Kevin P. Neal [Fri, 14 Jun 2019 16:28:55 +0000 (16:28 +0000)]
[FPEnv] Lower STRICT_FP_EXTEND and STRICT_FP_ROUND nodes in preprocess phase of ISelLowering to mirror non-strict nodes on x86.

I recently discovered a bug on the x86 platform: The fp80 type was not handled well by x86 for constrained floating point nodes, as their regular counterparts are replaced by extending loads and truncating stores during the preprocess phase. Normally, platforms don't have this issue, as they don't typically attempt to perform such legalizations during instruction selection preprocessing. Before this change, strict_fp nodes survived until they were mutated to normal nodes, which happened shortly after preprocessing on other platforms. This modification lowers these nodes at the same phase while properly utilizing the chain.5

Submitted by: Drew Wock <drew.wock@sas.com>
Reviewed by: Craig Topper, Kevin P. Neal
Approved by: Craig Topper
Differential Revision: https://reviews.llvm.org/D63271

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

5 years ago[AMDGPU] gfx1010 BoolReg definition. NFC.
Stanislav Mekhanoshin [Fri, 14 Jun 2019 16:25:46 +0000 (16:25 +0000)]
[AMDGPU] gfx1010 BoolReg definition. NFC.

Earlier commit has added AMDGPUOperand::isBoolReg(). Turns out
gcc issues warning about unused function since D63204 is not
yet submitted.

Added NFC part of D63204 to have a use of that function and
mute the warning.

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

5 years agoReland: [Remarks] Refactor optimization remarks setup
Francis Visoiu Mistrih [Fri, 14 Jun 2019 16:20:51 +0000 (16:20 +0000)]
Reland: [Remarks] Refactor optimization remarks setup

* Add a common function to setup opt-remarks
* Rename common options to the same names
* Add error types to distinguish between file errors and regex errors

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

5 years ago[x86] move vector shift tests for PR37428; NFC
Sanjay Patel [Fri, 14 Jun 2019 15:23:09 +0000 (15:23 +0000)]
[x86] move vector shift tests for PR37428; NFC

As suggested in the post-commit thread for rL363392 - it's
wasteful to have so many runs for larger tests. AVX1/AVX2
is what shows the diff and probably what matters most going
forward.

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

5 years agoGlobalISel: Avoid producing Illegal copies in RegBankSelect
Matt Arsenault [Fri, 14 Jun 2019 15:22:25 +0000 (15:22 +0000)]
GlobalISel: Avoid producing Illegal copies in RegBankSelect

Avoid producing illegal register bank copies for reg_sequence and
phi. The default implementation assumes it is possible to pick any
operand's bank and use that for the result, introducing a copy for
operands with a different bank. This does not check for illegal
copies. It is not legal to introduce a VGPR->SGPR copy, so any VGPR
operand requires the result to be a VGPR.

The changes in getInstrMappingImpl aren't strictly necessary, since
AMDGPU now just bypasses this for reg_sequence/phi. This could be
replaced with an assert in case other targets run into this. It is
currently responsible for producing the error for unsatisfiable
copies, but this will be better served with a verifier check.

For phis, for now assume any undetermined operands must be
VGPRs. Eventually, this needs to be able to defer mapping these
operations. This also does not yet have a way to check for whether the
block is in a divergent region.

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

5 years ago[CodeGenPrepare] propagate debuginfo when copying a shuffle
Sanjay Patel [Fri, 14 Jun 2019 15:05:35 +0000 (15:05 +0000)]
[CodeGenPrepare] propagate debuginfo when copying a shuffle

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

5 years ago[Attributor] Disable the Attributor by default and fix a comment
Johannes Doerfert [Fri, 14 Jun 2019 14:53:41 +0000 (14:53 +0000)]
[Attributor] Disable the Attributor by default and fix a comment

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

5 years ago[Attributor] Introduce bit-encodings for abstract states
Johannes Doerfert [Fri, 14 Jun 2019 14:53:36 +0000 (14:53 +0000)]
[Attributor] Introduce bit-encodings for abstract states

Summary:
The IntegerState, and its sepecialization BooleanState, can be used to
simplify the implementation of abstract attributes. The two abstract
state implementations provide storage and helpers to deal with bit-wise
encoded state.

Subscribers: hiraditya, bollu, llvm-commits

Tags: #llvm

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

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

5 years agoAMDGPU: Fold readlane intrinsics of constants
Matt Arsenault [Fri, 14 Jun 2019 14:51:26 +0000 (14:51 +0000)]
AMDGPU: Fold readlane intrinsics of constants

I'm not 100% sure about this, since I'm worried about IR transforms
that might end up introducing divergence downstream once replaced with
a constant, but I haven't come up with an example yet.

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

5 years ago[ARM] Add MVE horizontal accumulation instructions
Mikhail Maltsev [Fri, 14 Jun 2019 14:31:13 +0000 (14:31 +0000)]
[ARM] Add MVE horizontal accumulation instructions

This is the family of vector instructions that combine all the lanes
in their input vector(s), and output a value in one or two GPRs.

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

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

5 years agoRevert "Revert r363377: [yaml2obj] - Allow setting custom section types for implicit...
George Rimar [Fri, 14 Jun 2019 14:25:34 +0000 (14:25 +0000)]
Revert "Revert r363377: [yaml2obj] - Allow setting custom section types for implicit sections."

LLD test case will be fixed in a following commit.

Original commit message:

[yaml2obj] - Allow setting custom section types for implicit sections.

We were hardcoding the final section type for sections that
are usually implicit. The patch fixes that.

This also fixes a few issues in existent test cases and removes
one precompiled object.

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

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

5 years agoRevert r363377: [yaml2obj] - Allow setting custom section types for implicit sections.
Rui Ueyama [Fri, 14 Jun 2019 13:57:25 +0000 (13:57 +0000)]
Revert r363377: [yaml2obj] - Allow setting custom section types for implicit sections.

This reverts commit r363377 because lld's ELF/invalid/undefined-local-symbol-in-dso.test
test started failing after this commit.

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

5 years agoFix failing test on ARM buildbot
Eugene Leviant [Fri, 14 Jun 2019 13:45:21 +0000 (13:45 +0000)]
Fix failing test on ARM buildbot

r363261 caused test failure on 32-bit ARM buildbot,
because of unsigned integer overflow. This patch
fixes it changing offset type from size_t to uint64_t.

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

5 years ago[x86] add test for original example in PR37428; NFC
Sanjay Patel [Fri, 14 Jun 2019 13:44:01 +0000 (13:44 +0000)]
[x86] add test for original example in PR37428; NFC

The reduced case may avoid complications seen in this larger function.

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

5 years agoRegBankSelect: Remove checks for invalid mappings
Matt Arsenault [Fri, 14 Jun 2019 13:42:40 +0000 (13:42 +0000)]
RegBankSelect: Remove checks for invalid mappings

Avoid a check for valid and a set of redundant asserts. The place
InstructionMapping is constructed asserts all of the default fields
are passed anyway for an invalid mapping, so don't overcomplicate
this.

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

5 years agoAMDGPU: Fix input chain when gluing copies to m0
Matt Arsenault [Fri, 14 Jun 2019 13:33:36 +0000 (13:33 +0000)]
AMDGPU: Fix input chain when gluing copies to m0

I don't think this was causing any observable issues, but was making
reading the DAG dump confusing.

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

5 years ago[lit] Fix UnicodeEncodeError when test commands contain non-ASCII chars
Michal Gorny [Fri, 14 Jun 2019 13:31:48 +0000 (13:31 +0000)]
[lit] Fix UnicodeEncodeError when test commands contain non-ASCII chars

Ensure that the bash script written by lit TestRunner is open with UTF-8
encoding when using Python 3.  Otherwise, attempt to write non-ASCII
characters causes UnicodeEncodeError.  This happened e.g. with
the following LLD test:

UNRESOLVED: lld :: ELF/format-binary-non-ascii.s (657 of 2119)
******************** TEST 'lld :: ELF/format-binary-non-ascii.s' FAILED ********************
Exception during script execution:
Traceback (most recent call last):
  File "/home/mgorny/llvm-project/llvm/utils/lit/lit/worker.py", line 63, in _execute_test
    result = test.config.test_format.execute(test, lit_config)
  File "/home/mgorny/llvm-project/llvm/utils/lit/lit/formats/shtest.py", line 25, in execute
    self.execute_external)
  File "/home/mgorny/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 1644, in executeShTest
    res = _runShTest(test, litConfig, useExternalSh, script, tmpBase)
  File "/home/mgorny/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 1590, in _runShTest
    res = executeScript(test, litConfig, tmpBase, script, execdir)
  File "/home/mgorny/llvm-project/llvm/utils/lit/lit/TestRunner.py", line 1157, in executeScript
    f.write('{ ' + '; } &&\n{ '.join(commands) + '; }')
UnicodeEncodeError: 'ascii' codec can't encode character '\xa3' in position 274: ordinal not in range(128)

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

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

5 years ago[MCA] Ignore invalid processor resource writes of zero cycles. NFCI
Andrea Di Biagio [Fri, 14 Jun 2019 13:31:21 +0000 (13:31 +0000)]
[MCA] Ignore invalid processor resource writes of zero cycles. NFCI

In debug mode, the tool also raises a warning and prints out a message which
helps identify the problematic MCWriteProcResEntry from the scheduling class.
This message would have been useful to have when triaging PR42282.

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

5 years agoFix not calling TargetCustom PSVs printer
Matt Arsenault [Fri, 14 Jun 2019 13:26:34 +0000 (13:26 +0000)]
Fix not calling TargetCustom PSVs printer

If the enum value was greater than the starting target custom value,
the custom printer wasn't called.

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

5 years agoAMDGPU: Refactor to prepare for manually selecting more intrinsics
Matt Arsenault [Fri, 14 Jun 2019 13:26:32 +0000 (13:26 +0000)]
AMDGPU: Refactor to prepare for manually selecting more intrinsics

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

5 years agoAMDGPU: Fix printing trailing whitespace after s_endpgm
Matt Arsenault [Fri, 14 Jun 2019 13:26:29 +0000 (13:26 +0000)]
AMDGPU: Fix printing trailing whitespace after s_endpgm

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

5 years agoAMDGPU: Fix missing const
Matt Arsenault [Fri, 14 Jun 2019 13:26:23 +0000 (13:26 +0000)]
AMDGPU: Fix missing const

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

5 years ago[docs][llvm-dwarfdump] Make the --show-parents and --show-children help text and...
James Henderson [Fri, 14 Jun 2019 13:00:09 +0000 (13:00 +0000)]
[docs][llvm-dwarfdump] Make the --show-parents and --show-children help text and docs more consistent and correct

The docs and help text for --show-parents and --show-children were a bit
inconsistent. The help text claimed they had an effect when "=<offset>"
was used, whereas the doc said it had an effect when "--find" or
"--name" were used. This change changes the doc to mention "=<offset>"
and removes this reference from the help text, to avoid having a very
long description in the help text (it still says "when selectively
printing entries").

Reviewed by: JDevlieghere, aprantl

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

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

5 years agoRevert r363298 "[lit] Disable test on darwin when building shared libs."
Nico Weber [Fri, 14 Jun 2019 12:58:17 +0000 (12:58 +0000)]
Revert r363298 "[lit] Disable test on darwin when building shared libs."

It broke running check-lld on mac, see https://reviews.llvm.org/D61697

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

5 years agogn build: Merge r363376
Nico Weber [Fri, 14 Jun 2019 12:31:18 +0000 (12:31 +0000)]
gn build: Merge r363376

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

5 years ago[yaml2obj] - Allow setting custom section types for implicit sections.
George Rimar [Fri, 14 Jun 2019 12:16:59 +0000 (12:16 +0000)]
[yaml2obj] - Allow setting custom section types for implicit sections.

We were hardcoding the final section type for sections that
are usually implicit. The patch fixes that.

This also fixes a few issues in existent test cases and removes
one precompiled object.

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

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

5 years ago[llvm-readobj] Don't abort printing of dynamic table if string reference is invalid
James Henderson [Fri, 14 Jun 2019 12:02:01 +0000 (12:02 +0000)]
[llvm-readobj] Don't abort printing of dynamic table if string reference is invalid

If dynamic table is missing, output "dynamic strtab not found'. If the index is
out of range, output "Invalid Offset<..>".

https://bugs.llvm.org/show_bug.cgi?id=40807

Reviewed by: jhenderson, grimar, MaskRay

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

Patch by Yuanfang Chen.

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

5 years ago[llvm-readobj] - Do not fail to dump the object which has wrong type of .shstrtab.
George Rimar [Fri, 14 Jun 2019 11:56:10 +0000 (11:56 +0000)]
[llvm-readobj] - Do not fail to dump the object which has wrong type of .shstrtab.

Imagine we have object that has .shstrtab with type != SHT_STRTAB.
In this case, we fail to dump the object, though GNU readelf dumps it without
any issues and warnings.

This patch fixes that. It adds a code to ELFDumper.cpp which is based on the implementation of getSectionName from the ELF.h:

https://github.com/llvm-mirror/llvm/blob/master/include/llvm/Object/ELF.h#L608
https://github.com/llvm-mirror/llvm/blob/master/include/llvm/Object/ELF.h#L431
https://github.com/llvm-mirror/llvm/blob/master/include/llvm/Object/ELF.h#L539

The difference is that all non critical errors are ommitted what allows us to
improve the dumping on a tool side. Also, this opens a road for a follow-up that
should allow us to dump the section headers, but drop the section names in case if .shstrtab is completely absent and/or broken.

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

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

5 years ago[ARM] MVE VPT Block Pass
Sjoerd Meijer [Fri, 14 Jun 2019 11:46:05 +0000 (11:46 +0000)]
[ARM] MVE VPT Block Pass

Initial commit of a new pass to create vector predication blocks, called VPT
blocks, that are supported by the Armv8.1-M MVE architecture.

This is a first naive implementation. I.e., for 2 consecutive predicated
instructions I1 and I2, for example, it will generate 2 VPT blocks:

VPST
I1
VPST
I2

A more optimal implementation would obviously put instructions in the same VPT
block when they are predicated on the same condition and when it is allowed to
do this:

VPTT
I1
I2

We will address this optimisation with follow up patches when the groundwork is
in. Creating VPT Blocks is very similar to IT Blocks, which is the reason I
added this to Thumb2ITBlocks.cpp. This allows reuse of the def use analysis
that we need for the more optimal implementation.

VPT blocks cannot be nested in IT blocks, and vice versa, and so these 2 passes
cannot interact with each other. Instructions allowed in VPT blocks must
be MVE instructions that are marked as VPT compatible.

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

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

5 years ago[yaml2obj] - Allow setting the custom Address for .strtab
George Rimar [Fri, 14 Jun 2019 11:13:32 +0000 (11:13 +0000)]
[yaml2obj] - Allow setting the custom Address for .strtab

Despite the fact that .strtab is non-allocatable,
there is no reason to disallow setting the custom address
for it.

The patch also adds a test case showing we can set any address
we want for other implicit sections.

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

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

5 years ago[yaml2obj] - Allow setting cutom Flags for implicit sections.
George Rimar [Fri, 14 Jun 2019 11:01:14 +0000 (11:01 +0000)]
[yaml2obj] - Allow setting cutom Flags for implicit sections.

With this patch we get ability to set any flags we want
for implicit sections defined in YAML.

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

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

5 years ago[SCEV] Pass NoWrapFlags when expanding an AddExpr
Sam Parker [Fri, 14 Jun 2019 09:19:41 +0000 (09:19 +0000)]
[SCEV] Pass NoWrapFlags when expanding an AddExpr

InsertBinop now accepts NoWrapFlags, so pass them through when
expanding a simple add expression.

This is the first re-commit of the functional changes from rL362687,
which was previously reverted.

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

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

5 years ago[llvm-objcopy][IHEX] Improve test case formatting. NFC
Eugene Leviant [Fri, 14 Jun 2019 08:09:10 +0000 (08:09 +0000)]
[llvm-objcopy][IHEX] Improve test case formatting. NFC

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

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

5 years agoMove commentary on opcode translation for code16 mov instructions
Eric Christopher [Fri, 14 Jun 2019 04:51:55 +0000 (04:51 +0000)]
Move commentary on opcode translation for code16 mov instructions
to segment registers closer to the segment register check for when
we add further optimizations.

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

5 years ago[llvm-objcopy] Remove no-op flush of errs
Alex Brachet [Fri, 14 Jun 2019 04:34:26 +0000 (04:34 +0000)]
[llvm-objcopy] Remove no-op flush of errs

Reviewers: alexshap, rupprecht, jhenderson

Subscribers: jakehehrlich, llvm-commits

Tags: #llvm

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

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

5 years agogn build: Merge r363204 (clang-scan-deps)
Nico Weber [Fri, 14 Jun 2019 04:26:01 +0000 (04:26 +0000)]
gn build: Merge r363204 (clang-scan-deps)

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

5 years ago[llvm-objcopy] Changed command line parsing errors
Alex Brachet [Fri, 14 Jun 2019 02:04:02 +0000 (02:04 +0000)]
[llvm-objcopy] Changed command line parsing errors

Summary: Tidied up errors during command line parsing to be more consistent with the rest of llvm-objcopy errors.

Reviewers: jhenderson, rupprecht, espindola, alexshap

Reviewed By: jhenderson, rupprecht

Subscribers: emaste, arichardson, MaskRay, llvm-commits, jakehehrlich

Tags: #llvm

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

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

5 years agoDebugInfo: Include enumerators in pubnames
David Blaikie [Fri, 14 Jun 2019 01:58:56 +0000 (01:58 +0000)]
DebugInfo: Include enumerators in pubnames

This is consistent with GCC's behavior (which is the defacto standard
for pubnames). Though I find the presence of enumerators from enum
classes to be a bit confusing, possibly a bug on GCC's end (since they
can't be named unqualified, unlike the other names - and names nested in
classes don't go in pubnames, for instance - presumably because one must
name the class first & that's enough to limit the scope of the search)

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

5 years ago[X86] Add target triple for live-debug-values-fragments.mir
Tim Shen [Fri, 14 Jun 2019 01:41:04 +0000 (01:41 +0000)]
[X86] Add target triple for live-debug-values-fragments.mir

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

5 years agoAdd REQUIRES: zlib to test added in r363325 as the profile uses zlib compression.
Douglas Yung [Fri, 14 Jun 2019 01:08:50 +0000 (01:08 +0000)]
Add REQUIRES: zlib to test added in r363325 as the profile uses zlib compression.

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

5 years ago[AMDGPU] gfx1011/gfx1012 targets
Stanislav Mekhanoshin [Fri, 14 Jun 2019 00:33:31 +0000 (00:33 +0000)]
[AMDGPU] gfx1011/gfx1012 targets

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

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

5 years agoRevert "[Remarks] Refactor optimization remarks setup"
Francis Visoiu Mistrih [Fri, 14 Jun 2019 00:05:56 +0000 (00:05 +0000)]
Revert "[Remarks] Refactor optimization remarks setup"

This reverts commit 6e6e3af55bb97e1a4c97375c15a2b0099120c5a7.

This breaks greendragon.

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

5 years ago[Coverage] Speculative fix for r363325 for an older compiler
Vedant Kumar [Fri, 14 Jun 2019 00:03:22 +0000 (00:03 +0000)]
[Coverage] Speculative fix for r363325 for an older compiler

It looks like an older version of gcc can't figure out that it needs to
move a unique_ptr while implicitly constructing an Expected object.

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

5 years ago[AMDGPU] gfx1010 wave32 icmp/fcmp intrinsic changes for wave32
Stanislav Mekhanoshin [Thu, 13 Jun 2019 23:47:36 +0000 (23:47 +0000)]
[AMDGPU] gfx1010 wave32 icmp/fcmp intrinsic changes for wave32

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

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

5 years ago[llvm-objcopy] Fix sparc target endianness
Seiya Nuta [Thu, 13 Jun 2019 23:24:12 +0000 (23:24 +0000)]
[llvm-objcopy] Fix sparc target endianness

Summary: AFAIK, the "sparc" target is big endian and the target for 32-bit little-endian SPARC is denoted as "sparcel". This patch fixes the endianness of "sparc" target and adds "sparcel" target for 32-bit little-endian SPARC.

Reviewers: espindola, alexshap, rupprecht, jhenderson

Reviewed By: jhenderson

Subscribers: jyknight, emaste, arichardson, fedor.sergeev, jakehehrlich, MaskRay, llvm-commits

Tags: #llvm

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

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

5 years agoUse fully qualified name when printing S_CONSTANT records
Amy Huang [Thu, 13 Jun 2019 22:53:43 +0000 (22:53 +0000)]
Use fully qualified name when printing S_CONSTANT records

Summary:
Before it was using the fully qualified name only for static data members.
Now it does for all variable names to match MSVC.

Reviewers: rnk

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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

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

5 years agoSymbolize: Remove dead code. NFCI.
Peter Collingbourne [Thu, 13 Jun 2019 22:49:34 +0000 (22:49 +0000)]
Symbolize: Remove dead code. NFCI.

The only caller of SymbolizableObjectFile::create passes a non-null
DebugInfoContext and asserts that they do so. Move the assert into
SymbolizableObjectFile::create and remove null checks.

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

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

5 years ago[AMDGPU] gfx10 documentation update. NFC.
Stanislav Mekhanoshin [Thu, 13 Jun 2019 22:18:47 +0000 (22:18 +0000)]
[AMDGPU] gfx10 documentation update. NFC.

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

5 years ago[GlobalISel][IRTranslator] Add debug loc with line 0 to constants emitted into the...
Amara Emerson [Thu, 13 Jun 2019 22:15:35 +0000 (22:15 +0000)]
[GlobalISel][IRTranslator] Add debug loc with line 0 to constants emitted into the entry block.

Constants, including G_GLOBAL_VALUE, are all emitted into the entry block which
lets us use the vreg def assuming it dominates all other users. However, it can
cause jumpy debug behaviour since the DebugLoc attached to these MIs are from
a user instruction that could be in a different block.

Fixes PR40887.

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

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

5 years ago[X86Disassembler] Unify the EVEX and VEX code in emitContextTable. Merge the ATTR_VEX...
Craig Topper [Thu, 13 Jun 2019 22:15:25 +0000 (22:15 +0000)]
[X86Disassembler] Unify the EVEX and VEX code in emitContextTable. Merge the ATTR_VEXL/ATTR_EVEXL bits. NFCI

Merging the two bits shrinks the context table from 16384 bytes to 8192 bytes.

Remove the ATTRIBUTE_BITS macro and just create an enum directly. Then fix the ATTR_max define to be 8192 to reflect the table size so we stop hardcoding it separately.

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

5 years ago[MachinePiepliner] Don't check boundary node in checkValidNodeOrder
Jinsong Ji [Thu, 13 Jun 2019 21:51:12 +0000 (21:51 +0000)]
[MachinePiepliner] Don't check boundary node in checkValidNodeOrder

This was exposed by PowerPC target enablement.

In ScheduleDAG, if we haven't seen any uses in this scheduling region,
we will create a dependence edge to ExitSU to model the live-out latency.
This is required for vreg defs with no in-region use, and prefetches with
no vreg def.

When we build NodeOrder in Scheduler, we ignore these boundary nodes.
However, when we check Succs in checkValidNodeOrder, we did not skip
them, so we still assume all the nodes have been sorted and in order in
Indices array. So when we call lower_bound() for ExitSU, it will return
Indices.end(), causing memory issues in following Node access.

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

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

5 years ago[Remarks] Refactor optimization remarks setup
Francis Visoiu Mistrih [Thu, 13 Jun 2019 21:46:57 +0000 (21:46 +0000)]
[Remarks] Refactor optimization remarks setup

* Add a common function to setup opt-remarks
* Rename common options to the same names
* Add error types to distinguish between file errors and regex errors

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

5 years ago[Coverage] Load code coverage data from archives
Vedant Kumar [Thu, 13 Jun 2019 20:48:57 +0000 (20:48 +0000)]
[Coverage] Load code coverage data from archives

Support loading code coverage data from regular archives, thin archives,
and from MachO universal binaries which contain archives.

Testing: check-llvm, check-profile (with {A,UB}San enabled)

rdar://51538999

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

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

5 years agogn build: Merge r363242
Nico Weber [Thu, 13 Jun 2019 20:25:18 +0000 (20:25 +0000)]
gn build: Merge r363242

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

5 years ago[AMDGPU] gfx1010 AMDGPUSetCCOp definition
Stanislav Mekhanoshin [Thu, 13 Jun 2019 20:23:02 +0000 (20:23 +0000)]
[AMDGPU] gfx1010 AMDGPUSetCCOp definition

It was missing from D63293 and breaks in a debug tablegen w/o
this part.

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

5 years ago[ORC] Rename MaterializationResponsibility resolve and emit methods to
Lang Hames [Thu, 13 Jun 2019 20:11:23 +0000 (20:11 +0000)]
[ORC] Rename MaterializationResponsibility resolve and emit methods to
notifyResolved/notifyEmitted.

The 'notify' prefix better describes what these methods do: they update the JIT
symbol states and notify any pending queries that the 'resolved' and 'emitted'
states have been reached (rather than actually performing the resolution or
emission themselves). Since new states are going to be introduced in the near
future (to track symbol registration/initialization) it's worth changing the
convention pre-emptively to avoid further confusion.

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

5 years ago[LangRef] Clarify poison semantics
Nikita Popov [Thu, 13 Jun 2019 19:45:36 +0000 (19:45 +0000)]
[LangRef] Clarify poison semantics

I find the current documentation of poison somewhat confusing,
mainly because its use of "undefined behavior" doesn't seem to
align with our usual interpretation (of immediate UB). Especially
the sentence "any instruction that has a dependence on a poison
value has undefined behavior" is very confusing.

Clarify poison semantics by:

 * Replacing the introductory paragraph with the standard rationale
   for having poison values.
 * Spelling out that instructions depending on poison return poison.
 * Spelling out how we go from a poison value to immediate undefined
   behavior and give the two examples we currently use in ValueTracking.
 * Spelling out that side effects depending on poison are UB.

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

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

5 years ago[SimplifyCFG] NFC, update Switch tests as a baseline.
Shawn Landden [Thu, 13 Jun 2019 19:36:38 +0000 (19:36 +0000)]
[SimplifyCFG] NFC, update Switch tests as a baseline.

Also add baseline tests to show effect of later patches.

There were a couple of regressions here that were never caught,
but my patch set that this is a preparation to will fix them.

This is the third attempt to land this patch.

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

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

5 years agoAdd a clarifying comment about branching on poison
Philip Reames [Thu, 13 Jun 2019 19:27:56 +0000 (19:27 +0000)]
Add a clarifying comment about branching on poison

I recently got this wrong (again), and I'm sure I'm not the only one.  Put a comment in the logical place someone would look to "fix" the obvious "missed optimization" which arrises based on the common misunderstanding.  Hopefully, this will save others time.  :)

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

5 years agoRevert "[NFC][CodeGen] Add unary fneg tests to fp-fast.ll fp-fold.ll fp-in-intregs...
Cameron McInally [Thu, 13 Jun 2019 19:25:16 +0000 (19:25 +0000)]
Revert "[NFC][CodeGen] Add unary fneg tests to fp-fast.ll fp-fold.ll fp-in-intregs.ll fp-stack-compare-cmov.ll fp-stack-compare.ll fsxor-alignment.ll"

This reverts commit 1d85a7518c6b660a85caabd580b632f9abd5a8ab.

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

5 years agoRevert "[NFC][CodeGen] Add unary fneg tests to fmul-combines.ll fnabs.ll"
Cameron McInally [Thu, 13 Jun 2019 19:25:12 +0000 (19:25 +0000)]
Revert "[NFC][CodeGen] Add unary fneg tests to fmul-combines.ll fnabs.ll"

This reverts commit 5c0114058126757ce21e546997121afffc8119cd.

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

5 years agoRevert "[NFC][CodeGen] Add unary fneg tests to X86/fma_patterns_wide.ll"
Cameron McInally [Thu, 13 Jun 2019 19:25:09 +0000 (19:25 +0000)]
Revert "[NFC][CodeGen] Add unary fneg tests to X86/fma_patterns_wide.ll"

This reverts commit f1b8c6ac4f9d31899a2bc128f8a37b5a1c3e1f77.

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

5 years agoRevert "[NFC][CodeGen] Add unary fneg tests to X86/fma_patterns.ll"
Cameron McInally [Thu, 13 Jun 2019 19:25:06 +0000 (19:25 +0000)]
Revert "[NFC][CodeGen] Add unary fneg tests to X86/fma_patterns.ll"

This reverts commit 06de52674da73f30751f3ff19fdf457f87077c65.

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

5 years agoRevert "[NFC][CodeGen] Add unary fneg tests to X86/fma4-fneg-combine.ll"
Cameron McInally [Thu, 13 Jun 2019 19:25:03 +0000 (19:25 +0000)]
Revert "[NFC][CodeGen] Add unary fneg tests to X86/fma4-fneg-combine.ll"

This reverts commit f288a0685f874d2b965db25a16b9c44f78c55b12.

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

5 years agoRevert "[NFC][CodeGen] Add unary fneg tests to X86/fma-scalar-combine.ll"
Cameron McInally [Thu, 13 Jun 2019 19:25:00 +0000 (19:25 +0000)]
Revert "[NFC][CodeGen] Add unary fneg tests to X86/fma-scalar-combine.ll"

This reverts commit 3d2ee0053aa2576fd19cd169798c496199f0a29b.

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

5 years agoRevert "[NFC][CodeGen] Add unary fneg tests to X86/fma-intrinsics-x86.ll"
Cameron McInally [Thu, 13 Jun 2019 19:24:57 +0000 (19:24 +0000)]
Revert "[NFC][CodeGen] Add unary fneg tests to X86/fma-intrinsics-x86.ll"

This reverts commit 169fc2b0209d5574fca0927a707706ea2d5f5a09.

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

5 years agoRevert "[NFC][CodeGen] Add unary fneg tests to X86/fma4-intrinsics-x86.ll"
Cameron McInally [Thu, 13 Jun 2019 19:24:54 +0000 (19:24 +0000)]
Revert "[NFC][CodeGen] Add unary fneg tests to X86/fma4-intrinsics-x86.ll"

This reverts commit 66f286845cad73a280617a606e29c9009bb4da87.

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

5 years agoRevert "[NFC][CodeGen] Add unary FNeg tests to some X86/ and XCore/ tests."
Cameron McInally [Thu, 13 Jun 2019 19:24:51 +0000 (19:24 +0000)]
Revert "[NFC][CodeGen] Add unary FNeg tests to some X86/ and XCore/ tests."

This reverts commit 4f3cf3853e1145e3e08fb42ace79ba3e4e268540.

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

5 years agoRevert "[NFC][CodeGen] Add unary FNeg tests to X86/fma-intrinsics-canonical.ll"
Cameron McInally [Thu, 13 Jun 2019 19:24:47 +0000 (19:24 +0000)]
Revert "[NFC][CodeGen] Add unary FNeg tests to X86/fma-intrinsics-canonical.ll"

This reverts commit ee5881a88cbe148bb64d14b8a5b31a314ee22343.

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

5 years agoRevert "[NFC][CodeGen] Forgot 2 unary FNeg tests in X86/fma-intrinsics-canonical.ll"
Cameron McInally [Thu, 13 Jun 2019 19:24:44 +0000 (19:24 +0000)]
Revert "[NFC][CodeGen] Forgot 2 unary FNeg tests in X86/fma-intrinsics-canonical.ll"

This reverts commit 5f39a3096f8e7b09bd1645f4e4ca66343066a6e1.

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

5 years agoRevert "[NFC][CodeGen] Add unary fneg tests to X86/fma-fneg-combine.ll"
Cameron McInally [Thu, 13 Jun 2019 19:24:41 +0000 (19:24 +0000)]
Revert "[NFC][CodeGen] Add unary fneg tests to X86/fma-fneg-combine.ll"

This reverts commit 10c085554215e84831d272f2e6a93b7c70d143bf.

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

5 years agoRevert "[NFC][CodeGen] Add unary FNeg tests to X86/combine-fcopysign.ll X86/dag-fmf...
Cameron McInally [Thu, 13 Jun 2019 19:24:38 +0000 (19:24 +0000)]
Revert "[NFC][CodeGen] Add unary FNeg tests to X86/combine-fcopysign.ll X86/dag-fmf-cse.ll X86/fast-isel-fneg.ll X86/fdiv.ll"

This reverts commit e04c4b6af81d6142c4ff8dd9d00f44a27e9a66eb.

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

5 years agoRevert "[NFC][CodeGen] Add unary FNeg tests to X86/avx512vl-intrinsics-fast-isel...
Cameron McInally [Thu, 13 Jun 2019 19:24:34 +0000 (19:24 +0000)]
Revert "[NFC][CodeGen] Add unary FNeg tests to X86/avx512vl-intrinsics-fast-isel.ll X86/combine-fabs.ll"

This reverts commit 6fe46ec25d849a9fd5be25acf0ee77e3c06c0786.

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

5 years agoRevert "[NFC][CodeGen] Add unary FNeg tests to X86/avx512vl-intrinsics-fast-isel.ll"
Cameron McInally [Thu, 13 Jun 2019 19:24:31 +0000 (19:24 +0000)]
Revert "[NFC][CodeGen] Add unary FNeg tests to X86/avx512vl-intrinsics-fast-isel.ll"

This reverts commit 2aa5ada267d268fec2b1e90efeae1ddee24617be.

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

5 years agoRevert "[NFC][CodeGen] Add unary FNeg tests to X86/avx512vl-intrinsics-fast-isel.ll"
Cameron McInally [Thu, 13 Jun 2019 19:24:28 +0000 (19:24 +0000)]
Revert "[NFC][CodeGen] Add unary FNeg tests to X86/avx512vl-intrinsics-fast-isel.ll"

This reverts commit 27a5db9de57d13d44c7a7704e06d8ba69ec8b4af.

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

5 years agoRevert "[NFC][CodeGen] Add unary FNeg tests to X86/avx512-intrinsics-fast-isel.ll"
Cameron McInally [Thu, 13 Jun 2019 19:24:24 +0000 (19:24 +0000)]
Revert "[NFC][CodeGen] Add unary FNeg tests to X86/avx512-intrinsics-fast-isel.ll"

This reverts commit 41e0b9f2803089155536bdec7cbea6b82680a727.

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

5 years agoRevert "[NFC][CodeGen] Add unary FNeg tests to X86/avx512-intrinsics-fast-isel.ll"
Cameron McInally [Thu, 13 Jun 2019 19:24:21 +0000 (19:24 +0000)]
Revert "[NFC][CodeGen] Add unary FNeg tests to X86/avx512-intrinsics-fast-isel.ll"

This reverts commit aeb89f8b33d8fca4e819ba41267093699a7e4885.

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

5 years ago[AMDGPU] gfx1010 base changes for wave32
Stanislav Mekhanoshin [Thu, 13 Jun 2019 19:18:29 +0000 (19:18 +0000)]
[AMDGPU] gfx1010 base changes for wave32

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

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

5 years ago[lit] Disable test on darwin when building shared libs.
Don Hinton [Thu, 13 Jun 2019 19:08:49 +0000 (19:08 +0000)]
[lit] Disable test on darwin when building shared libs.

Summary:
This test fails to link shared libraries because tries to run
a copied version of clang-check to see if the mock version of libcxx
in the same directory can be loaded dynamically.  Since the test is
specifically designed not to look in the default just-built lib
directory, it must be disabled when building with
BUILD_SHARED_LIBS=ON.

Currently only disabling it on Darwin and basing it on the
enable_shared flag.

Reviewed By: ilya-biryukov

Tags: #clang, #llvm

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

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

5 years ago[AMDGPU] gfx1010: small test change for wave32. NFC
Stanislav Mekhanoshin [Thu, 13 Jun 2019 19:05:04 +0000 (19:05 +0000)]
[AMDGPU] gfx1010: small test change for wave32. NFC

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

5 years ago[docs] Fix TableGen/LangRef typos
Jordan Rupprecht [Thu, 13 Jun 2019 18:42:30 +0000 (18:42 +0000)]
[docs] Fix TableGen/LangRef typos

This fixes:
 - `Pred` -> `Prep`
 - `IfDef` -> `Ifdef` (rst is case sensitive here)

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

5 years ago[LFTR] Rename variable to minimize confusion [NFC]
Philip Reames [Thu, 13 Jun 2019 18:40:15 +0000 (18:40 +0000)]
[LFTR] Rename variable to minimize confusion [NFC]

As pointed out by Nikita in D62625, BackedgeTakenCount is generally used to refer to the backedge taken count of the loop.  A conditional backedge taken count - one which only applies if a particular exit is taken - is called a ExitCount in SCEV code, so be consistent here.

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

5 years ago[LFTR] Stylistic cleanup as suggested in last review comment of D62939 [NFC]
Philip Reames [Thu, 13 Jun 2019 18:32:55 +0000 (18:32 +0000)]
[LFTR] Stylistic cleanup as suggested in last review comment of D62939 [NFC]

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

5 years ago[InstCombine] add test for failed libfunction prototype matching; NFC
Sanjay Patel [Thu, 13 Jun 2019 18:26:10 +0000 (18:26 +0000)]
[InstCombine] add test for failed libfunction prototype matching; NFC

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

5 years agoFix a bug w/inbounds invalidation in LFTR
Philip Reames [Thu, 13 Jun 2019 18:23:13 +0000 (18:23 +0000)]
Fix a bug w/inbounds invalidation in LFTR

This contains fixes for two cases where we might invalidate inbounds and leave it stale in the IR (a miscompile). Case 1 is when switching to an IV with no dynamically live uses, and case 2 is when doing pre-to-post conversion on the same pointer type IV.

The basic scheme used is to prove that using the given IV (pre or post increment forms) would have to already trigger UB on the path to the test we're modifying.  As such, our potential UB triggering use does not change the semantics of the original program.

As was pointed out in the review thread by Nikita, this is defending against a separate issue from the hasConcreteDef case. This is about poison, that's about undef. Unfortunately, the two are different, see Nikita's comment for a fuller explanation, he explains it well.

(Note: I'm going to address Nikita's last style comment in a separate commit just to minimize chance of subtle bugs being introduced due to typos.)

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

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

5 years ago[clang][NewPM] Fix broken -O0 test from missing assumptions
Leonard Chan [Thu, 13 Jun 2019 18:18:40 +0000 (18:18 +0000)]
[clang][NewPM] Fix broken -O0 test from missing assumptions

Add an AssumptionCache callback to the InlineFuntionInfo used for the
AlwaysInlinerPass to match codegen of the AlwaysInlinerLegacyPass to generate
llvm.assume. This fixes CodeGen/builtin-movdir.c when new PM is enabled by
default.

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

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

5 years ago[InstCombine] auto-generate complete test checks; NFC
Sanjay Patel [Thu, 13 Jun 2019 18:14:49 +0000 (18:14 +0000)]
[InstCombine] auto-generate complete test checks; NFC

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

5 years ago[NFC] Updated testcase for D54411/rL363284
David Bolvansky [Thu, 13 Jun 2019 18:13:03 +0000 (18:13 +0000)]
[NFC] Updated testcase for D54411/rL363284

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

5 years ago[Codegen] Merge tail blocks with no successors after block placement
David Bolvansky [Thu, 13 Jun 2019 18:11:32 +0000 (18:11 +0000)]
[Codegen] Merge tail blocks with no successors after block placement

Summary:
I found the following case having tail blocks with no successors merging opportunities after block placement.

Before block placement:

bb0:
    ...
    bne a0, 0, bb2:

bb1:
    mv a0, 1
    ret

bb2:
    ...

bb3:
    mv a0, 1
    ret

bb4:
    mv a0, -1
    ret

The conditional branch bne in bb0 is opposite to beq.

After block placement:

bb0:
    ...
    beq a0, 0, bb1

bb2:
    ...

bb4:
    mv a0, -1
    ret

bb1:
    mv a0, 1
    ret

bb3:
    mv a0, 1
    ret

After block placement, that appears new tail merging opportunity, bb1 and bb3 can be merged as one block. So the conditional constraint for merging tail blocks with no successors should be removed. In my experiment for RISC-V, it decreases code size.

Author of original patch: Jim Lin

Reviewers: haicheng, aheejin, craig.topper, rnk, RKSimon, Jim, dmgreen

Reviewed By: Jim, dmgreen

Subscribers: xbolva00, dschuff, javed.absar, sbc100, jgravelle-google, aheejin, kito-cheng, dmgreen, PkmX, llvm-commits

Tags: #llvm

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

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

5 years ago[AMDGPU] ImmArg and SourceOfDivergence for permlane/dpp
Stanislav Mekhanoshin [Thu, 13 Jun 2019 16:31:51 +0000 (16:31 +0000)]
[AMDGPU] ImmArg and SourceOfDivergence for permlane/dpp

Added missing ImmArg and SourceOfDivergence to the crosslane
intrinsics.

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

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

5 years ago[NFC][CodeGen] Add unary FNeg tests to X86/avx512-intrinsics-fast-isel.ll
Cameron McInally [Thu, 13 Jun 2019 15:54:20 +0000 (15:54 +0000)]
[NFC][CodeGen] Add unary FNeg tests to X86/avx512-intrinsics-fast-isel.ll

Patch 2 of n.

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

5 years ago[EarlyCSE] Ensure equal keys have the same hash value
Joseph Tremoulet [Thu, 13 Jun 2019 15:24:11 +0000 (15:24 +0000)]
[EarlyCSE] Ensure equal keys have the same hash value

Summary:
The logic in EarlyCSE that looks through 'not' operations in the
predicate recognizes e.g. that `select (not (cmp sgt X, Y)), X, Y` is
equivalent to `select (cmp sgt X, Y), Y, X`.  Without this change,
however, only the latter is recognized as a form of `smin X, Y`, so the
two expressions receive different hash codes.  This leads to missed
optimization opportunities when the quadratic probing for the two hashes
doesn't happen to collide, and assertion failures when probing doesn't
collide on insertion but does collide on a subsequent table grow
operation.

This change inverts the order of some of the pattern matching, checking
first for the optional `not` and then for the min/max/abs patterns, so
that e.g. both expressions above are recognized as a form of `smin X, Y`.

It also adds an assertion to isEqual verifying that it implies equal
hash codes; this fires when there's a collision during insertion, not
just grow, and so will make it easier to notice if these functions fall
out of sync again.  A new flag --earlycse-debug-hash is added which can
be used when changing the hash function; it forces hash collisions so
that any pair of values inserted which compare as equal but hash
differently will be caught by the isEqual assertion.

Reviewers: spatel, nikic

Reviewed By: spatel, nikic

Subscribers: lebedev.ri, arsenm, craig.topper, efriedma, hiraditya, llvm-commits

Tags: #llvm

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

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

5 years agoFix GCC compiler warning. NFC.
Michael Liao [Thu, 13 Jun 2019 14:11:09 +0000 (14:11 +0000)]
Fix GCC compiler warning. NFC.

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

5 years ago[X86] Use fresh MemOps when emitting VAARG64
Simon Pilgrim [Thu, 13 Jun 2019 14:05:37 +0000 (14:05 +0000)]
[X86] Use fresh MemOps when emitting VAARG64

Previously it copied over MachineMemOperands verbatim which caused MOV32rm to have store flags set, and MOV32mr to have load flags set. This fixes some assertions being thrown with EXPENSIVE_CHECKS on.

Committed on behalf of @luke (Luke Lau)

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

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

5 years agoRemove ';' after namespace's closing bracket [NFC]
David Stenberg [Thu, 13 Jun 2019 14:02:55 +0000 (14:02 +0000)]
Remove ';' after namespace's closing bracket [NFC]

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

5 years ago[docs][llvm-symbolizer] Fix formatting issue with --functions
James Henderson [Thu, 13 Jun 2019 13:58:44 +0000 (13:58 +0000)]
[docs][llvm-symbolizer] Fix formatting issue with --functions

Reviewed by: rupprecht

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

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