]> granicus.if.org Git - llvm/log
llvm
7 years ago[EarlyCSE] add tests for swapped abs/nabs; NFC
Sanjay Patel [Wed, 13 Dec 2017 22:19:40 +0000 (22:19 +0000)]
[EarlyCSE] add tests for swapped abs/nabs; NFC

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

7 years agoSpeculative build fix for llvm-pdbdump on Linux after Michael's #include removals
Hans Wennborg [Wed, 13 Dec 2017 22:12:58 +0000 (22:12 +0000)]
Speculative build fix for llvm-pdbdump on Linux after Michael's #include removals

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

7 years agoSpeculative build fix for lld on Linux after Michael's #include removals
Hans Wennborg [Wed, 13 Dec 2017 22:12:57 +0000 (22:12 +0000)]
Speculative build fix for lld on Linux after Michael's #include removals

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

7 years ago[X86] Add CLWB schedule test
Simon Pilgrim [Wed, 13 Dec 2017 22:09:09 +0000 (22:09 +0000)]
[X86] Add CLWB schedule test

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

7 years ago[WebAssembly] Use bitfield types in wasm YAML representation
Sam Clegg [Wed, 13 Dec 2017 22:02:25 +0000 (22:02 +0000)]
[WebAssembly] Use bitfield types in wasm YAML representation

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

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

7 years agoReverting [JumpThreading] Preservation of DT and LVI across the pass
Brian M. Rzycki [Wed, 13 Dec 2017 22:01:17 +0000 (22:01 +0000)]
Reverting [JumpThreading] Preservation of DT and LVI across the pass

Stage 2 bootstrap failed:
http://lab.llvm.org:8011/builders/clang-x86_64-linux-selfhost-modules-2/builds/14434

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

7 years ago[EarlyCSE] recognize commuted and swapped variants of min/max as equivalent (PR35642)
Sanjay Patel [Wed, 13 Dec 2017 21:58:15 +0000 (21:58 +0000)]
[EarlyCSE] recognize commuted and swapped variants of min/max as equivalent (PR35642)

As shown in:
https://bugs.llvm.org/show_bug.cgi?id=35642
...we can have different forms of min/max, so we should recognize those here in EarlyCSE
similar to how we already handle binops and compares that can commute.

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

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

7 years ago[WebAssembly] Add linking metatdata test coverage for wasm2yaml
Sam Clegg [Wed, 13 Dec 2017 21:53:40 +0000 (21:53 +0000)]
[WebAssembly] Add linking metatdata test coverage for wasm2yaml

Subscribers: jfb, dschuff, jgravelle-google, aheejin, sunfish

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

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

7 years ago[X86] Move ADX schedule tests out of schedule-x86_64.ll
Simon Pilgrim [Wed, 13 Dec 2017 21:49:09 +0000 (21:49 +0000)]
[X86] Move ADX schedule tests out of schedule-x86_64.ll

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

7 years agoRemove redundant includes from lib/Target/X86.
Michael Zolotukhin [Wed, 13 Dec 2017 21:31:19 +0000 (21:31 +0000)]
Remove redundant includes from lib/Target/X86.

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

7 years agoRemove redundant includes from lib/Target/ARM.
Michael Zolotukhin [Wed, 13 Dec 2017 21:31:17 +0000 (21:31 +0000)]
Remove redundant includes from lib/Target/ARM.

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

7 years agoRemove redundant includes from lib/Target/AArch64.
Michael Zolotukhin [Wed, 13 Dec 2017 21:31:16 +0000 (21:31 +0000)]
Remove redundant includes from lib/Target/AArch64.

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

