]> granicus.if.org Git - llvm/log
llvm
6 years agoMerging r326394: release_60 origin/release_60
Tom Stellard [Tue, 12 Jun 2018 01:39:23 +0000 (01:39 +0000)]
Merging r326394:

------------------------------------------------------------------------
r326394 | rnk | 2018-02-28 16:09:35 -0800 (Wed, 28 Feb 2018) | 10 lines

[DAE] don't remove args of musttail target/caller

`musttail` requires identical signatures of caller and callee. Removing
arguments breaks `musttail` semantics.

PR36441

Patch by Fedor Indutny

Differential Revision: https://reviews.llvm.org/D43708
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@334464 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r326358:
Tom Stellard [Wed, 30 May 2018 19:04:40 +0000 (19:04 +0000)]
Merging r326358:

------------------------------------------------------------------------
r326358 | dim | 2018-02-28 12:04:21 -0800 (Wed, 28 Feb 2018) | 29 lines

Fix llvm-config --system-libs output on FreeBSD and NetBSD

Summary:
For various reasons, CMake's detection mechanism for `backtrace()`
returns an absolute path `/usr/lib/libexecinfo.so` on FreeBSD and
NetBSD.

Since `tools/llvm-config/CMakeLists.txt` only checks if system
libraries start with `-`, this causes `llvm-config --system-libs` to
produce the following incorrect output:

```
-lrt -l/usr/lib/libexecinfo.so -ltinfo -lpthread -lz -lm
```

Fix it by removing the path and the `lib` prefix, to make it look like a
regular short library name, suitable for appending to a `-l` link flag.

This also fixes the `Bindings/Go/go.test` test case, since that always
died with "unable to find library -l/usr/lib/libexecinfo.so".

Reviewers: chandlerc, emaste, joerg, krytarowski

Reviewed By: krytarowski

Subscribers: hans, bdrewery, mgorny, hintonda, llvm-commits

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@333579 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r328798:
Tom Stellard [Wed, 30 May 2018 18:50:22 +0000 (18:50 +0000)]
Merging r328798:

------------------------------------------------------------------------
r328798 | haicheng | 2018-03-29 09:01:26 -0700 (Thu, 29 Mar 2018) | 37 lines

[JumpThreading] Don't select an edge that we know we can't thread

In r312664 (D36404), JumpThreading stopped threading edges into
loop headers. Unfortunately, I observed a significant performance
regression as a result of this change. Upon further investigation,
the problematic pattern looked something like this (after
many high level optimizations):

while (true) {
    bool cond = ...;
    if (!cond) {
        <body>
    }
    if (cond)
        break;
}

Now, naturally we want jump threading to essentially eliminate the
second if check and hook up the edges appropriately. However, the
above mentioned change, prevented it from doing this because it would
have to thread an edge into the loop header.

Upon further investigation, what is happening is that since both branches
are threadable, JumpThreading picks one of them at arbitrarily. In my
case, because of the way that the IR ended up, it tended to pick
the one to the loop header, bailing out immediately after. However,
if it had picked the one to the exit block, everything would have
worked out fine (because the only remaining branch would then be folded,
not thraded which is acceptable).

Thus, to fix this problem, we can simply eliminate loop headers from
consideration as possible threading targets earlier, to make sure that
if there are multiple eligible branches, we can still thread one of
the ones that don't target a loop header.

Patch by Keno Fischer!
Differential Revision: https://reviews.llvm.org/D42260
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@333577 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r330345:
Tom Stellard [Wed, 30 May 2018 16:51:22 +0000 (16:51 +0000)]
Merging r330345:

------------------------------------------------------------------------
r330345 | kparzysz | 2018-04-19 10:26:46 -0700 (Thu, 19 Apr 2018) | 8 lines

[if-converter] Handle BBs that terminate in ret during diamond conversion

This fixes https://llvm.org/PR36825.

Original patch by Valentin Churavy (D45218).

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@333561 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r332302:
Tom Stellard [Tue, 29 May 2018 23:16:15 +0000 (23:16 +0000)]
Merging r332302:

------------------------------------------------------------------------
r332302 | kfischer | 2018-05-14 15:05:01 -0700 (Mon, 14 May 2018) | 15 lines

[InstCombine] fix crash due to ignored addrspacecast

Summary:
Part of the InstCombine code for simplifying GEPs looks through
addrspacecasts. However, this was done by updating a variable
also used by the next transformation, for marking GEPs as
inbounds. This led to replacing a GEP with a similar instruction
in a different addrspace, which caused an assertion failure in RAUW.

This caused julia issue https://github.com/JuliaLang/julia/issues/27055

Patch by Jeff Bezanson <jeff@juliacomputing.com>

Reviewed By: arsenm
Differential Revision: https://reviews.llvm.org/D46722
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@333477 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r328885:
Tom Stellard [Tue, 29 May 2018 23:03:38 +0000 (23:03 +0000)]
Merging r328885:

------------------------------------------------------------------------
r328885 | timshen | 2018-03-30 10:51:03 -0700 (Fri, 30 Mar 2018) | 14 lines

[NVPTX] Enable StructuredCFG for NVPTX

Summary:
Make NVPTX require structured CFG. Added a temporary flag to
"roll back" the behavior for easy deployment.

Combined with D45008, this fixes several internal Nvidia GPU test
failures that we suspect to be ptxas miscompiles (PR27738).

Reviewers: jlebar

Subscribers: jholewinski, sanjoy, llvm-commits, hiraditya

Differential Revision: https://reviews.llvm.org/D45070
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@333475 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r328884:
Tom Stellard [Tue, 29 May 2018 22:55:51 +0000 (22:55 +0000)]
Merging r328884:

------------------------------------------------------------------------
r328884 | timshen | 2018-03-30 10:51:00 -0700 (Fri, 30 Mar 2018) | 19 lines

[BlockPlacement] Disable block placement tail duplciation in structured CFG.

Summary:
Tail duplication easily breaks the structure of CFG, e.g. duplicating on
a region entry. If the structure is intended to be preserved, then we
may want to configure tail duplication, or disable it for structured
CFG. From our benchmark results disabling it doesn't cause performance
regression.

Notice that this currently affects AMDGPU backend. In the next patch, I
also plan to turn on requiresStructuredCFG for NVPTX.

All unit tests still pass.

Reviewers: jlebar, arsenm

Subscribers: jholewinski, sanjoy, wdng, tpr, hiraditya, llvm-commits

Differential Revision: https://reviews.llvm.org/D45008
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@333474 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r332682 and r332694:
Tom Stellard [Tue, 29 May 2018 22:39:00 +0000 (22:39 +0000)]
Merging r332682 and r332694:

------------------------------------------------------------------------
r332682 | kfischer | 2018-05-17 18:03:01 -0700 (Thu, 17 May 2018) | 21 lines

[X86DomainReassignment] Don't compare stack-allocated values by address

Summary:
The Closure allocated in the main loop is allocated on the stack. However,
later in the code its address is taken (and used for comparisons). This
obviously doesn't work. In fact, the Closure will get the same stack address
during every loop iteration, rendering the check that intended to identify
Closure conflicts entirely ineffective. Fix this bug by giving every Closure
a unique ID and using that for comparison. Alternatively, we could heap
allocate the closure object.

Fixes PR37396
Fixes JuliaLang/julia#27032

Reviewers: craig.topper, guyblank

Reviewed By: craig.topper

Subscribers: vchuravy, llvm-commits

Differential Revision: https://reviews.llvm.org/D46800
------------------------------------------------------------------------

------------------------------------------------------------------------
r332694 | kfischer | 2018-05-17 21:36:38 -0700 (Thu, 17 May 2018) | 15 lines

[X86DomainReassignment] Hopefully fix buildbot failure

