R600: Disable FP exceptions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@215277 91177308-0d34-0410-b5e6-96231b3b80d8
Add DAG combine for shl + add of constants.

Do
 (shl (add x, c1), c2) -> (add (shl x, c2), c1 << c2)

This is already done for multiplies, but since multiplies
by powers of two are turned into shifts, we also need
to handle it here.

This might want checks for isLegalAddImmediate to avoid
transforming an add of a legal immediate with one that isn't.
Allow setcc (sext setcc) [0|1] [eq|ne] -> setcc

The cases where the inner setcc was directly compared
was handled, but not if the setcc type needs to be promoted
when comparing.

Remove redundant R600 handling of a subset of cases the existing
function handles.
Minor cleanup
XXX - Disable SGPR live range pass
R600/SI: Implement shouldScheduleAdjacent
R600/SI: Mark some stuff as readonly
Add note to documentation about machine node chains.

I've been assuming chain operands were always the first operand,
since the documentation says this. I was confused about why they
were missing after instruction selection. Apparently the convention
changes to using the last operand for MachineSDNodes and I've never
noticed before.
XXX - Fix typo and incomplete comment
R600: Add subtarget property for LDS bank size.

Need to find out which GPUs are 16 and which are 32.
XXX - "Implement" shouldClusterLoads
XXX - debug
XXX - Enable misched
XXX - Slightly less dumb implementation of shouldClusterLoads
XXX - Play with shouldClusterLoads
XXX - Disable debug printing in SIInstrInfo
R600/SI: Implement insertNoop
XXX - R600/SI: Partially implement FoldImmediate
R600/SI: Fix offset folding in some cases with shifted pointers.

Ordinarily (shl (add x, c1), c2) -> (add (shl x, c2), c1 << c2)
is only done if the add has one use. If the resulting constant
add can be folded into an addressing mode, force this to happen
for the pointer operand.

This ends up happening a lot because of how LDS objects are allocated.
Since the globals are allocated next to each other, acessing the first
element of the second object is directly indexed by a shifted pointer.
R600/SI: Add load / store machine optimizer pass.

Currently this only functions to match simple cases
where ds_read2_* / ds_write2_* instructions can be used.

In the future it might match some of the other weird
load patterns, such as direct to LDS loads.