Clean up assume intrinsic pattern matching, no need to check that the argument is a value.

Also make it const safe and remove superfluous casting. NFC.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220617 91177308-0d34-0410-b5e6-96231b3b80d8
[SeparateConstOffsetFromGEP] Fixed a bug related to unsigned modulo

The dividend in "signed % unsigned" is treated as unsigned instead of signed,
causing unexpected behavior such as -64 % (uint64_t)24 == 0.

Added a regression test in split-gep.ll

Patched by Hao Liu.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220618 91177308-0d34-0410-b5e6-96231b3b80d8
[OCaml] Expose Llvm_executionengine.ExecutionEngine.create_mcjit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220619 91177308-0d34-0410-b5e6-96231b3b80d8
[OCaml] Unbreak Llvm_executionengine.initialize_native_target.

First, return true on success, as it is the OCaml convention.
Second, also initialize the native assembly printer, which is,
despite the name, required for MCJIT operation.

Since this function did not initialize the assembly printer earlier
and no function to initialize native assembly printer was available
elsewhere, it is safe to break its interface: it means that it
simply could not be used successfully before.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220620 91177308-0d34-0410-b5e6-96231b3b80d8
[OCaml] hexagon can't run MCJIT tests, XFAIL it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220621 91177308-0d34-0410-b5e6-96231b3b80d8
Fix LSR compile time.

This is a simple fix that brings the compilation time from 5min to 5s
on a specific real-world example. It's a large chain of computation in
a crypto routine (always a problem for SCEV). A unit test is not
feasible and there would be no way to check it. The fix is just basic
good practice for dealing with SCEVs, there's no risk of regression.

Patch by Daniel Reynaud!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220622 91177308-0d34-0410-b5e6-96231b3b80d8
LSR: Minor cleanup after Daniel's patch.

Combine the Inserted an Done sets into a Visited set.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220623 91177308-0d34-0410-b5e6-96231b3b80d8
AVX-512: Fixed encoding of VPBROADCASTM and added SKX forms of this instruction


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220638 91177308-0d34-0410-b5e6-96231b3b80d8
[PBQP] Tidy up CostAllocator.h: fix variable case, rename CostPool to ValuePool.

No functional change. This just brings things more in-line with coding
standards, and makes ValuePool's functionality clearer (it's not tied to pooling
costs, and we may want to use it to hold other things in the future).



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220641 91177308-0d34-0410-b5e6-96231b3b80d8
[PBQP] Unique-ptrify some PBQP Metadata structures. No functional change.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220642 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "[PBQP] Unique-ptrify some PBQP Metadata structures. No functional change." (r220642)

It broke the Windows build:

  [1/19] Building CXX object lib\CodeGen\CMakeFiles\LLVMCodeGen.dir\RegAllocPBQP.cpp.obj
  C:\bb-win7\ninja-clang-i686-msc17-R\llvm-project\llvm\include\llvm/CodeGen/RegAllocPBQP.h(132) : error C2248: 'std::unique_ptr<_Ty>::unique_ptr' : cannot access private member declared in class 'std::unique_ptr<_Ty>'

     with
     [
         _Ty=unsigned int []
     ]
     D:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include\memory(1600) : see declaration of 'std::unique_ptr<_Ty>::unique_ptr'
     with
     [
         _Ty=unsigned int []
     ]
     This diagnostic occurred in the compiler generated function 'llvm::PBQP::RegAlloc::NodeMetadata::NodeMetadata(const llvm::PBQP::RegAlloc::NodeMetadata &)'

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220645 91177308-0d34-0410-b5e6-96231b3b80d8
[OCaml] Expose existing documentation in ocamldoc.

Patch by Gabriel Radanne <drupyog@zoho.com>.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220648 91177308-0d34-0410-b5e6-96231b3b80d8
[PBQP] Re-commit r220642 with a workaround for quirky Visual Studio behavior.

Apparently unique_ptr'ifying NodeMetadata exposed an issue in VS where it
occasionally tries to synthesize copy constructors instead of moves. Hopefully
explicitly deleting the copy constructor and defining the move constructor will
fix this.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220649 91177308-0d34-0410-b5e6-96231b3b80d8
Add an option to the LTO code generator to disable vectorization during LTO

We used to always vectorize (slp and loop vectorize) in the LTO pass pipeline.

r220345 changed it so that we used the PassManager's fields 'LoopVectorize' and
'SLPVectorize' out of the desire to be able to disable vectorization using the
cl::opt flags 'vectorize-loops'/'slp-vectorize' which the before mentioned
fields default to.
Unfortunately, this turns off vectorization because those fields
default to false.
This commit adds flags to the LTO library to disable lto vectorization which
reconciles the desire to optionally disable vectorization during LTO and
the desired behavior of defaulting to enabled vectorization.

We really want tools to set PassManager flags directly to enable/disable
vectorization and not go the route via cl::opt flags *in*
PassManagerBuilder.cpp.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220652 91177308-0d34-0410-b5e6-96231b3b80d8
[PBQP] Explicitly define copy/move operations for NodeMetadata to keep VS happy.

Hopefully this fixes the bug that was introduced in r220642, and not-quite-fixed
in r220649.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220653 91177308-0d34-0410-b5e6-96231b3b80d8
[PBQP] Tidying up as per Dave Blaikie's suggesions for r220642.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220655 91177308-0d34-0410-b5e6-96231b3b80d8
Remove some unnecessary casts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220658 91177308-0d34-0410-b5e6-96231b3b80d8
LinkModules.cpp: don't repeat names in comments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220662 91177308-0d34-0410-b5e6-96231b3b80d8
InstCombine: Fix a combine assuming that icmp operands were integers

An icmp may have pointer arguments, it isn't limited to integers or
vectors of integers.

This fixes PR21388.

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