The Darwin build bot failed with:
```
llc -mcpu=skylake-avx512 -mtriple=x86_64-unknown-linux-gnu domain-reassignment-test.ll -o - | llvm-mc
--
Exit Code: 134

Command Output (stderr):
--
Assertion failed: (MAI->hasSingleParameterDotFile()), function EmitFileDirective, file lib/MC/MCAsmStreamer.cpp, line 1087.
```

Looks like this is because the `llvm-mc` command was missing a triple
directive and defaulting to MachO. Add the triple option.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@333470 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r332680:
Tom Stellard [Tue, 29 May 2018 22:38:57 +0000 (22:38 +0000)]
Merging r332680:

------------------------------------------------------------------------
r332680 | kfischer | 2018-05-17 17:40:52 -0700 (Thu, 17 May 2018) | 13 lines

[X86DomainReassignment] Don't delete IMPLICIT_DEF nodes

Summary:
We cannot simply delete IMPLICIT_DEF nodes. They may be used
later (e.g. by a PHI) and deleting them will cause later passes (e.g.
LiveVariables) to crash. However, it seems fine to ignore them for
purposes of the domain reassignment (as we do with PHI).

Fixes PR37430
Fixes JuliaLang/julia#27080

Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D46797
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@333469 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r330976:
Geoff Berry [Thu, 24 May 2018 20:49:30 +0000 (20:49 +0000)]
Merging r330976:
------------------------------------------------------------------------
r330976 | gberry | 2018-04-26 14:50:45 -0400 (Thu, 26 Apr 2018) | 15 lines

[AArch64] Fix scavenged spill slot base when stack realignment required.

Summary:
Use the FP for scavenged spill slot accesses to prevent corruption of
the callee-save region when the SP is re-aligned.

Based on problem and patch reported by @paulwalker-arm

This is an alternative to solution proposed in D45770

Reviewers: t.p.northover, paulwalker-arm, thegameg, javed.absar

Subscribers: qcolombet, mcrosier, paulwalker-arm, kristof.beyls, rengolin, javed.absar, llvm-commits

Differential Revision: https://reviews.llvm.org/D46063
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@333223 91177308-0d34-0410-b5e6-96231b3b80d8

6 years ago[X86] Add hasSideEffects=0 back to ADOX instructions. Partial cherrypick from r328952.
Craig Topper [Tue, 22 May 2018 04:22:44 +0000 (04:22 +0000)]
[X86] Add hasSideEffects=0 back to ADOX instructions. Partial cherrypick from r328952.

This flag was present before the cherrypick of 328945. This matches what happened on trunk. I've left out the scheduling changes from r328952 to minimize changes from 6.0.1.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@332943 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerge r332389 to pick up the fix for PR37431, a regression w/ the new EFLAGS lowering.
Chandler Carruth [Tue, 22 May 2018 03:06:34 +0000 (03:06 +0000)]
Merge r332389 to pick up the fix for PR37431, a regression w/ the new EFLAGS lowering.

Required switching $regname to %regname in the MIR test and regenerating the
CHECKs for the other test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@332940 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerge r330269 to fix egregiously bad codegeneration in the new EFLAGS lowering
Chandler Carruth [Tue, 22 May 2018 03:03:11 +0000 (03:03 +0000)]
Merge r330269 to fix egregiously bad codegeneration in the new EFLAGS lowering
that was defferred to a follow-up commit by me not understanding how part of
the x86 backend worked.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@332939 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerge r330264 for the fix to PR37100, a regression introduced with the new
Chandler Carruth [Tue, 22 May 2018 03:01:19 +0000 (03:01 +0000)]
Merge r330264 for the fix to PR37100, a regression introduced with the new
EFLAGS lowering.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@332938 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerge r329771, fixing $regname to be %regname.
Chandler Carruth [Tue, 22 May 2018 02:53:53 +0000 (02:53 +0000)]
Merge r329771, fixing $regname to be %regname.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@332937 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerge r329673, fixing test case to use %regname instead of $regname.
Chandler Carruth [Tue, 22 May 2018 02:50:20 +0000 (02:50 +0000)]
Merge r329673, fixing test case to use %regname instead of $regname.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@332934 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerge r329657.
Chandler Carruth [Tue, 22 May 2018 02:46:36 +0000 (02:46 +0000)]
Merge r329657.

This is the main patch that introduced the new EFLAGS lowering infrastructure.
All the source merges were clean, but the tests required help to merge.
Specifically, I had to regenerate the CHECK lines in the tests (using the trunk
update_llc_test_checks.py script) because trunk has copy propagation that the
branch doesn't. I also had to update the MIR test to use the old MIR syntax for
physical registers (%name instead of $name).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@332933 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerge r328945 which corrected the fundamental structure of the `adox`
Chandler Carruth [Tue, 22 May 2018 02:39:59 +0000 (02:39 +0000)]
Merge r328945 which corrected the fundamental structure of the `adox`
instructions.

This is necessary to fully merge the EFLAGS fix patch series.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@332932 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerge r322521 - just regenerates the CHECK lines using the script. Will allow
Chandler Carruth [Tue, 22 May 2018 02:02:03 +0000 (02:02 +0000)]
Merge r322521 - just regenerates the CHECK lines using the script. Will allow
subsequent cherrypicks to be much cleaner.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@332928 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerge a series of test updates r329055-329057.
Chandler Carruth [Mon, 21 May 2018 21:36:11 +0000 (21:36 +0000)]
Merge a series of test updates r329055-329057.

These required skipping the updates to the update test scripts. Note that to
regenerate these tests you'll need to use the test update script close to trunk
rather than on the branch. =/

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@332902 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r329040 with re-generated CHECK lines via the script.
Chandler Carruth [Mon, 21 May 2018 21:23:38 +0000 (21:23 +0000)]
Merging r329040 with re-generated CHECK lines via the script.

The CHECK lines in the trunk version don't work due to unrelated (unmerged)
changes to the backend.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@332900 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r330037:
Tom Stellard [Fri, 18 May 2018 23:24:43 +0000 (23:24 +0000)]
Merging r330037:

------------------------------------------------------------------------
r330037 | sdardis | 2018-04-13 09:09:07 -0700 (Fri, 13 Apr 2018) | 21 lines

[mips] Materialize constants for multiplication

Previously, the MIPS backend would alwyas break down constant multiplications
into a series of shifts, adds, and subs. This patch changes that so the cost of
doing so is estimated.

The cost is estimated against worst case constant materialization and retrieving
the results from the HI/LO registers.

For cases where the value type of the multiplication is not legal, the cost of
legalization is estimated and is accounted for before performing the
optimization of breaking down the constant

This resolves PR36884.

Thanks to npl for reporting the issue!

Reviewers: abeserminji, smaksimovic

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@332782 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r329268:
Tom Stellard [Fri, 18 May 2018 22:07:56 +0000 (22:07 +0000)]
Merging r329268:

------------------------------------------------------------------------
r329268 | sdardis | 2018-04-05 03:30:17 -0700 (Thu, 05 Apr 2018) | 2 lines

[mips] Regenerate test before posting patch for constant multiplication (NFC)

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@332778 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r324885:
Tom Stellard [Fri, 18 May 2018 21:58:58 +0000 (21:58 +0000)]
Merging r324885:

------------------------------------------------------------------------
r324885 | atanasyan | 2018-02-12 04:21:55 -0800 (Mon, 12 Feb 2018) | 8 lines

[mips] Fix 'l' constraint handling for types smaller than 32 bits

In case of correct using of the 'l' constraint llvm now generates valid
code; otherwise it shows an error message. Initially these triggers an
assertion.

This commit is the same as r324869 with fixed the test's file name.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@332776 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r322266:
Tom Stellard [Fri, 18 May 2018 20:43:04 +0000 (20:43 +0000)]
Merging r322266:

------------------------------------------------------------------------
r322266 | smaksimovic | 2018-01-11 02:07:47 -0800 (Thu, 11 Jan 2018) | 7 lines

