R600/SI: Add verifier check for immediates in register operands.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212214 91177308-0d34-0410-b5e6-96231b3b80d8
R600/SI: Adjsut SGPR live ranges before register allocation

SGPRs are written by instructions that sometimes will ignore control flow,
which means if you have code like:

if (VGPR0) {
  SGPR0 = S_MOV_B32 0
} else {
  SGPR0 = S_MOV_B32 1
}

The value of SGPR0 will 1 no matter what the condition is.

In order to deal with this situation correctly, we need to view the
program as if it were a single basic block when we calculate the
live ranges for the SGPRs.  They way we actually update the live
range is by iterating over all of the segments in each LiveRange
object and setting the end of each segment equal to the start of
the next segment.  So a live range like:

[3888r,9312r:0)[10032B,10384B:0)  0@3888r

will become:

[3888r,10032B:0)[10032B,10384B:0)  0@3888r

This change will allow us to use SALU instructions within branches.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212215 91177308-0d34-0410-b5e6-96231b3b80d8
R600: Promote i64 loads to v2i32

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212216 91177308-0d34-0410-b5e6-96231b3b80d8
R600/SI: Use a ComplexPattern for ADDR64 addressing of MUBUF loads

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212217 91177308-0d34-0410-b5e6-96231b3b80d8
R600: Add a comment that llvm.AMDGPU.trunc is a legacy intrinsic

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212218 91177308-0d34-0410-b5e6-96231b3b80d8
[X86] AVX512: Add writemask variants for vperm*2*

This includes assembler and codegen support (see the new tests in
avx512-encodings.s and avx512-shuffle.ll).

<rdar://problem/17492620>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212221 91177308-0d34-0410-b5e6-96231b3b80d8
[X86] AVX512: Generate Pat<>'s for the vpermt2* intrinsics via multiclass

This new multiclass, avx512_perm_table_3src derives from the current one and
provides the Pat<>.  The next patch will add another Pat<> that uses the
writemask.

Note that I dropped the type annotation from the intrinsic call, i.e.: (v16f32
VR512:$src1) -> R512:$src1.  I think that this should be fine (at least many
intrinsic calls don't provide them) and it greatly reduces the number of
template arguments.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212222 91177308-0d34-0410-b5e6-96231b3b80d8
[X86] AVX512: Allow writemask argument in vpermt* intrinsics

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212223 91177308-0d34-0410-b5e6-96231b3b80d8
Move the data layout and selection dag info from the mips target machine
down to the subtarget.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212224 91177308-0d34-0410-b5e6-96231b3b80d8
Revert "DebugInfo: Ensure that all debug location scope chains from instructions within a function, lead to the function itself."

This reverts commit r212205.

Reverting this again, still seeing crashes when building compiler-rt...
Sorry for the continued noise, not sure why I'm failing to reproduce
this locally.

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