summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2014-06-18 21:48:44 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2014-06-18 21:48:44 +0000
commit11415c61204074c24a7e582dc077e25544526976 (patch)
tree1d03b1654929060379933851d0733ba939bb43f6
parentb55c68f171e1fdb1ed5ce309a30a7eaab351a641 (diff)
downloadbcm5719-llvm-11415c61204074c24a7e582dc077e25544526976.tar.gz
bcm5719-llvm-11415c61204074c24a7e582dc077e25544526976.zip
tests: relax ms-intrinsics test
Relax the tests to allow for differences between release and debug builds. This should fix the buildbots. Thanks to Benjamin Kramer and Eric Christo for their invaluable tip that this was release build specific issue. llvm-svn: 211227
-rw-r--r--clang/test/CodeGen/ms-intrinsics.c31
1 files changed, 14 insertions, 17 deletions
diff --git a/clang/test/CodeGen/ms-intrinsics.c b/clang/test/CodeGen/ms-intrinsics.c
index e37a4812a54..fb0f62c61c4 100644
--- a/clang/test/CodeGen/ms-intrinsics.c
+++ b/clang/test/CodeGen/ms-intrinsics.c
@@ -6,12 +6,11 @@ void *test_InterlockedExchangePointer(void * volatile *Target, void *Value) {
}
// CHECK: define{{.*}}i8* @test_InterlockedExchangePointer(i8** %Target, i8* %Value){{.*}}{
-// CHECK: entry:
-// CHECK: %0 = bitcast i8** %Target to i32*
-// CHECK: %1 = ptrtoint i8* %Value to i32
-// CHECK: %2 = atomicrmw xchg i32* %0, i32 %1 seq_cst
-// CHECK: %3 = inttoptr i32 %2 to i8*
-// CHECK: ret i8* %3
+// CHECK: %[[TARGET:[0-9]+]] = bitcast i8** %Target to i32*
+// CHECK: %[[VALUE:[0-9]+]] = ptrtoint i8* %Value to i32
+// CHECK: %[[EXCHANGE:[0-9]+]] = atomicrmw xchg i32* %[[TARGET]], i32 %[[VALUE]] seq_cst
+// CHECK: %[[RESULT:[0-9]+]] = inttoptr i32 %[[EXCHANGE]] to i8*
+// CHECK: ret i8* %[[RESULT]]
// CHECK: }
void *test_InterlockedCompareExchangePointer(void * volatile *Destination,
@@ -20,14 +19,13 @@ void *test_InterlockedCompareExchangePointer(void * volatile *Destination,
}
// CHECK: define{{.*}}i8* @test_InterlockedCompareExchangePointer(i8** %Destination, i8* %Exchange, i8* %Comparand){{.*}}{
-// CHECK: entry:
-// CHECK: %0 = bitcast i8** %Destination to i32*
-// CHECK: %1 = ptrtoint i8* %Exchange to i32
-// CHECK: %2 = ptrtoint i8* %Comparand to i32
-// CHECK: %3 = cmpxchg volatile i32* %0, i32 %2, i32 %1 seq_cst seq_cst
-// CHECK: %4 = extractvalue { i32, i1 } %3, 0
-// CHECK: %5 = inttoptr i32 %4 to i8*
-// CHECK: ret i8* %5
+// CHECK: %[[DEST:[0-9]+]] = bitcast i8** %Destination to i32*
+// CHECK: %[[EXCHANGE:[0-9]+]] = ptrtoint i8* %Exchange to i32
+// CHECK: %[[COMPARAND:[0-9]+]] = ptrtoint i8* %Comparand to i32
+// CHECK: %[[XCHG:[0-9]+]] = cmpxchg volatile i32* %[[DEST:[0-9]+]], i32 %[[COMPARAND:[0-9]+]], i32 %[[EXCHANGE:[0-9]+]] seq_cst seq_cst
+// CHECK: %[[EXTRACT:[0-9]+]] = extractvalue { i32, i1 } %[[XCHG]], 0
+// CHECK: %[[RESULT:[0-9]+]] = inttoptr i32 %[[EXTRACT]] to i8*
+// CHECK: ret i8* %[[RESULT:[0-9]+]]
// CHECK: }
long test_InterlockedExchange(long *Target, long Value) {
@@ -35,7 +33,6 @@ long test_InterlockedExchange(long *Target, long Value) {
}
// CHECK: define{{.*}}i32 @test_InterlockedExchange(i32* %Target, i32 %Value){{.*}}{
-// CHECK: entry:
-// CHECK: %0 = atomicrmw xchg i32* %Target, i32 %Value seq_cst
-// CHECK: ret i32 %0
+// CHECK: %[[EXCHANGE:[0-9]+]] = atomicrmw xchg i32* %Target, i32 %Value seq_cst
+// CHECK: ret i32 %[[EXCHANGE:[0-9]+]]
// CHECK: }
OpenPOWER on IntegriCloud