[Mips] Handle one byte unsupported relocations

Fail gracefully instead of crashing upon encountering
this type of relocation.

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@332765 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r331990:
Tom Stellard [Thu, 17 May 2018 23:32:54 +0000 (23:32 +0000)]
Merging r331990:

------------------------------------------------------------------------
r331990 | whitequark | 2018-05-10 08:05:47 -0700 (Thu, 10 May 2018) | 15 lines

[PR37339] Fix assertion in FunctionComparator::cmpInlineAsm

Fixes bug https://bugs.llvm.org/show_bug.cgi?id=37339.

InlineAsm is only uniqued if the FunctionTypes are exactly the
same, while cmpTypes() for example considers all pointer types
in the default address space to be the same. For this reason
the end of cmpInlineAsm() can be reached.

This patch replaces the unreachable assertion with a check that
the function types are not identical.

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

Reviewers: jfb
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@332678 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r332342:
Tom Stellard [Thu, 17 May 2018 20:44:32 +0000 (20:44 +0000)]
Merging r332342:

------------------------------------------------------------------------
r332342 | whitequark | 2018-05-15 04:31:07 -0700 (Tue, 15 May 2018) | 23 lines

[MergeFunctions] Fix merging of small weak functions

When two interposable functions are merged, we cannot replace
uses and have to emit calls to a common internal function. However,
writeThunk() will not actually emit a thunk if the function is too
small. This leaves us in a broken state where mergeTwoFunctions
already rewired the functions, but writeThunk doesn't do anything.

This patch changes the implementation so that:

 * writeThunk() does just that.
 * The direct replacement of calls is moved into mergeTwoFunctions()
   into the non-interposable case only.
 * isThunkProfitable() is extracted and will be called for
   the non-iterposable case always, and in the interposable case
   only if uses are still left after replacement.

This issue has been introduced in https://reviews.llvm.org/D34806,
where the code for checking thunk profitability has been moved.

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

Reviewed By: whitequark
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@332662 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r324581:
Tom Stellard [Thu, 17 May 2018 19:34:15 +0000 (19:34 +0000)]
Merging r324581:

------------------------------------------------------------------------
r324581 | sjoerdmeijer | 2018-02-08 00:39:05 -0800 (Thu, 08 Feb 2018) | 12 lines

[AArch64] Don't materialize 0 with "fmov h0, .." when FullFP16 is not supported

We were generating "fmov h0, wzr" instructions when FullFP16 is not enabled.
I've not added any tests, because the problem was visible in:
test/CodeGen/AArch64/arm64-zero-cycle-zeroing.ll,
which I had to change: I don't think Cyclone has FullFP16 enabled
by default, so it shouldn't be using this v8.2a instruction.

I've also removed these rdar tags, please shout if there are any objections.

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@332655 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r323816:
Tom Stellard [Thu, 17 May 2018 19:18:08 +0000 (19:18 +0000)]
Merging r323816:

------------------------------------------------------------------------
r323816 | evandro | 2018-01-30 13:14:11 -0800 (Tue, 30 Jan 2018) | 5 lines

[AArch64] Expand testing of zero cycle zeroing

Make sure that r321824 doesn't change zeroing.

Differential revision: https://reviews.llvm.org/D42089
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@332651 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r332444:
Tom Stellard [Thu, 17 May 2018 18:28:59 +0000 (18:28 +0000)]
Merging r332444:

------------------------------------------------------------------------
r332444 | psmith | 2018-05-16 02:33:25 -0700 (Wed, 16 May 2018) | 20 lines

[AArch64] Support "S" inline assembler constraint

This patch re-introduces the "S" inline assembler constraint. This matches
an absolute symbolic address or a label reference. The primary use case is

asm("adrp %0, %1\n\t"
    "add %0, %0, :lo12:%1" : "=r"(addr) : "S"(&var));

I say re-introduces as it seems like "S" was implemented in the original
AArch64 backend, but it looks like it wasn't carried forward to the merged
backend. The original implementation had A and L modifiers that could be
used to print ":lo12:" to the string. It looks like gcc doesn't use these
and :lo12: is expected to be written in the inline assembly string so I've
not implemented A and L. Clang already supports the S modifier.

Fixes PR37180

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@332644 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r323053:
Tom Stellard [Thu, 17 May 2018 03:11:35 +0000 (03:11 +0000)]
Merging r323053:

------------------------------------------------------------------------
r323053 | dhinton | 2018-01-20 16:29:00 -0800 (Sat, 20 Jan 2018) | 9 lines

[cmake] Don't build Native llvm-config when cross compiling if passed by user.

Summary:
Rename LLVM_CONFIG_EXE to LLVM_CONFIG_PATH, and avoid building it if
passed in by user.  This is the same way CLANG_TABLEGEN and
LLVM_TABLEGEN are handled, e.g., when -DLLVM_OPTIMIZED_TABLEGEN=ON is
passed.

Differential Revision: https://reviews.llvm.org/D41806
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@332568 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r329414:
Tom Stellard [Thu, 17 May 2018 02:15:24 +0000 (02:15 +0000)]
Merging r329414:

------------------------------------------------------------------------
r329414 | ctopper | 2018-04-06 09:16:43 -0700 (Fri, 06 Apr 2018) | 3 lines

[X86] Merge itineraries for CLC, CMC, and STC.

These are very simple flag setting instructions that appear to only be a single uop. They're unlikely to need this separation.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@332565 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r328944:
Tom Stellard [Thu, 17 May 2018 02:15:22 +0000 (02:15 +0000)]
Merging r328944:

------------------------------------------------------------------------
r328944 | chandlerc | 2018-04-01 14:47:55 -0700 (Sun, 01 Apr 2018) | 4 lines

[x86] Expose more of the condition conversion routines in the public API
for X86's instruction information. I've now got a second patch under
review that needs these same APIs. This bit is nicely orthogonal and
obvious, so landing it. NFC.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@332564 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r328408:
Tom Stellard [Wed, 16 May 2018 23:23:02 +0000 (23:23 +0000)]
Merging r328408:

------------------------------------------------------------------------
r328408 | echristo | 2018-03-23 19:56:58 -0700 (Fri, 23 Mar 2018) | 1 line

Add REQUIRES lines for the targets being checked in this test.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@332552 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r332197:
Tom Stellard [Mon, 14 May 2018 17:23:13 +0000 (17:23 +0000)]
Merging r332197:

------------------------------------------------------------------------
r332197 | dim | 2018-05-13 07:32:23 -0700 (Sun, 13 May 2018) | 4 lines

Follow-up to rL332176 by adding a test case for PR37264.

Noticed by Simon Pilgrim.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@332264 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r332176:
Tom Stellard [Mon, 14 May 2018 17:17:14 +0000 (17:17 +0000)]
Merging r332176:

------------------------------------------------------------------------
r332176 | dim | 2018-05-12 12:59:54 -0700 (Sat, 12 May 2018) | 20 lines

Clear converters map after X86 Domain Reassignment to avoid crashes

Summary:
As reported in PR37264, in some cases the X86 Domain Reassignment
`runOnMachineFunction()` is called twice.  Because it only deletes the
`.second` members of its `InstrConverterBaseMap`, and does not clean up
the map itself, this can lead to double frees and crashes.

Use `DeleteContainerSeconds()` instead, so the `Converters` map can
safely be reinitialized and its members re-deleted for each X86 Domain
Reassignment pass.

Reviewers: guyblank, craig.topper

Reviewed By: craig.topper

Subscribers: llvm-commits

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@332263 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r332103:
Tom Stellard [Fri, 11 May 2018 23:55:26 +0000 (23:55 +0000)]
Merging r332103:

------------------------------------------------------------------------
r332103 | gberry | 2018-05-11 09:25:06 -0700 (Fri, 11 May 2018) | 24 lines

