GCC warns about removing const with a c-style cast.

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

Conflicts:

	lib/Support/Unix/Process.inc

Change-Id: I465b9dce3d38c9992347ef6bbbc282a518b9f590
This patch introduces changes to MipsAsmParser register parsing routines. The code now follows more deterministic path and makes the code more efficient and easier to maintain.

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

Conflicts:

	lib/Target/Mips/AsmParser/MipsAsmParser.cpp

Change-Id: Icbd4b5a47ad9e529abd1066c0f6bea3313e51d5b
AVX-512: Added CMP and BLEND instructions.
Lowering for SETCC.

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

Conflicts:

	lib/Target/X86/X86InstrAVX512.td

Change-Id: I6d994239601b97caf49923394954d8d483c0c4e2
Fix signed overflow in when computing encodings for ADR instructions

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

../lib/Target/X86/X86ISelLowering.cpp:9715:7: error: unused variable 'OpVT' [-Werror,-Wunused-variable]
  EVT OpVT = Op0.getValueType();
      ^
../lib/Target/X86/X86ISelLowering.cpp:9763:14: error: unused variable 'NumElems' [-Werror,-Wunused-variable]
    unsigned NumElems = VT.getVectorNumElements();

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188269 91177308-0d34-0410-b5e6-96231b3b80d8
Remove logic that decides whether to vectorize or not depending on O-levels

I have moved this logic into clang and opt.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188281 91177308-0d34-0410-b5e6-96231b3b80d8
Also remove logic in LateVectorize

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188285 91177308-0d34-0410-b5e6-96231b3b80d8
ARMv8: SWP and SWPB are obsoleted on ARMv8.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188288 91177308-0d34-0410-b5e6-96231b3b80d8
dfsan: fix lint warnings

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

Conflicts:

	lib/Transforms/Instrumentation/DataFlowSanitizer.cpp

Change-Id: I67cd132b632cf706d16e2257acf7df4d6ab667ab
For COFF only: dwarf debug info output a label reference as a section relative item only when it's one of dw_from strp, sec_offset, ref_addr or op_call_ref instead of going by size.

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

Conflicts:

	lib/CodeGen/AsmPrinter/DIE.cpp

Change-Id: I98c8d6835e405be0c8049c9503c995a6db5efd7a
Output DW_AT_stmt_list dwarf debug info as DW_FORM_sec_offset instead of DW_FORM_data4 as it is a section offset (fixes the coff/dwarf debug info statement locations)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188297 91177308-0d34-0410-b5e6-96231b3b80d8
Update makeLibCall to return both the call and the chain associated with the libcall instead of just the call. This allows us to specify libcalls that return void.

LowerCallTo returns a pair with the return value of the call as the first
element and the chain associated with the return value as the second element. If
we lower a call that has a void return value, LowerCallTo returns an SDValue
with a NULL SDNode and the chain for the call. Thus makeLibCall by just
returning the first value makes it impossible for you to set up the chain so
that the call is not eliminated as dead code.

I also updated all references to makeLibCall to reflect the new return type.

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

Conflicts:

	lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp

Change-Id: I8d6e6a82e2e4ee3ec968572a3fd6af4f88bcc26e
[lit] Support use of setup.py from other directories.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188309 91177308-0d34-0410-b5e6-96231b3b80d8
[Mips] Support for unaligned load/store microMips instructions

This includes instructions lwl, lwr, swl and swr.

Patch by Zoran Jovnovic

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188312 91177308-0d34-0410-b5e6-96231b3b80d8
[Mips][msa] Added initial MSA support.

* msa SubtargetFeature
* registers
* ld.[bhwd], and st.[bhwd] instructions

Does not correctly prohibit use of both 32-bit FPU registers and MSA together.

Patch by Daniel Sanders

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188313 91177308-0d34-0410-b5e6-96231b3b80d8
Options: Add new option kind that consumes remaining arguments

This adds KIND_REMAINING_ARGS, a class of options that consume
all remaining arguments on the command line.

This will be used to support /link in clang-cl, which is used
to forward all remaining arguments to the linker.

It also allows us to remove the hard-coded handling of "--",
allowing clients (clang and lld) to implement that functionality
themselves with this new option class.

Differential Revision: http://llvm-reviews.chandlerc.com/D1387

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188314 91177308-0d34-0410-b5e6-96231b3b80d8
DAG: Combine (and (setne X, 0), (setne X, -1)) -> (setuge (add X, 1), 2)

A common idiom is to use zero and all-ones as sentinal values and to
check for both in a single conditional ("x != 0 && x != (unsigned)-1").
That generates code, for i32, like:
  testl %edi, %edi
  setne %al
  cmpl  $-1, %edi
  setne %cl
  andb  %al, %cl

With this transform, we generate the simpler:
  incl  %edi
  cmpl  $1, %edi
  seta  %al

Similar improvements for other integer sizes and on other platforms. In
general, combining the two setcc instructions into one is better.

rdar://14689217

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188315 91177308-0d34-0410-b5e6-96231b3b80d8
Options: explicit handling of --

Clients of the option parsing library should handle it explicitly
using a KIND_REMAINING_ARGS option.

Clang and lld have been updated in r188316 and r188318, respectively.

Also fix -Wsign-compare warning in the option parsing test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188323 91177308-0d34-0410-b5e6-96231b3b80d8
[Mips][msa] Value types for MSA support.

Added v8f16 to ValueTypes.h, ValueTypes.cpp, ValueTypes.td,
and CodeGenTarget.cpp

Patch by Daniel Sanders

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188326 91177308-0d34-0410-b5e6-96231b3b80d8
Revert r187191, which broke opt -mem2reg on the testcases included in PR16867.
However, opt -O2 doesn't run mem2reg directly so nobody noticed until r188146
when SROA started sending more things directly down the PromoteMemToReg path.

In order to revert r187191, I also revert dependent revisions r187296, r187322
and r188146. Fixes PR16867. Does not add the testcases from that PR, but both
of them should get added for both mem2reg and sroa when this revert gets
unreverted.

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