// RUN: clang -emit-llvm-bc -o - %s | opt -std-compile-opts | llvm-dis | grep "ret i32 1" | count 3
// <rdr://6115726>

int f0() {
  int x;
  unsigned short n = 1;
  int *a = &x;
  int *b = &x;
  a = a - n;
  b -= n;
  return a == b;
}

int f1(int *a) {
  int b = a - (int*) 1;
  a -= (int*) 1;
  return b == (int) a;
}

int f2(int n) {
  int *b = n + (int*) 1;
  n += (int*) 1;
  return b == (int*) n;
}


// RUN: clang -emit-llvm-bc -o - %s | opt -std-compile-opts | llvm-dis | grep "ret i32 1" | count 3
// <rdr://6115726>

int f0() {
  int x;
  unsigned short n = 1;
  int *a = &x;
  int *b = &x;
  a = a - n;
  b -= n;
  return a == b;
}

int f1(int *a) {
  long b = a - (int*) 1;
  a -= (int*) 1;
  return b == (long) a;
}

int f2(long n) {
  int *b = n + (int*) 1;
  n += (int*) 1;
  return b == (int*) n;
}


Fix testcase for 64-bit systems.
Fix testcase for 64-bit systems.

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@59099 91177308-0d34-0410-b5e6-96231b3b80d8