7 years agoRemove redundant includes from lib/Target/*.cpp.
Michael Zolotukhin [Wed, 13 Dec 2017 21:31:14 +0000 (21:31 +0000)]
Remove redundant includes from lib/Target/*.cpp.

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

7 years agoRemove redundant includes from utils/TableGen.
Michael Zolotukhin [Wed, 13 Dec 2017 21:31:13 +0000 (21:31 +0000)]
Remove redundant includes from utils/TableGen.

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

7 years agoRemove redundant includes from tools.
Michael Zolotukhin [Wed, 13 Dec 2017 21:31:10 +0000 (21:31 +0000)]
Remove redundant includes from tools.

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

7 years agoRemove redundant includes from unittests.
Michael Zolotukhin [Wed, 13 Dec 2017 21:31:05 +0000 (21:31 +0000)]
Remove redundant includes from unittests.

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

7 years agoRemove redundant includes from various places.
Michael Zolotukhin [Wed, 13 Dec 2017 21:31:03 +0000 (21:31 +0000)]
Remove redundant includes from various places.

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

7 years agoRemove redundant includes from lib/Transforms.
Michael Zolotukhin [Wed, 13 Dec 2017 21:31:01 +0000 (21:31 +0000)]
Remove redundant includes from lib/Transforms.

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

7 years agoRemove redundant includes from lib/Support.
Michael Zolotukhin [Wed, 13 Dec 2017 21:30:58 +0000 (21:30 +0000)]
Remove redundant includes from lib/Support.

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

7 years agoRemove redundant includes from lib/ProfileData.
Michael Zolotukhin [Wed, 13 Dec 2017 21:30:57 +0000 (21:30 +0000)]
Remove redundant includes from lib/ProfileData.

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

7 years agoRemove redundant includes from lib/Object.
Michael Zolotukhin [Wed, 13 Dec 2017 21:30:55 +0000 (21:30 +0000)]
Remove redundant includes from lib/Object.

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

7 years agoRemove redundant includes from lib/MC.
Michael Zolotukhin [Wed, 13 Dec 2017 21:30:54 +0000 (21:30 +0000)]
Remove redundant includes from lib/MC.

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

7 years agoRemove redundant includes from lib/LTO.
Michael Zolotukhin [Wed, 13 Dec 2017 21:30:53 +0000 (21:30 +0000)]
Remove redundant includes from lib/LTO.

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

7 years agoRemove redundant includes from lib/IR.
Michael Zolotukhin [Wed, 13 Dec 2017 21:30:52 +0000 (21:30 +0000)]
Remove redundant includes from lib/IR.

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

7 years agoRemove redundant includes from lib/ExecutionEngine.
Michael Zolotukhin [Wed, 13 Dec 2017 21:30:50 +0000 (21:30 +0000)]
Remove redundant includes from lib/ExecutionEngine.

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

7 years agoRemove redundant includes from lib/DebugInfo.
Michael Zolotukhin [Wed, 13 Dec 2017 21:30:49 +0000 (21:30 +0000)]
Remove redundant includes from lib/DebugInfo.

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

7 years agoRemove redundant includes from lib/CodeGen.
Michael Zolotukhin [Wed, 13 Dec 2017 21:30:47 +0000 (21:30 +0000)]
Remove redundant includes from lib/CodeGen.

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

7 years agoRemove redundant includes from lib/Bitcode.
Michael Zolotukhin [Wed, 13 Dec 2017 21:30:45 +0000 (21:30 +0000)]
Remove redundant includes from lib/Bitcode.

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

7 years agoRemove redundant includes from lib/Analysis.
Michael Zolotukhin [Wed, 13 Dec 2017 21:30:41 +0000 (21:30 +0000)]
Remove redundant includes from lib/Analysis.

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

7 years ago[cmake] Explicitly set VS 2017 compatibility
Shoaib Meenai [Wed, 13 Dec 2017 21:12:37 +0000 (21:12 +0000)]
[cmake] Explicitly set VS 2017 compatibility

When cross-compiling using clang-cl 5.0 (which is currently the latest
stable release of the compiler), the default MS compatibility level is
set to VS 2013, which is too low to build LLVM. Explicitly set the
compatibility level to VS 2017 to support cross-compiling LLVM for
Windows using clang-cl 5.0. This will be a no-op when using clang-cl 6.0
and above, where the default MS compatibility level is already VS 2017.

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

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

7 years ago[cmake] Determine MSVC host triple correctly when cross-compiling
Shoaib Meenai [Wed, 13 Dec 2017 21:11:14 +0000 (21:11 +0000)]
[cmake] Determine MSVC host triple correctly when cross-compiling

CMAKE_CL_64 will never be set when cross-compiling with clang-cl, since
CMake relies on an actual VS environment in order to determine it.
Instead, use the size of a void pointer to determine the bit width of
the host compiler (and therefore the host triple), which works for both
native and cross compilation.

Note that, with the impending advent of Windows on AArch64, assuming
that a 64-bit host == x86_64 isn't correct either, but that's something
to be addressed in a follow-up.

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

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

7 years agoAMDGPU: Partially fix disassembly of MIMG instructions
Matt Arsenault [Wed, 13 Dec 2017 21:07:51 +0000 (21:07 +0000)]
AMDGPU: Partially fix disassembly of MIMG instructions

Stores failed to decode at all since they didn't have a
DecoderNamespace set. Loads worked, but did not change
the register width displayed to match the numbmer of
enabled channels.

The number of printed registers for vaddr is still wrong,
but I don't think that's encoded in the instruction so
there's not much we can do about that.

Image atomics are still broken. MIMG is the same
encoding for SI/VI, but the image atomic classes
are split up into encoding specific versions unlike
every other MIMG instruction. They have isAsmParserOnly
set on them for some reason. dmask is also special for
these, so we probably should not have it as an explicit
operand as it is now.

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

7 years ago[JumpThreading] Preservation of DT and LVI across the pass
Brian M. Rzycki [Wed, 13 Dec 2017 20:52:26 +0000 (20:52 +0000)]
[JumpThreading] Preservation of DT and LVI across the pass

Summary:
See D37528 for a previous (non-deferred) version of this
patch and its description.

Preserves dominance in a deferred manner using a new class
DeferredDominance. This reduces the performance impact of
updating the DominatorTree at every edge insertion and
deletion. A user may call DDT->flush() within JumpThreading
for an up-to-date DT. This patch currently has one flush()
at the end of runImpl() to ensure DT is preserved across
the pass.

LVI is also preserved to help subsequent passes such as
CorrelatedValuePropagation. LVI is simpler to maintain and
is done immediately (not deferred). The code to perfom the
preversation was minimally altered and was simply marked
as preserved for the PassManager to be informed.

This extends the analysis available to JumpThreading for
future enhancements. One example is loop boundary threading.

Reviewers: dberlin, kuhar, sebpop

Reviewed By: kuhar, sebpop

Subscribers: hiraditya, llvm-commits

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

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

7 years ago[GVNHoist] Fix: PR35222 gvn-hoist incorrectly erases load
Aditya Kumar [Wed, 13 Dec 2017 19:40:07 +0000 (19:40 +0000)]
[GVNHoist] Fix: PR35222 gvn-hoist incorrectly erases load

w.r.t. the paper
"A Practical Improvement to the Partial Redundancy Elimination in SSA Form"
(https://sites.google.com/site/jongsoopark/home/ssapre.pdf)

Proper dominance check was missing here, so having a loopinfo should not be required.
Committing this diff as this fixes the bug, if there are
further concerns, I'll be happy to work on them.

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

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

7 years agoIgnore metainstructions during the shrink wrap analysis
Adrian Prantl [Wed, 13 Dec 2017 19:10:54 +0000 (19:10 +0000)]
Ignore metainstructions during the shrink wrap analysis

Shrink wrapping should ignore DBG_VALUEs referring to frame indices,
since the presence of debug information must not affect code
generation.

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

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

7 years ago[dsymutil][test] Fix failing test when no lipo binary available
Jonas Devlieghere [Wed, 13 Dec 2017 18:35:39 +0000 (18:35 +0000)]
[dsymutil][test] Fix failing test when no lipo binary available

The invocation without -no-output would try to lipo the different debug
objects together. This wouldn't work on platforms that don't provide
that utility.

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

7 years ago[X86] Add JCC/JECXZ/JECXZ/JRCXZ/LOOP schedule tests
Simon Pilgrim [Wed, 13 Dec 2017 18:09:45 +0000 (18:09 +0000)]
[X86] Add JCC/JECXZ/JECXZ/JRCXZ/LOOP schedule tests

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

7 years agoRegenerate test-shrink.ll test results. NFC
Amaury Sechet [Wed, 13 Dec 2017 18:04:57 +0000 (18:04 +0000)]
Regenerate test-shrink.ll test results. NFC

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

7 years ago[dsymutil] Re-enable threading
Jonas Devlieghere [Wed, 13 Dec 2017 18:03:04 +0000 (18:03 +0000)]
[dsymutil] Re-enable threading

Threading was disabled in r317263 because it broke a test in combination
with `-DLLVM_ENABLE_THREADS=OFF`. This was because a ThreadPool warning
was piped to llvm-dwarfdump which was expecting to read an object from
stdin.

This patch re-enables threading and fixes the offending test.
Unfortunately this required more than just moving the ThreadPool out of
the for loop because of the TempFile refactoring that took place in the
meantime.

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

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

7 years ago[X86] Add RET/RETF schedule tests
Simon Pilgrim [Wed, 13 Dec 2017 17:50:40 +0000 (17:50 +0000)]
[X86] Add RET/RETF schedule tests

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

7 years ago[X86] Add POP/PUSH schedule tests
Simon Pilgrim [Wed, 13 Dec 2017 17:42:25 +0000 (17:42 +0000)]
[X86] Add POP/PUSH schedule tests

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

7 years ago[Function] Remove trailing end-of-line whitespace. NFC.
Brian M. Rzycki [Wed, 13 Dec 2017 16:56:18 +0000 (16:56 +0000)]
[Function] Remove trailing end-of-line whitespace. NFC.

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

7 years agoFix link failure on one build bot introduced by r320584.
Nemanja Ivanovic [Wed, 13 Dec 2017 15:28:01 +0000 (15:28 +0000)]
Fix link failure on one build bot introduced by r320584.

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

7 years agoReverted r320229. It broke tests on builder llvm-clang-x86_64-expensive-checks-win.
Galina Kistanova [Wed, 13 Dec 2017 15:26:27 +0000 (15:26 +0000)]
Reverted r320229. It broke tests on builder llvm-clang-x86_64-expensive-checks-win.

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

7 years ago[X86] Add PREFETCH schedule tests
Simon Pilgrim [Wed, 13 Dec 2017 15:12:02 +0000 (15:12 +0000)]
[X86] Add PREFETCH schedule tests

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

7 years ago[X86] Add XCHG schedule tests
Simon Pilgrim [Wed, 13 Dec 2017 15:02:10 +0000 (15:02 +0000)]
[X86] Add XCHG schedule tests

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

7 years ago[X86] Add MOVNTI schedule tests
Simon Pilgrim [Wed, 13 Dec 2017 14:51:06 +0000 (14:51 +0000)]
[X86] Add MOVNTI schedule tests

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

7 years ago[PowerPC] MachineSSA pass to reduce the number of CR-logical operations
Nemanja Ivanovic [Wed, 13 Dec 2017 14:47:35 +0000 (14:47 +0000)]
[PowerPC] MachineSSA pass to reduce the number of CR-logical operations

The initial implementation of an MI SSA pass to reduce cr-logical operations.
Currently, the only operations handled by the pass are binary operations where
both CR-inputs come from the same block and the single use is a conditional
branch (also in the same block).

Committing this off by default to allow for a period of field testing. Will
enable it by default in a follow-up patch soon.

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

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

7 years ago[X86] Add ENTER/LEAVE schedule tests
Simon Pilgrim [Wed, 13 Dec 2017 14:46:33 +0000 (14:46 +0000)]
[X86] Add ENTER/LEAVE schedule tests

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

7 years ago[X86] Add IMUL schedule tests
Simon Pilgrim [Wed, 13 Dec 2017 14:24:04 +0000 (14:24 +0000)]
[X86] Add IMUL schedule tests

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

7 years ago[X86] Add RDMSR/WRMSR, RDPMC + RDTSC/RDTSCP schedule tests
Simon Pilgrim [Wed, 13 Dec 2017 14:22:04 +0000 (14:22 +0000)]
[X86] Add RDMSR/WRMSR, RDPMC + RDTSC/RDTSCP schedule tests

Add missing RDTSCP itinerary

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

7 years ago[X86] Add ARPL/BOUND schedule tests
Simon Pilgrim [Wed, 13 Dec 2017 13:54:45 +0000 (13:54 +0000)]
[X86] Add ARPL/BOUND schedule tests

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

7 years ago[RISCV] Define sfence.vma InstAliases to match the GNU RISC-V tools
Alex Bradbury [Wed, 13 Dec 2017 12:46:55 +0000 (12:46 +0000)]
[RISCV] Define sfence.vma InstAliases to match the GNU RISC-V tools

Unfortunately these aren't defined explicitly in the privileged spec, but the
GNU assembler does accept `sfence.vma` and `sfence.vma rs` as well as the
usual `sfence.vma rs, rt`.

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

7 years ago[FuzzMutate] Only generate loads and stores to the first class sized types
Igor Laevsky [Wed, 13 Dec 2017 11:49:04 +0000 (11:49 +0000)]
[FuzzMutate] Only generate loads and stores to the first class sized types

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

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

7 years ago[FuzzMutate] Avoid zero sized aggregates
Igor Laevsky [Wed, 13 Dec 2017 11:47:35 +0000 (11:47 +0000)]
[FuzzMutate] Avoid zero sized aggregates

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

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

7 years ago[FuzzMutate] Correctly split landingpad blocks
Igor Laevsky [Wed, 13 Dec 2017 11:45:53 +0000 (11:45 +0000)]
[FuzzMutate] Correctly split landingpad blocks

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

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

7 years ago[X86][SSE] MOVMSK only uses the sign bit from each vector element
Simon Pilgrim [Wed, 13 Dec 2017 11:43:14 +0000 (11:43 +0000)]
[X86][SSE] MOVMSK only uses the sign bit from each vector element

Pass the input vector through SimplifyDemandedBits as we only need the sign bit from each vector element of MOVMSK

We'd probably get more hits if SimplifyDemandedBits was better at handling vectors...

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

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

7 years ago[RISCV] Implement floating point assembler pseudo instructions
Alex Bradbury [Wed, 13 Dec 2017 11:37:19 +0000 (11:37 +0000)]
[RISCV] Implement floating point assembler pseudo instructions

Adds the assembler aliases for the floating point instructions
which can be mapped to a single canonical instruction. The missing
pseudo instructions (flw, fld, fsw, fsd) are marked as TODO. Other
things, like for example PCREL_LO, have to be implemented first.

This patch builds upon D40902.

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

Patch by Mario Werner.

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

7 years agoReintroduce r320049, r320014 and r319894.
Igor Laevsky [Wed, 13 Dec 2017 11:21:18 +0000 (11:21 +0000)]
Reintroduce r320049, r320014 and r319894.
OpenGL issues should be fixed by now.

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

7 years ago[DAG] Promote ADDCARRY / SUBCARRY
Roger Ferrer Ibanez [Wed, 13 Dec 2017 10:45:21 +0000 (10:45 +0000)]
[DAG] Promote ADDCARRY / SUBCARRY

Add missing case that was not implemented yet.

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

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

7 years ago[CodeGen] Print jump-table index operands as %jump-table.0 in both MIR and debug...
Francis Visoiu Mistrih [Wed, 13 Dec 2017 10:30:59 +0000 (10:30 +0000)]
[CodeGen] Print jump-table index operands as %jump-table.0 in both MIR and debug output

Work towards the unification of MIR and debug output by printing `%jump-table.0` instead of `<jt#0>`.

Only debug syntax is affected.

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

7 years ago[CodeGen] Print target index operands as target-index(target-specific) + 8 in both...
Francis Visoiu Mistrih [Wed, 13 Dec 2017 10:30:51 +0000 (10:30 +0000)]
[CodeGen] Print target index operands as target-index(target-specific) + 8 in both MIR and debug output

Work towards the unification of MIR and debug output by printing `target-index(target-specific) + 8` instead of `<ti#0+8>` and `target-index(target-specific) + 8` instead of `<ti#0-8>`.

Only debug syntax is affected.

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

7 years ago[CodeGen] Print constant pool index operands as %const.0 + 8 in both MIR and debug...
Francis Visoiu Mistrih [Wed, 13 Dec 2017 10:30:45 +0000 (10:30 +0000)]
[CodeGen] Print constant pool index operands as %const.0 + 8 in both MIR and debug output

Work towards the unification of MIR and debug output by printing
`%const.0 + 8` instead of `<cp#0+8>` and `%const.0 - 8` instead of
`<cp#0-8>`.

Only debug syntax is affected.

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

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

7 years ago[mips] Provide additional DSP bitconvert patterns
Stefan Maksimovic [Wed, 13 Dec 2017 10:13:35 +0000 (10:13 +0000)]
[mips] Provide additional DSP bitconvert patterns

Previously, v2i16 -> f32 bitcast could not be matched.
Add patterns to support matching this and similar types of bitcasts.

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

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

7 years ago[Testing/Support] Make the HasValue matcher composable
Pavel Labath [Wed, 13 Dec 2017 10:00:38 +0000 (10:00 +0000)]
[Testing/Support] Make the HasValue matcher composable

Summary:
This makes it possible to run an arbitrary matcher on the value
contained within the Expected<T> object.

To do this, I've needed to fully spell out the matcher, instead of using
the shorthand MATCHER_P macro.

The slight gotcha here is that standard template deduction will fail if
one tries to match HasValue(47) against an Expected<int &> -- the
workaround is to use HasValue(testing::Eq(47)).

The explanations produced by this matcher have changed a bit, since now
we delegate to the nested matcher to print the value. Since these don't
put quotes around the value, I've changed our PrintTo methods to match.

Reviewers: zturner

Subscribers: llvm-commits

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

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

7 years ago[RISCV][NFC] Update RISCVInstrInfoC.td to match usual instruction naming convention
Alex Bradbury [Wed, 13 Dec 2017 09:57:25 +0000 (09:57 +0000)]
[RISCV][NFC] Update RISCVInstrInfoC.td to match usual instruction naming convention

When an instruction mnemonic contains a '.', we usually name the instruction
with a _ in that place. e.g. fadd.s -> FADD_S.

This patch updates RISCVInstrInfoC.td to do the same, e.g. c.nop -> C_NOP.

Also includes some minor formatting changes in RISCVInstrInfoC.td to better
align it with the formatting conventions in the rest of the backend.

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

7 years ago[RISCV][NFC] Put isSImm6 and simm6 td definition in correct sorted position
Alex Bradbury [Wed, 13 Dec 2017 09:41:21 +0000 (09:41 +0000)]
[RISCV][NFC] Put isSImm6 and simm6 td definition in correct sorted position

We sort these helper functions and td definitions by bit width. simm6 was
previously out-of-order with respect to the others.

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

7 years ago[RISCV] MC layer support for the remaining RVC instructions
Alex Bradbury [Wed, 13 Dec 2017 09:32:55 +0000 (09:32 +0000)]
[RISCV] MC layer support for the remaining RVC instructions

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

Patch by Shiva Chen.

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

7 years ago[X86][BMI]: Adding full coverage of MC encoding for the BMI isa set.<NFC>
Gadi Haber [Wed, 13 Dec 2017 09:13:53 +0000 (09:13 +0000)]
[X86][BMI]: Adding full coverage of MC encoding for the BMI isa set.<NFC>

NFC.
Adding MC regressions tests to cover the BMI1 and BMI2 ISA sets both 32 and 64 bit.
This patch is part of a larger task to cover MC encoding of all X86 ISA Sets.
started in revision: https://reviews.llvm.org/D39952

Reviewers: zvi, craig.topper, m_zuckerman, RKSimon
Differential Revision: https://reviews.llvm.org/D41106

Change-Id: I033ce137b5b82d36e1e601cd5e0534637b43a4a9

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

7 years ago[cmake] Fix host tools build in when LLVM_EXPERIMENTAL_TARGETS_TO_BUILD is set
Alex Bradbury [Wed, 13 Dec 2017 09:02:13 +0000 (09:02 +0000)]
[cmake] Fix host tools build in when LLVM_EXPERIMENTAL_TARGETS_TO_BUILD is set

r320413 triggered cmake configure failures when building with
-DLLVM_OPTIMIZED_TABLEGEN=True and with LLVM_EXPERIMENTAL_TARGETS_TO_BUILD set
(e.g. to RISCV). This is because that patch moved to passing through
LLVM_TARGETS_TO_BUILD, and at that point LLVM_EXPERIMENTAL_TARGETS_TO_BUILD
has been merged in to it. LLVM_EXPERIMENTAL_TARGETS_TO_BUILD must be also be
passed through to avoid errors like below:

-- Constructing LLVMBuild project information
CMake Error at CMakeLists.txt:682 (message):
  The target `RISCV' does not exist.

      It should be one of

  AArch64;AMDGPU;ARM;BPF;Hexagon;Lanai;Mips;MSP430;NVPTX;PowerPC;Sparc;SystemZ;X86;XCore

-- Configuring incomplete, errors occurred!

See the thread
http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20171211/509225.html
for discussion of this fix.

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

7 years agoRevert "[CGP] Enable select in complex addr mode"
Serguei Katkov [Wed, 13 Dec 2017 07:39:35 +0000 (07:39 +0000)]
Revert "[CGP] Enable select in complex addr mode"

Causes: Assertion `ScaledReg == nullptr' failed.

This actually a revert of rL320551.

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

7 years ago[Targets] Don't automatically include the scheduler class enum from *GenInstrInfo...
Craig Topper [Wed, 13 Dec 2017 07:26:17 +0000 (07:26 +0000)]
[Targets] Don't automatically include the scheduler class enum from *GenInstrInfo.inc with GET_INSTRINFO_ENUM. Make targets request is separately.

Most of the targets don't need the scheduler class enum.

I have an X86 scheduler model change that causes some names in the enum to become about 18000 characters long. This is because using instregex in scheduler models causes the scheduler class to get named with every instruction that matches the regex concatenated together. MSVC has a limit of 4096 characters for an identifier name. Rather than trying to come up with way to reduce the name length, I'm just going to sidestep the problem by not including the enum in X86.

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

7 years ago[CGP] Enable select in complex addr mode
Serguei Katkov [Wed, 13 Dec 2017 06:57:59 +0000 (06:57 +0000)]
[CGP] Enable select in complex addr mode

Enable select instruction handling in complex addr modes.

Reviewers: john.brawn, reames, aaboud
Reviewed By: reames
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D40634

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

7 years ago[XRay][compiler-rt] Reduce XRay log spam
Dean Michael Berris [Wed, 13 Dec 2017 06:37:13 +0000 (06:37 +0000)]
[XRay][compiler-rt] Reduce XRay log spam

This change makes XRay print the log file output only when the verbosity
level is higher than 0. It reduces the log spam in the default case when
we want XRay running silently, except when there are actual
fatal/serious errors.

We also update the documentation to show how to get the information
after the change to the default behaviour.

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

7 years ago[NFC] Refactor SafepointIRVerifier
Serguei Katkov [Wed, 13 Dec 2017 05:32:46 +0000 (05:32 +0000)]
[NFC] Refactor SafepointIRVerifier

Now two classes are responsible for verification: one of them can track GC
pointers and know whether a pointer is relocated or not and another based on
that information can verify uses of GC pointers.

Patch Author: Daniil Suchkov
Reviewers: mkazantsev, anna, apilipenko
Reviewed By: mkazantsev
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D40885

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

7 years ago[SLP] Vectorize jumbled memory loads.
Mohammad Shahid [Wed, 13 Dec 2017 03:08:29 +0000 (03:08 +0000)]
[SLP] Vectorize jumbled memory loads.

Summary:
This patch tries to vectorize loads of consecutive memory accesses, accessed
in non-consecutive or jumbled way. An earlier attempt was made with patch D26905
which was reverted back due to some basic issue with representing the 'use mask' of
jumbled accesses.

This patch fixes the mask representation by recording the 'use mask' in the usertree entry.

Change-Id: I9fe7f5045f065d84c126fa307ef6ebe0787296df

Reviewers: mkuper, loladiro, Ayal, zvi, danielcdh

Reviewed By: Ayal

Subscribers: mgrang, dcaballe, hans, mzolotukhin

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

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

7 years ago[CallSiteSplitting] Refactor creating callsites.
Florian Hahn [Wed, 13 Dec 2017 03:05:20 +0000 (03:05 +0000)]
[CallSiteSplitting] Refactor creating callsites.

Summary:
This change makes the call site creation more general if any of the
arguments is predicated on a condition in the call site's predecessors.

If we find a callsite, that potentially can be split, we collect the set
of conditions for the call site's predecessors (currently only 2
predecessors are allowed). To do that, we traverse each predecessor's
predecessors as long as it only has single predecessors and record the
condition, if it is relevant to the call site. For each condition, we
also check if the condition is taken or not. In case it is not taken,
we record the inverse predicate.

We use the recorded conditions to create the new call sites and split
the basic block.

This has 2 benefits: (1) it is slightly easier to see what is going on
(IMO) and (2) we can easily extend it to handle more complex control
flow.

Reviewers: davidxl, junbuml

Reviewed By: junbuml

Subscribers: llvm-commits

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

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

7 years agoRename LiveIntervalAnalysis.h to LiveIntervals.h
Matthias Braun [Wed, 13 Dec 2017 02:51:04 +0000 (02:51 +0000)]
Rename LiveIntervalAnalysis.h to LiveIntervals.h

Headers/Implementation files should be named after the class they
declare/define.

Also eliminated an `#include "llvm/CodeGen/LiveIntervalAnalysis.h"` in
favor of `class LiveIntarvals;`

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

7 years agoRemove unnecessary includes; NFC
Matthias Braun [Wed, 13 Dec 2017 02:51:01 +0000 (02:51 +0000)]
Remove unnecessary includes; NFC

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

7 years ago[hwasan] Inline instrumentation & fixed shadow.
Evgeniy Stepanov [Wed, 13 Dec 2017 01:16:34 +0000 (01:16 +0000)]
[hwasan] Inline instrumentation & fixed shadow.

Summary: This brings CPU overhead on bzip2 down from 5.5x to 2x.

Reviewers: kcc, alekseyshl

Subscribers: kubamracek, hiraditya, llvm-commits

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

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

7 years agoreverting out -r320532 because a warning is breaking the lld build
Michael Trent [Wed, 13 Dec 2017 00:36:13 +0000 (00:36 +0000)]
reverting out -r320532 because a warning is breaking the lld build

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

7 years agoUpdated llvm-objdump to display local relocations in Mach-O binaries
Michael Trent [Tue, 12 Dec 2017 23:53:46 +0000 (23:53 +0000)]
Updated llvm-objdump to display local relocations in Mach-O binaries

Summary:
llvm-objdump's Mach-O parser was updated in r306037 to display external
relocations for MH_KEXT_BUNDLE file types. This change extends the Macho-O
parser to display local relocations for MH_PRELOAD files. When used with
the -macho option relocations will be displayed in a historical format.

rdar://35778019

Reviewers: enderby

Subscribers: llvm-commits

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

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

7 years ago[EarlyCSE] add tests for commuted min/max; NFC
Sanjay Patel [Tue, 12 Dec 2017 22:23:09 +0000 (22:23 +0000)]
[EarlyCSE] add tests for commuted min/max; NFC

See PR35642: https://bugs.llvm.org/show_bug.cgi?id=35642

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

7 years ago[Hexagon] Relax some checks in testcases, NFC
Krzysztof Parzyszek [Tue, 12 Dec 2017 21:44:04 +0000 (21:44 +0000)]
[Hexagon] Relax some checks in testcases, NFC

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

7 years ago[InstCombine] Fix PR35618: Instcombine hangs on single minmax load bitcast.
Alexey Bataev [Tue, 12 Dec 2017 20:28:46 +0000 (20:28 +0000)]
[InstCombine] Fix PR35618: Instcombine hangs on single minmax load bitcast.

Summary:
If we have pattern `store (load(bitcast(select (cmp(V1, V2), &V1,
&V2)))), bitcast)`, but the load is used in other instructions, it leads
to looping in InstCombiner. Patch adds additional check that all users
of the load instructions are stores and then replaces all uses of load
instruction by the new one with new type.

Reviewers: RKSimon, spatel, majnemer

Subscribers: llvm-commits

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

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

7 years ago[Hexagon] Better detection of identity and undef masks in shuffles
Krzysztof Parzyszek [Tue, 12 Dec 2017 20:23:12 +0000 (20:23 +0000)]
[Hexagon] Better detection of identity and undef masks in shuffles

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

7 years ago[Hexagon] Fix wrong order of operands for vmux
Krzysztof Parzyszek [Tue, 12 Dec 2017 19:32:41 +0000 (19:32 +0000)]
[Hexagon] Fix wrong order of operands for vmux

Shuffle generation uses vmux to collapse vectors resulting from two
individual shuffles into one. The indexes of the elements selected
from the first operand were indicated by 0xFF in the constant vector
used in the compare instruction, but the compare (veqb) set the bits
corresponding to the 0x00 elements, thus inverting the selection.

Reverse the order of operands to vmux to get the correct output.

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

7 years agoReassociate: add global reassociation algorithm
Fiona Glaser [Tue, 12 Dec 2017 19:18:02 +0000 (19:18 +0000)]
Reassociate: add global reassociation algorithm

This algorithm (explained more in the source code) takes into account
global redundancies by building a "pair map" to find common subexprs.

The primary motivation of this is to handle situations like

foo = (a * b) * c
bar = (a * d) * c

where we currently don't identify that "a * c" is redundant.

Accordingly, it prioritizes the emission of a * c so that CSE
can remove the redundant calculation later.

Does not change the actual reassociation algorithm -- only the
order in which the reassociated operand chain is reconstructed.

Gives ~1.5% floating point math instruction count reduction on
a large offline suite of graphics shaders.

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

7 years agoRevert "[InstCombine] Fix PR35618: Instcombine hangs on single minmax load bitcast."
Alexey Bataev [Tue, 12 Dec 2017 19:12:34 +0000 (19:12 +0000)]
Revert "[InstCombine] Fix PR35618: Instcombine hangs on single minmax load bitcast."

This reverts commit r320510 - again sanitizers bbots.

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

7 years agoReapply "[X86] Flag BroadWell scheduler model as complete"
Sanjoy Das [Tue, 12 Dec 2017 19:11:31 +0000 (19:11 +0000)]
Reapply "[X86] Flag BroadWell scheduler model as complete"

This reverts commit r320508, in effect re-applying r320308.  Simon has already
reverted the parts that caused the crash that motivated the revert in r320492.

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

7 years agoSplit IndirectBr critical edges before PGO gen/use passes.
Hiroshi Yamauchi [Tue, 12 Dec 2017 19:07:43 +0000 (19:07 +0000)]
Split IndirectBr critical edges before PGO gen/use passes.

Summary:
The PGO gen/use passes currently fail with an assert failure if there's a
critical edge whose source is an IndirectBr instruction and that edge
needs to be instrumented.

To avoid this in certain cases, split IndirectBr critical edges in the PGO
gen/use passes. This works for blocks with single indirectbr predecessors,
but not for those with multiple indirectbr predecessors (splitting an
IndirectBr critical edge isn't always possible.)

Reviewers: davidxl, xur

Reviewed By: davidxl

Subscribers: efriedma, llvm-commits, mehdi_amini

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

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

7 years ago[InstCombine] Fix PR35618: Instcombine hangs on single minmax load bitcast.
Alexey Bataev [Tue, 12 Dec 2017 18:47:00 +0000 (18:47 +0000)]
[InstCombine] Fix PR35618: Instcombine hangs on single minmax load bitcast.

Summary:
If we have pattern `store (load(bitcast(select (cmp(V1, V2), &V1,
&V2)))), bitcast)`, but the load is used in other instructions, it leads
to looping in InstCombiner. Patch adds additional check that all users
of the load instructions are stores and then replaces all uses of load
instruction by the new one with new type.

Reviewers: RKSimon, spatel, majnemer

Subscribers: llvm-commits

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

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

7 years agoRevert "[X86] Flag BroadWell scheduler model as complete"
Sanjoy Das [Tue, 12 Dec 2017 18:40:58 +0000 (18:40 +0000)]
Revert "[X86] Flag BroadWell scheduler model as complete"

This reverts commit r320308.  r320308 crashes LLC, please see the llvm-commits
thread for a reproducer.

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

7 years ago[X86] Add a couple TODOs about missing coverage/features motivated by D40335
Craig Topper [Tue, 12 Dec 2017 18:39:04 +0000 (18:39 +0000)]
[X86] Add a couple TODOs about missing coverage/features motivated by D40335

D40335 was wanting to add FMSUBADD support, but it discovered that there are two pieces of code to make FMADDSUB and only one of those is tested. So I've asked that review to implement the one path until we get tests that test the existing code.

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

7 years ago[X86] Cleanup type conversion of 64-bit load-store pairs.
Nirav Dave [Tue, 12 Dec 2017 18:25:48 +0000 (18:25 +0000)]
[X86] Cleanup type conversion of 64-bit load-store pairs.

Summary:
Simplify and generalize chain handling and search for 64-bit load-store pairs.
Nontemporal test now converts 64-bit integer load-store into f64 which it realizes directly instead of splitting into two i32 pairs.

Reviewers: craig.topper, spatel

Reviewed By: craig.topper

Subscribers: hiraditya, llvm-commits

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

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

7 years agoTest commit.
Alexandre Ganea [Tue, 12 Dec 2017 18:00:43 +0000 (18:00 +0000)]
Test commit.

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

7 years ago[MachineOperand][MIR] Add isRenamable to MachineOperand.
Geoff Berry [Tue, 12 Dec 2017 17:53:59 +0000 (17:53 +0000)]
[MachineOperand][MIR] Add isRenamable to MachineOperand.

Summary:
Add isRenamable() predicate to MachineOperand.  This predicate can be
used by machine passes after register allocation to determine whether it
is safe to rename a given register operand.  Register operands that
aren't marked as renamable may be required to be assigned their current
register to satisfy constraints that are not captured by the machine
IR (e.g. ABI or ISA constraints).

Reviewers: qcolombet, MatzeB, hfinkel

Subscribers: nemanjai, mcrosier, javed.absar, llvm-commits

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

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

7 years agoRevert "[InstCombine] Fix PR35618: Instcombine hangs on single minmax load bitcast."
Alexey Bataev [Tue, 12 Dec 2017 17:35:29 +0000 (17:35 +0000)]
Revert "[InstCombine] Fix PR35618: Instcombine hangs on single minmax load bitcast."

This reverts commit r320499 again to resolve the problem with the
sanitizers bbots.

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

7 years ago[InstCombine] Fix PR35618: Instcombine hangs on single minmax load bitcast.
Alexey Bataev [Tue, 12 Dec 2017 17:19:15 +0000 (17:19 +0000)]
[InstCombine] Fix PR35618: Instcombine hangs on single minmax load bitcast.

Summary:
If we have pattern `store (load(bitcast(select (cmp(V1, V2), &V1,
&V2)))), bitcast)`, but the load is used in other instructions, it leads
to looping in InstCombiner. Patch adds additional check that all users
of the load instructions are stores and then replaces all uses of load
instruction by the new one with new type.

Reviewers: RKSimon, spatel, majnemer

Subscribers: llvm-commits

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

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

7 years agoRevert "[InstCombine] Fix PR35618: Instcombine hangs on single minmax load bitcast."
Alexey Bataev [Tue, 12 Dec 2017 17:08:48 +0000 (17:08 +0000)]
Revert "[InstCombine] Fix PR35618: Instcombine hangs on single minmax load bitcast."

This reverts commit r320496 to solve the problems with sanitizer
buildbots.

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