[AArch64] Fix performPostLD1Combine to check for constant lane index.

Summary:
performPostLD1Combine in AArch64ISelLowering looks for vector
insert_vector_elt of a loaded value which it can optimize into a single
LD1LANE instruction.  The code checking for the pattern was not checking
if the lane index was a constant which could cause two problems:

- an assert when lowering the LD1LANE ISD node since it assumes an
  constant operand

- an assert in isel if the lane index value depends on the
  post-incremented base register

Both of these issues are avoided by simply checking that the lane index
is a constant.

Fixes bug 35822.

Reviewers: t.p.northover, javed.absar

Subscribers: rengolin, kristof.beyls, mcrosier, llvm-commits

Differential Revision: https://reviews.llvm.org/D46591
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@332158 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r330792:
Tom Stellard [Fri, 11 May 2018 04:54:05 +0000 (04:54 +0000)]
Merging r330792:

------------------------------------------------------------------------
r330792 | gberry | 2018-04-24 19:17:56 -0700 (Tue, 24 Apr 2018) | 14 lines

[DivRemPairs] Fix non-determinism in use list order.

Summary:
Use a MapVector instead of a DenseMap for RemMap since it is iteratated
over and the order of iteration can effect the order that new
instructions are created.  This can in turn effect the use list order of
div/rem input values if multiple new instructions are created that share
any input values.

Reviewers: spatel

Subscribers: mcrosier, llvm-commits

Differential Revision: https://reviews.llvm.org/D45858
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@332080 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoRevert "Merging r328039:"
Tom Stellard [Thu, 10 May 2018 17:55:07 +0000 (17:55 +0000)]
Revert "Merging r328039:"

This reverts commit r332001.

I forgot to run make check before committing and the tests cases with
this patch fail.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@332008 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r328039:
Tom Stellard [Thu, 10 May 2018 17:27:58 +0000 (17:27 +0000)]
Merging r328039:

------------------------------------------------------------------------
r328039 | mstorsjo | 2018-03-20 13:37:51 -0700 (Tue, 20 Mar 2018) | 8 lines

[X86] Don't use the MSVC stack protector names on mingw

Mingw uses the same stack protector functions as GCC provides
on other platforms as well.

Patch by Valentin Churavy!

Differential Revision: https://reviews.llvm.org/D27296
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@332001 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r327540:
Tom Stellard [Tue, 8 May 2018 22:21:28 +0000 (22:21 +0000)]
Merging r327540:

------------------------------------------------------------------------
r327540 | ctopper | 2018-03-14 10:57:19 -0700 (Wed, 14 Mar 2018) | 7 lines

[X86] Add back fast-isel code for handling i8 shifts.

I removed this in r316797 because the coverage report showed no coverage and I thought it should have been handled by the auto generated table. I now see that there is code that bypasses the table if the shift amount is out of bounds.

This adds back the code. We'll codegen out of bounds i8 shifts to effectively (amount & 0x1f). The 0x1f is a strange quirk of x86 that shift amounts are always masked to 5-bits(except 64-bits). So if the masked value is still out bounds the result will be 0.

Fixes PR36731.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@331815 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r330189:
Tom Stellard [Tue, 8 May 2018 20:21:46 +0000 (20:21 +0000)]
Merging r330189:

------------------------------------------------------------------------
r330189 | whitequark | 2018-04-17 07:52:43 -0700 (Tue, 17 Apr 2018) | 7 lines

[LLVM-C] [PR34633] Avoid calling ->dump() methods from LLVMDump*.

LLVMDump* functions are available in Release builds too.

Patch by Brenton Bostick.

Differential Revision: https://reviews.llvm.org/D44600
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@331804 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r326429:
Tom Stellard [Tue, 8 May 2018 03:20:53 +0000 (03:20 +0000)]
Merging r326429:

------------------------------------------------------------------------
r326429 | d0k | 2018-03-01 03:31:44 -0800 (Thu, 01 Mar 2018) | 1 line

[SCCP] Fix unused variable warning in release builds.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@331722 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r330186:
Tom Stellard [Tue, 8 May 2018 02:41:23 +0000 (02:41 +0000)]
Merging r330186:

------------------------------------------------------------------------
r330186 | nemanjai | 2018-04-17 06:07:01 -0700 (Tue, 17 Apr 2018) | 11 lines

[PowerPC] Mark the BDNZ intrinsic as NoDuplicate

Duplicating this intrinsic is not generally valid because it has the side-effect
of decrementing the CTR. Any passes that duplicate it would need to be taught to
keep the regions formed completely disjoint.
This patch should be NFC for typical uses as CTRLoops runs after the remaining
loop passes. It only affects situations where the loop passes are scheduled on
the IR after the codegen passes (as is the case with some JIT pipelines).

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@331716 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r329335, r329355, r329573:
Tom Stellard [Tue, 8 May 2018 02:41:21 +0000 (02:41 +0000)]
Merging r329335, r329355, r329573:

------------------------------------------------------------------------
r329335 | lhames | 2018-04-05 12:37:05 -0700 (Thu, 05 Apr 2018) | 15 lines

[RuntimeDyld][PowerPC] Use global entry points for calls between sections.

Functions in different objects may use different TOCs, so calls between such
functions should use the global entry point of the callee which updates the
TOC pointer.

