[foldMemoryOperand()] Pass LiveIntervals to enable liveness check.

SystemZ (and probably other targets as well) can fold a memory operand
by changing the opcode into a new instruction that as a side-effect
also clobbers the CC-reg.

In order to do this, liveness of that reg must first be checked. When
LIS is passed, getRegUnit() can be called on it and the right
LiveRange is computed on demand.

Reviewed by Matthias Braun.
http://reviews.llvm.org/D19861

llvm-svn: 269026
diff --git a/llvm/test/CodeGen/SystemZ/int-add-12.ll b/llvm/test/CodeGen/SystemZ/int-add-12.ll
index 96273a6..496650f4 100644
--- a/llvm/test/CodeGen/SystemZ/int-add-12.ll
+++ b/llvm/test/CodeGen/SystemZ/int-add-12.ll
@@ -130,7 +130,7 @@
 ; Check that adding 127 to a spilled value can use AGSI.
 define void @f11(i64 *%ptr, i32 %sel) {
 ; CHECK-LABEL: f11:
-; _CHECK: agsi {{[0-9]+}}(%r15), 127
+; CHECK: agsi {{[0-9]+}}(%r15), 127
 ; CHECK: br %r14
 entry:
   %val0 = load volatile i64 , i64 *%ptr