diff --git a/test/CodeGen/address-space-field2.c b/test/CodeGen/address-space-field2.c index 8b09d57b38..5576e55b63 100644 --- a/test/CodeGen/address-space-field2.c +++ b/test/CodeGen/address-space-field2.c @@ -1,6 +1,34 @@ -// RUN: clang-cc -emit-llvm < %s -o %t && -// RUN: grep addrspace\(1\) %t | count 8 && -// RUN: grep addrspace\(2\) %t | count 9 +// RUN: clang-cc -emit-llvm %s -o - | FileCheck %s +// CHECK: addrspace(1) +// CHECK: addrspace(2) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(2) +// CHECK: addrspace(2) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(2) +// CHECK: addrspace(2) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(2) +// CHECK: addrspace(2) +// CHECK: addrspace(2) +// CHECK: addrspace(2) +// CHECK: addrspace(2) +// CHECK: addrspace(2) +// CHECK: addrspace(2) +// CHECK: addrspace(2) +// CHECK: addrspace(2) +// CHECK: addrspace(2) +// CHECK: addrspace(2) // Check that we don't lose the address space when accessing an array element // inside a structure. diff --git a/test/CodeGen/address-space-field3.c b/test/CodeGen/address-space-field3.c index f0b9dba982..567757fe66 100644 --- a/test/CodeGen/address-space-field3.c +++ b/test/CodeGen/address-space-field3.c @@ -1,6 +1,32 @@ -// RUN: clang-cc -emit-llvm < %s -o %t && -// RUN: grep addrspace\(1\) %t | count 8 && -// RUN: grep addrspace\(2\) %t | count 8 +// RUN: clang-cc -emit-llvm %s -o - | FileCheck %s +// CHECK: addrspace(1) +// CHECK: addrspace(2) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(2) +// CHECK: addrspace(2) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(2) +// CHECK: addrspace(2) +// CHECK: addrspace(2) +// CHECK: addrspace(2) +// CHECK: addrspace(2) +// CHECK: addrspace(2) +// CHECK: addrspace(2) +// CHECK: addrspace(2) +// CHECK: addrspace(2) +// CHECK: addrspace(2) +// CHECK: addrspace(2) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) // Check that we don't lose the address space when accessing an array element // inside a structure. diff --git a/test/CodeGen/address-space-field4.c b/test/CodeGen/address-space-field4.c index 2c74353c3a..31df018206 100644 --- a/test/CodeGen/address-space-field4.c +++ b/test/CodeGen/address-space-field4.c @@ -1,6 +1,44 @@ -// RUN: clang-cc -emit-llvm < %s -o %t && -// RUN: grep addrspace\(2\) %t | count 4 && -// RUN: grep addrspace\(3\) %t | count 4 +// RUN: clang-cc -emit-llvm %s -o - | FileCheck %s +// CHECK: addrspace(2) +// CHECK: addrspace(3) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(3) +// CHECK: addrspace(3) +// CHECK: addrspace(1) +// CHECK: addrspace(3) +// CHECK: addrspace(3) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(1) +// CHECK: addrspace(2) +// CHECK: addrspace(1) +// CHECK: addrspace(2) +// CHECK: addrspace(2) +// CHECK: addrspace(2) // Check the load and store are using the correct address space to access // the variables. diff --git a/test/CodeGen/cast-to-union.c b/test/CodeGen/cast-to-union.c index 9c61a840ec..6742992949 100644 --- a/test/CodeGen/cast-to-union.c +++ b/test/CodeGen/cast-to-union.c @@ -1,7 +1,7 @@ -// RUN: clang-cc -emit-llvm < %s -o %t && -// RUN: grep "store i32 351, i32*" %t && -// RUN: grep "w = global %0 { i32 2, \[4 x i8\] zeroinitializer }" %t && -// RUN: grep "y = global %union.u { double 7.300000e+01 }" %t +// RUN: clang-cc -emit-llvm %s -o - | FileCheck %s +// CHECK: w = global %0 { i32 2, [4 x i8] zeroinitializer } +// CHECK: y = global %union.u { double 7.300000e+0{{[0]*}}1 } +// CHECK: store i32 351, i32 union u { int i; double d; };