aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGenCXX/member-pointers-zero-init.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGenCXX/member-pointers-zero-init.cpp')
-rw-r--r--test/CodeGenCXX/member-pointers-zero-init.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/test/CodeGenCXX/member-pointers-zero-init.cpp b/test/CodeGenCXX/member-pointers-zero-init.cpp
index d533600b54..e7b0fdafba 100644
--- a/test/CodeGenCXX/member-pointers-zero-init.cpp
+++ b/test/CodeGenCXX/member-pointers-zero-init.cpp
@@ -17,11 +17,18 @@ int A::* aaa[2][2];
int A::* b = 0;
void f() {
- // RUN: grep "%.* = icmp ne i64 %.*, -1" %t
+ // RUN: grep "%.* = icmp ne i64 %.*, -1" %t | count 2 &&
if (a) { }
+ if (a != 0) { }
+
+ // RUN: grep "%.* = icmp ne i64 -1, %.*" %t | count 1 &&
+ if (0 != a) { }
- // FIXME: This doesn't yet work
-// if (a != 0) { }
+ // RUN: grep "%.* = icmp eq i64 %.*, -1" %t | count 1 &&
+ if (a == 0) { }
+
+ // RUN: grep "%.* = icmp eq i64 -1, %.*" %t | count 1
+ if (0 == a) { }
}