This should fix a bug that the Numba developers encountered (see
https://github.com/numba/numba/issues/2451).

Patch by Olexa Bilaniuk. Thanks Olexa!

No RuntimeDyld checker test case yet as I am not familiar enough with how
RuntimeDyldELF fixes up call-sites, but I do not want to hold up landing
this. I will continue to work on it and see if I can rope some powerpc
experts in.
------------------------------------------------------------------------

------------------------------------------------------------------------
r329355 | lhames | 2018-04-05 14:56:55 -0700 (Thu, 05 Apr 2018) | 4 lines

[RuntimeDyld][PowerPC] Add a test case for r329335.

Checks that calls to different sections go to the function's global entry point,
rather than the local one.
------------------------------------------------------------------------

------------------------------------------------------------------------
r329573 | krasimir | 2018-04-09 07:29:23 -0700 (Mon, 09 Apr 2018) | 11 lines

[RuntimeDyld][PowerPC] Fix a newly added test in r329355

Summary: The bit widths are wrong.

Reviewers: bkramer, lhames, hans

Reviewed By: hans

Subscribers: hans, nemanjai, kbarton, llvm-commits

Differential Revision: https://reviews.llvm.org/D45361
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@331715 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r328400:
Tom Stellard [Tue, 8 May 2018 02:41:18 +0000 (02:41 +0000)]
Merging r328400:

------------------------------------------------------------------------
r328400 | echristo | 2018-03-23 17:07:38 -0700 (Fri, 23 Mar 2018) | 6 lines

Allow FDE references outside the +/-2GB range supported by PC relative
offsets for code models other than small/medium. For JIT application,
memory layout is less controlled and can result in truncations
otherwise.

Patch based on one by Olexa Bilaniuk!
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@331714 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r329761:
Tom Stellard [Tue, 17 Apr 2018 20:17:43 +0000 (20:17 +0000)]
Merging r329761:

------------------------------------------------------------------------
r329761 | gberry | 2018-04-10 14:43:03 -0700 (Tue, 10 Apr 2018) | 13 lines

[AArch64][Falkor] Fix bug in Falkor HWPF collision avoidance pass.

Summary:
When inserting MOVs to avoid Falkor HWPF collisions, the non-base
register operand of load instructions (e.g. a register offset) was not
being considered live, so it could potentially have been used as a
scratch register, clobbering the actual offset value.

Reviewers: mcrosier

Subscribers: rengolin, javed.absar, kristof.beyls, llvm-commits

Differential Revision: https://reviews.llvm.org/D45502
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@330209 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r322373:
Tom Stellard [Sat, 14 Apr 2018 02:06:40 +0000 (02:06 +0000)]
Merging r322373:

------------------------------------------------------------------------
r322373 | d0k | 2018-01-12 07:03:24 -0800 (Fri, 12 Jan 2018) | 4 lines

[PowerPC] Don't miscompile rotate+mask into an ANDIo if it can't recreate the immediate

I'm not even sure if this transform is ever worth it, but this at least
stops the bleeding.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@330082 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r329852:
Tom Stellard [Fri, 13 Apr 2018 23:26:20 +0000 (23:26 +0000)]
Merging r329852:

------------------------------------------------------------------------
r329852 | nemanjai | 2018-04-11 14:25:44 -0700 (Wed, 11 Apr 2018) | 8 lines

[PowerPC] Fix condition for 64-bit rotate when replacing r+r instr with r+i

This patch fixes https://bugs.llvm.org/show_bug.cgi?id=37039
The condition only covers one of the two 64-bit rotate instructions. This just
adds the second (RLDICLo).

Patch by Josh Stone.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@330076 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r329359 and r329363:
Tom Stellard [Wed, 11 Apr 2018 23:04:06 +0000 (23:04 +0000)]
Merging r329359 and r329363:

------------------------------------------------------------------------
r329359 | manojgupta | 2018-04-05 15:47:25 -0700 (Thu, 05 Apr 2018) | 11 lines

Attempt to fix Mips breakages.

Summary:
Replace ArrayRefs by actual std::array objects so that there are
no dangling references.

Reviewers: rsmith, gkistanova

Subscribers: sdardis, arichardson, llvm-commits

Differential Revision: https://reviews.llvm.org/D45338
------------------------------------------------------------------------

------------------------------------------------------------------------
r329363 | manojgupta | 2018-04-05 16:23:29 -0700 (Thu, 05 Apr 2018) | 5 lines

Fix lld-x86_64-darwin13 build fails.

Use double braces in std::array initialization
to keep Darwin builders happy.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@329859 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r326521:
Tom Stellard [Wed, 11 Apr 2018 22:53:38 +0000 (22:53 +0000)]
Merging r326521:

------------------------------------------------------------------------
r326521 | indutny | 2018-03-01 16:59:27 -0800 (Thu, 01 Mar 2018) | 13 lines

[ArgumentPromotion] don't break musttail invariant PR36543

Summary:
Do not break musttail invariant by promoting arguments of musttail
callee or caller.

Reviewers: sanjoy, dberlin, hfinkel, george.burgess.iv, fhahn, rnk

Reviewed By: rnk

Subscribers: rnk, llvm-commits

Differential Revision: https://reviews.llvm.org/D43926
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@329858 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoAdd missing test file from r329855
Tom Stellard [Wed, 11 Apr 2018 22:47:00 +0000 (22:47 +0000)]
Add missing test file from r329855

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@329857 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r326404:
Tom Stellard [Wed, 11 Apr 2018 22:38:11 +0000 (22:38 +0000)]
Merging r326404:

------------------------------------------------------------------------
r326404 | rnk | 2018-02-28 17:19:18 -0800 (Wed, 28 Feb 2018) | 14 lines

[IPSCCP] do not break musttail invariant (PR36485)

Do not replace results of `musttail` calls with a constant if the
call itself can't be removed.

Do not zap returns of `musttail` callees, if the call site can't be
removed and replaced with a constant.

Do not zap returns of `musttail`-calling blocks, this breaks
invariant too.

Patch by Fedor Indutny

Differential Revision: https://reviews.llvm.org/D43695
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@329855 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r325653 with test fixups:
Simon Dardis [Wed, 11 Apr 2018 12:55:10 +0000 (12:55 +0000)]
Merging r325653 with test fixups:

------------------------------------------------------------------------
r325653 | sdardis | 2018-02-21 00:06:53 +0000 (Wed, 21 Feb 2018) | 31 lines

[mips] Spectre variant two mitigation for MIPSR2

This patch provides mitigation for CVE-2017-5715, Spectre variant two,
which affects the P5600 and P6600. It implements the LLVM part of
-mindirect-jump=hazard. It is _not_ enabled by default for the P5600.

The migitation strategy suggested by MIPS for these processors is to use
hazard barrier instructions. 'jalr.hb' and 'jr.hb' are hazard
barrier variants of the 'jalr' and 'jr' instructions respectively.

These instructions impede the execution of instruction stream until
architecturally defined hazards (changes to the instruction stream,
privileged registers which may affect execution) are cleared. These
instructions in MIPS' designs are not speculated past.

These instructions are used with the attribute +use-indirect-jump-hazard
when branching indirectly and for indirect function calls.

These instructions are defined by the MIPS32R2 ISA, so this mitigation
method is not compatible with processors which implement an earlier
revision of the MIPS ISA.

Performance benchmarking of this option with -fpic and lld using
-z hazardplt shows a difference of overall 10%~ time increase
for the LLVM testsuite. Certain benchmarks such as methcall show a
substantially larger increase in time due to their nature.

Reviewers: atanasyan, zoran.jovanovic

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@329798 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoBackport of rL326666 and rL326668 for PR36607 and PR36608.
Florian Hahn [Wed, 11 Apr 2018 12:01:38 +0000 (12:01 +0000)]
Backport of rL326666 and rL326668 for PR36607 and PR36608.

[CallSiteSplitting] properly split musttail calls.

The original author was Fedor Indutny <fedor@indutny.com>.

`musttail` calls can't be naively splitted. The split blocks must
include not only the call instruction itself, but also (optional)
`bitcast` and `return` instructions that follow it.

Clone `bitcast` and `ret`, place them into the split blocks, and
remove the tail block when done.

Reviewers: junbuml, mcrosier, davidxl, davide, fhahn

Reviewed By: fhahn

Subscribers: JDevlieghere, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@329793 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r328755:
Tom Stellard [Tue, 10 Apr 2018 04:35:05 +0000 (04:35 +0000)]
Merging r328755:

------------------------------------------------------------------------
r328755 | gbiv | 2018-03-28 20:12:03 -0700 (Wed, 28 Mar 2018) | 10 lines

[MemorySSA] Turn an assert into a condition

Eli pointed out that variadic functions are totally a thing, so this
assert is incorrect.

No test-case is provided, since the only way this assert fires is if a
specific DenseMap falls back to doing `isEqual` checks, and that seems
fairly brittle (and requires a pyramid of growing
`call void (i8, ...) @varargs(i8 0)`).

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@329670 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r326769 and r326780:
Tom Stellard [Tue, 10 Apr 2018 04:13:19 +0000 (04:13 +0000)]
Merging r326769 and r326780:

------------------------------------------------------------------------
r326769 | bjope | 2018-03-06 00:47:07 -0800 (Tue, 06 Mar 2018) | 28 lines

[DebugInfo] Discard invalid DBG_VALUE instructions in LiveDebugVariables

Summary:
This is a workaround for pr36417
https://bugs.llvm.org/show_bug.cgi?id=36417

LiveDebugVariables will now verify that the DBG_VALUE instructions
are sane (prior to register allocation) by asking LIS if a virtual
register used in the DBG_VALUE is live (or dead def) in the slot
index before the DBG_VALUE. If it isn't sane the DBG_VALUE is
discarded.

One pass that was identified as introducing non-sane DBG_VALUE
instructtons, when analysing pr36417, was the DAG->DAG Instruction
Selection. It sometimes inserts DBG_VALUE instructions referring to
a virtual register that is defined later in the same basic block.
So it is a use before def kind of problem. The DBG_VALUE is
typically inserted in the beginning of a basic block when this
happens. The problem can be seen in the test case
test/DebugInfo/X86/dbg-value-inlined-parameter.ll

Reviewers: aprantl, rnk, probinson

Reviewed By: aprantl

Subscribers: vsk, davide, alexcrichton, Ka-Ka, eraman, llvm-commits, JDevlieghere

Differential Revision: https://reviews.llvm.org/D43956
------------------------------------------------------------------------

------------------------------------------------------------------------
r326780 | bjope | 2018-03-06 05:23:28 -0800 (Tue, 06 Mar 2018) | 6 lines

Fixup for rL326769 (RegState::Debug is being truncated to a bool)

I obviously messed up arguments to MachineOperand::CreateReg
in rL326769. This should make it work as intended.

Thanks to RKSimon for spotting this.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@329668 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r328748:
Tom Stellard [Tue, 10 Apr 2018 02:39:11 +0000 (02:39 +0000)]
Merging r328748:

------------------------------------------------------------------------
r328748 | gbiv | 2018-03-28 17:54:39 -0700 (Wed, 28 Mar 2018) | 12 lines

[MemorySSA] Consider callsite args for hashing and equality.

We use a `DenseMap<MemoryLocOrCall, MemlocStackInfo>` to keep track of
prior work when optimizing uses in MemorySSA. Because we weren't
accounting for callsite arguments in either the hash code or equality
tests for `MemoryLocOrCall`s, we optimized uses too aggressively in
some rare cases.

Fix by Daniel Berlin.

Should fix PR36883.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@329663 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r329588:
Tom Stellard [Tue, 10 Apr 2018 02:30:41 +0000 (02:30 +0000)]
Merging r329588:

------------------------------------------------------------------------
r329588 | tstellar | 2018-04-09 09:09:13 -0700 (Mon, 09 Apr 2018) | 11 lines

AMDGPU: Initialize GlobalISel passes

Summary:
This fixes AMDGPU GlobalISel test failures when enabling the AMDGPU
target without any other targets that use GlobalISel.

Reviewers: arsenm

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, dstuttard, tpr, llvm-commits, t-tye

Differential Revision: https://reviews.llvm.org/D45353
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@329662 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r327651:
Tom Stellard [Mon, 9 Apr 2018 23:19:44 +0000 (23:19 +0000)]
Merging r327651:

------------------------------------------------------------------------
r327651 | carrot | 2018-03-15 10:49:12 -0700 (Thu, 15 Mar 2018) | 9 lines

[PPC] Avoid non-simple MVT in STBRX optimization

PR35402 triggered this case. It bswap and stores a 48bit value, current STBRX optimization transforms it into STBRX. Unfortunately 48bit is not a simple MVT, there is no PPC instruction to support it, and it can't be automatically expanded by llvm, so caused a crash.

This patch detects the non-simple MVT and returns early.

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@329641 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r326376:
Tom Stellard [Mon, 9 Apr 2018 22:47:00 +0000 (22:47 +0000)]
Merging r326376:

------------------------------------------------------------------------
r326376 | jdevlieghere | 2018-02-28 14:28:44 -0800 (Wed, 28 Feb 2018) | 12 lines

[GlobalOpt] don't change CC of musttail calle(e|r)

When the function has musttail call - its cc is fixed to be equal to the
cc of the musttail callee. In such case (and in the case of the musttail
callee), GlobalOpt should not change the cc to fastcc as it will break
the invariant.

This fixes PR36546

Patch by: Fedor Indutny (indutny)

Differential revision: https://reviews.llvm.org/D43859
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@329634 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r322319:
Tom Stellard [Mon, 9 Apr 2018 20:45:48 +0000 (20:45 +0000)]
Merging r322319:

------------------------------------------------------------------------
r322319 | matze | 2018-01-11 14:30:43 -0800 (Thu, 11 Jan 2018) | 7 lines

PeepholeOptimizer: Fix for vregs without defs

The PeepholeOptimizer would fail for vregs without a definition. If this
was caused by an undef operand abort to keep the code simple (so we
don't need to add logic everywhere to replicate the undef flag).

Differential Revision: https://reviews.llvm.org/D40763
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@329619 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r326535:
Tom Stellard [Mon, 9 Apr 2018 16:38:02 +0000 (16:38 +0000)]
Merging r326535:

------------------------------------------------------------------------
r326535 | jvesely | 2018-03-01 18:50:22 -0800 (Thu, 01 Mar 2018) | 6 lines

AMDGPU/GCN: Promote i16 ctpop

i16 capable ASICs do not support i16 operands for this instruction.
Add tablegen pattern to merge chained i16 additions.

Differential Revision: https://reviews.llvm.org/D43985
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@329589 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r328341:
Tom Stellard [Sat, 7 Apr 2018 05:52:39 +0000 (05:52 +0000)]
Merging r328341:

------------------------------------------------------------------------
r328341 | apazos | 2018-03-23 10:53:27 -0700 (Fri, 23 Mar 2018) | 16 lines

[ARM] Fix "Constant pool entry out of range!" in Thumb1 mode

This patch fixes PR36658, "Constant pool entry out of range!" in Thumb1 mode.

In ARMConstantIslands::optimizeThumb2JumpTables() in Thumb1 mode,
adjustBBOffsetsAfter() is not calculating postOffset correctly by
properly accounting for the padding that is required for the constant pool
that immediately follows the jump table branch  instruction.

Reviewers: t.p.northover, eli.friedman

Reviewed By: t.p.northover

Subscribers: chrib, tstellar, javed.absar, kristof.beyls, llvm-commits

Differential Revision: https://reviews.llvm.org/D44709
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@329487 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r327761:
Tom Stellard [Sat, 7 Apr 2018 05:20:48 +0000 (05:20 +0000)]
Merging r327761:

------------------------------------------------------------------------
r327761 | chandlerc | 2018-03-16 16:51:33 -0700 (Fri, 16 Mar 2018) | 20 lines

[GlobalsAA] Fix a pretty terrible bug that has been in GlobalsAA for
a long time.

The key thing is that we need to create value handles for every function
that we create a `FunctionInfo` object around. Without this, when that
function is deleted we can end up creating a new function that collides
with its address and look up a stale AA result. With that AA result we
can in turn miscompile code in ways that break.

This is seriously one of the most absurd miscompiles I've seen. It only
reproduced for us recently and only when building a very large server
with both ThinLTO and PGO.

A *HUGE* shout out to Wei Mi who tracked all of this down and came up
with this patch. I'm just landing it because I happened to still by at
a computer.

He or I can work on crafting a test case to hit this (now that we know
what to target) but it'll take a while, and we've been chasing this for
a long time and need it fix Right Now.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@329485 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r327135:
Tom Stellard [Sat, 7 Apr 2018 04:27:52 +0000 (04:27 +0000)]
Merging r327135:

------------------------------------------------------------------------
r327135 | hans | 2018-03-09 06:46:44 -0800 (Fri, 09 Mar 2018) | 7 lines

CMake: Make libxml2 show up in --system-libs (PR36660)

lib/WindowsManifest/CMakeLists.txt adds it to LLVM_SYSTEM_LIBS on that
target, but it was never getting picked up in
tools/llvm-config/CMakeLists.txt.

Differential Revision: https://reviews.llvm.org/D44302
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@329482 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r326843:
Tom Stellard [Sat, 7 Apr 2018 03:59:05 +0000 (03:59 +0000)]
Merging r326843:

------------------------------------------------------------------------
r326843 | eugenezelenko | 2018-03-06 15:06:13 -0800 (Tue, 06 Mar 2018) | 6 lines

[Transforms] Add missing header for InstructionCombining.cpp, in order to export LLVMInitializeInstCombine as extern "C". Fixes PR35947.

Patch by Brenton Bostick.

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

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@329480 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoMerging r326840:
Tom Stellard [Sat, 7 Apr 2018 00:58:44 +0000 (00:58 +0000)]
Merging r326840:

------------------------------------------------------------------------
r326840 | ctopper | 2018-03-06 14:45:31 -0800 (Tue, 06 Mar 2018) | 5 lines

[X86] Fix a typo in Host.cpp that causes us to misidentify KNL, Silvermont, Goldmont and probably other CPUs for -march=native

I think most of the Intel Core CPUs and recent AMD CPUs are unaffected. All the CPUs that have a "subtype" should work. The ones that were broken are the ones that are a "type" with no subtypes.

Fixes PR36619.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@329473 91177308-0d34-0410-b5e6-96231b3b80d8

6 years agoBump version to 6.0.1
Tom Stellard [Sat, 7 Apr 2018 00:33:40 +0000 (00:33 +0000)]
Bump version to 6.0.1

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@329469 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoReleaseNotes: move the retpoline bullet higher
Hans Wennborg [Fri, 2 Mar 2018 09:46:38 +0000 (09:46 +0000)]
ReleaseNotes: move the retpoline bullet higher

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@326549 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoAdd some minimal release notes for retpoline support.
Chandler Carruth [Fri, 2 Mar 2018 05:48:38 +0000 (05:48 +0000)]
Add some minimal release notes for retpoline support.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@326539 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r326393:
Hans Wennborg [Thu, 1 Mar 2018 09:05:01 +0000 (09:05 +0000)]
Merging r326393:
------------------------------------------------------------------------
r326393 | ctopper | 2018-03-01 01:08:38 +0100 (Thu, 01 Mar 2018) | 5 lines

[X86] Make sure we don't combine (fneg (fma X, Y, Z)) to a target specific node when there are no FMA instructions.

This would cause a 'cannot select' error at isel when we should have emitted a lib call and an xor.

Fixes PR36553.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@326423 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoReleaseNotes: tidy up
Hans Wennborg [Tue, 27 Feb 2018 11:11:51 +0000 (11:11 +0000)]
ReleaseNotes: tidy up

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@326186 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoSphinx: fix 'Inline emphasis start-string without end-string'
Hans Wennborg [Tue, 27 Feb 2018 10:33:49 +0000 (10:33 +0000)]
Sphinx: fix 'Inline emphasis start-string without end-string'

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@326184 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r325946:
Hans Wennborg [Mon, 26 Feb 2018 10:04:25 +0000 (10:04 +0000)]
Merging r325946:
------------------------------------------------------------------------
r325946 | echristo | 2018-02-23 21:12:24 +0100 (Fri, 23 Feb 2018) | 15 lines

Because of CVE-2018-6574, some compiler options and linker options are restricted to prevent arbitrary code execution.

https://github.com/golang/go/issues/23672

By this change, building a Go code with LLVM Go bindings causes a compilation error as follows.

  go build llvm.org/llvm/bindings/go/llvm: invalid flag in #cgo LDFLAGS: -Wl,-headerpad_max_install_names

llvm-go tool generates cgo LDFLAGS directive from `llvm-config --ldflags` and it contains -Wl,option options. But -Wl,option is banned by default. To avoid this problem, we need to set $CGO_LDFLAGS_ALLOW environment variable to notify a compiler that the flags should be allowed.

  $ export CGO_LDFLAGS_ALLOW='-Wl,(-search_paths_first|-headerpad_max_install_names)'

By default for go 1.10 and go 1.9.5 these options should appear in the accepted set of options, however, if you're running into the error it's useful to have this documented.

Patch by Ryuichi Hayashida
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@326076 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoFix an unused variable warning in non-assert builds
Hans Wennborg [Mon, 26 Feb 2018 09:56:32 +0000 (09:56 +0000)]
Fix an unused variable warning in non-assert builds

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@326075 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[ReleaseNotes] More X86 updates
Craig Topper [Fri, 23 Feb 2018 18:33:04 +0000 (18:33 +0000)]
[ReleaseNotes] More X86 updates

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@325932 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r325894:
Hans Wennborg [Fri, 23 Feb 2018 12:22:51 +0000 (12:22 +0000)]
Merging r325894:
------------------------------------------------------------------------
r325894 | hans | 2018-02-23 13:20:26 +0100 (Fri, 23 Feb 2018) | 1 line

llvm-config: Add advapi32 to --system-libs on Windows (PR36372)
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@325895 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[mips] 6.0 Release notes
Simon Dardis [Fri, 23 Feb 2018 10:19:00 +0000 (10:19 +0000)]
[mips] 6.0 Release notes

Reviewers: atanasyan, arichardson, petarj, smaksimovic, abeserminji

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@325876 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agodocs: remove in-progress warnings
Hans Wennborg [Thu, 22 Feb 2018 14:38:34 +0000 (14:38 +0000)]
docs: remove in-progress warnings

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@325786 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoReleaseNotes: The fast-math-flags changes
Hans Wennborg [Thu, 22 Feb 2018 13:24:27 +0000 (13:24 +0000)]
ReleaseNotes: The fast-math-flags changes

By Sanjay Patel!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@325776 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r325687:
Hans Wennborg [Thu, 22 Feb 2018 12:53:02 +0000 (12:53 +0000)]
Merging r325687:
------------------------------------------------------------------------
r325687 | sbaranga | 2018-02-21 16:20:32 +0100 (Wed, 21 Feb 2018) | 8 lines

[SCEV] Temporarily disable loop versioning for the purpose
of turning SCEVUnknowns of PHIs into AddRecExprs.

This feature is now hidden behind the -scev-version-unknown flag.

Fixes PR36032 and PR35432.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@325773 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r325739:
Hans Wennborg [Thu, 22 Feb 2018 11:29:35 +0000 (11:29 +0000)]
Merging r325739:
------------------------------------------------------------------------
r325739 | nemanjai | 2018-02-22 04:02:41 +0100 (Thu, 22 Feb 2018) | 9 lines

[PowerPC] Do not produce invalid CTR loop with an FRem

An FRem instruction inside a loop should prevent the loop from being converted
into a CTR loop since this is not an operation that is legal on any PPC
subtarget. This will always be a call to a library function which means the
loop will be invalid if this instruction is in the body.

Fixes PR36292.

------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@325767 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[ReleaseNotes] Initial release notes for X86 target.
Craig Topper [Wed, 21 Feb 2018 19:27:01 +0000 (19:27 +0000)]
[ReleaseNotes] Initial release notes for X86 target.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@325709 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r325654:
Hans Wennborg [Wed, 21 Feb 2018 11:11:33 +0000 (11:11 +0000)]
Merging r325654:
------------------------------------------------------------------------
r325654 | ctopper | 2018-02-21 01:15:48 +0100 (Wed, 21 Feb 2018) | 10 lines

[X86] Disable CLWB for Cannon Lake

Cannon Lake does not support CLWB, therefore it
does not include all features listed under SKX anymore.

Instead, enumerate all SKX features with the exception of CLWB.

Patch by Gabor Buella

Differential Revision: https://reviews.llvm.org/D43380
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@325671 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoReleaseNotes: mention NetBSD support for sanitizers
Hans Wennborg [Wed, 21 Feb 2018 10:50:27 +0000 (10:50 +0000)]
ReleaseNotes: mention NetBSD support for sanitizers

By Kamil Rytarowski!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@325670 91177308-0d34-0410-b5e6-96231b3b80d8

7 years ago[AArch64][GlobalISel] Support G_INSERT/G_EXTRACT of types < s32 bits.
Hans Wennborg [Wed, 21 Feb 2018 10:25:22 +0000 (10:25 +0000)]
[AArch64][GlobalISel] Support G_INSERT/G_EXTRACT of types < s32 bits.

These are needed for operations on fp16 types in a later patch.

This also re-instates the test/CodeGen/AArch64/GlobalISel/fp16-copy-gpr.mir
test that was deleted which depended on this patch.

(See PR36345.)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@325669 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r325525:
Hans Wennborg [Tue, 20 Feb 2018 16:22:18 +0000 (16:22 +0000)]
Merging r325525:
------------------------------------------------------------------------
r325525 | steven_wu | 2018-02-19 20:22:28 +0100 (Mon, 19 Feb 2018) | 13 lines

bitcode support change for fast flags compatibility

Summary: The discussion and as per need, each vendor needs a way to keep the old fast flags and the new fast flags in the auto upgrade path of the IR upgrader.  This revision addresses that issue.

Patched by Michael Berg

Reviewers: qcolombet, hans, steven_wu

Reviewed By: qcolombet, steven_wu

Subscribers: dexonsmith, vsk, mehdi_amini, andrewrk, MatzeB, wristow, spatel

Differential Revision: https://reviews.llvm.org/D43253
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@325592 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r325550:
Hans Wennborg [Tue, 20 Feb 2018 16:18:57 +0000 (16:18 +0000)]
Merging r325550:

I couldn't get fp16-copy-gpr.mir to pass after merging so I removed it until
aemerson; the other test I re-generated and it seems to work.

------------------------------------------------------------------------
r325550 | aemerson | 2018-02-20 06:11:57 +0100 (Tue, 20 Feb 2018) | 7 lines

[AArch64][GlobalISel] When copying from a gpr32 to an fpr16 reg, convert to fpr32 first.

This is a follow on commit to r[x] where we fix the other direction of copy.
For this case, after converting the source from gpr32 -> fpr32, we use a
subregister copy, which is essentially what EXTRACT_SUBREG does in SDAG land.

https://reviews.llvm.org/D43444
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@325591 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r325463:
Hans Wennborg [Tue, 20 Feb 2018 15:49:15 +0000 (15:49 +0000)]
Merging r325463:

(I had to re-generate the test and manually update to handle the r323922 MIR physical register sigil.

------------------------------------------------------------------------
r325463 | aemerson | 2018-02-18 18:10:49 +0100 (Sun, 18 Feb 2018) | 8 lines

[AArch64][GlobalISel] Fix an assert fail/miscompile when fp16 types are copied
to gpr register banks.

PR36345.

rdar://36478867

Differential Revision: https://reviews.llvm.org/D43310
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@325586 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r324110:
Hans Wennborg [Tue, 20 Feb 2018 15:34:56 +0000 (15:34 +0000)]
Merging r324110:
------------------------------------------------------------------------
r324110 | aemerson | 2018-02-02 19:03:30 +0100 (Fri, 02 Feb 2018) | 3 lines

[AArch64][GlobalISel] Use getRegClassForTypeOnBank() in selectCopy.

Differential Revision: https://reviews.llvm.org/D42832
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@325584 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r324195:
Hans Wennborg [Mon, 19 Feb 2018 15:24:45 +0000 (15:24 +0000)]
Merging r324195:
------------------------------------------------------------------------
r324195 | mcrosier | 2018-02-04 16:42:24 +0100 (Sun, 04 Feb 2018) | 12 lines

[LV] Use Demanded Bits and ValueTracking for reduction type-shrinking

The type-shrinking logic in reduction detection, although narrow in scope, is
also rather ad-hoc, which has led to bugs (e.g., PR35734). This patch modifies
the approach to rely on the demanded bits and value tracking analyses, if
available. We currently perform type-shrinking separately for reductions and
other instructions in the loop. Long-term, we should probably think about
computing minimal bit widths in a more complete way for the loops we want to
vectorize.

PR35734
Differential Revision: https://reviews.llvm.org/D42309
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@325508 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r324916:
Hans Wennborg [Mon, 19 Feb 2018 15:20:11 +0000 (15:20 +0000)]
Merging r324916:
------------------------------------------------------------------------
r324916 | junbuml | 2018-02-12 18:56:55 +0100 (Mon, 12 Feb 2018) | 7 lines

[LICM] update BlockColors after splitting predecessors

Update BlockColors after splitting predecessors. Do not allow splitting
EHPad for sinking when the BlockColors is not empty, so we can
simply assign predecessor's color to the new block.

Fixes PR36184
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@325507 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r325148:
Hans Wennborg [Mon, 19 Feb 2018 14:16:41 +0000 (14:16 +0000)]
Merging r325148:
------------------------------------------------------------------------
r325148 | ctopper | 2018-02-14 19:08:33 +0100 (Wed, 14 Feb 2018) | 7 lines

[InstCombine] Don't fold select(C, Z, binop(select(C, X, Y), W)) -> select(C, Z, binop(Y, W)) if the binop is rem or div.

The select may have been preventing a division by zero or INT_MIN/-1 so removing it might not be safe.

Fixes PR36362.

Differential Revision: https://reviews.llvm.org/D43276
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@325501 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r325168:
Hans Wennborg [Mon, 19 Feb 2018 13:58:07 +0000 (13:58 +0000)]
Merging r325168:
------------------------------------------------------------------------
r325168 | rksimon | 2018-02-14 21:43:47 +0100 (Wed, 14 Feb 2018) | 1 line

Removed superfluous semicolon to fix -Wpedantic gcc warning. NFCI.
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@325498 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r324353:
Hans Wennborg [Mon, 19 Feb 2018 13:55:23 +0000 (13:55 +0000)]
Merging r324353:
------------------------------------------------------------------------
r324353 | mareko | 2018-02-06 16:17:55 +0100 (Tue, 06 Feb 2018) | 5 lines

AMDGPU: Fix S_BUFFER_LOAD_DWORD_SGPR moveToVALU

Author: Bas Nieuwenhuizen

https://reviews.llvm.org/D42881
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@325497 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r325139:
Hans Wennborg [Fri, 16 Feb 2018 10:11:29 +0000 (10:11 +0000)]
Merging r325139:
------------------------------------------------------------------------
r325139 | rafael | 2018-02-14 17:34:27 +0100 (Wed, 14 Feb 2018) | 12 lines

Store defined macros in MCContext.

So that macros defined in inline assembly blocks are available to the
whole file.

This provides a consistent behavior with other assembly directives,
since equations for example are already preserved between inline
assembly blocks.

PR: 36110

Patch by Roger!
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@325330 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRevert r319778 (and r319911) due to PR36357
Hans Wennborg [Wed, 14 Feb 2018 10:51:00 +0000 (10:51 +0000)]
Revert r319778 (and r319911) due to PR36357

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@325112 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoRevert r320917 for PR36357
Hans Wennborg [Wed, 14 Feb 2018 10:43:24 +0000 (10:43 +0000)]
Revert r320917 for PR36357

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@325111 91177308-0d34-0410-b5e6-96231b3b80d8

7 years agoMerging r324962: (only the first hunk; see PR36375)
Hans Wennborg [Wed, 14 Feb 2018 10:16:43 +0000 (10:16 +0000)]
Merging r324962: (only the first hunk; see PR36375)

------------------------------------------------------------------------
r324962 | kuhar | 2018-02-13 00:37:27 +0100 (Tue, 13 Feb 2018) | 16 lines

[Dominators] Always recalculate postdominators when update yields different roots

Summary:
This patch makes postdominators always recalculate the tree when an update causes to change the tree roots.
As @dmgreen noticed in [[ https://reviews.llvm.org/D41298 | D41298 ]], the previous implementation was not conservative enough and it was possible to end up with a PostDomTree that was different than a freshly computed one.
The patch also compares postdominators with a freshly computed tree at the end of full verification to make sure we don't hit similar issues in the future.

This should (ideally) be also backported to 6.0 before the release, although I don't have any reports of this causing an observable error. It should be safe to do it even if it's late in the release, as the change only makes the current behavior more conservative.

Reviewers: dmgreen, dberlin, davide, brzycki, grosser

Reviewed By: brzycki, grosser

Subscribers: llvm-commits, dmgreen

Differential Revision: https://reviews.llvm.org/D43140
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_60@325108 91177308-0d34-0410-b5e6-96231b3b80d8