[cfe-commits] r83262 - /cfe/trunk/test/CodeGenCXX/member-function-pointers.cpp
Anders Carlsson
andersca at mac.com
Sat Oct 3 07:39:13 PDT 2009
Author: andersca
Date: Sat Oct 3 09:39:13 2009
New Revision: 83262
URL: http://llvm.org/viewvc/llvm-project?rev=83262&view=rev
Log:
Rewrite member function pointer test not to rely on -O2.
Modified:
cfe/trunk/test/CodeGenCXX/member-function-pointers.cpp
Modified: cfe/trunk/test/CodeGenCXX/member-function-pointers.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/member-function-pointers.cpp?rev=83262&r1=83261&r2=83262&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/member-function-pointers.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/member-function-pointers.cpp Sat Oct 3 09:39:13 2009
@@ -1,4 +1,4 @@
-// RUN: clang-cc %s -emit-llvm -o - -triple=x86_64-apple-darwin9 -O2 | FileCheck %s
+// RUN: clang-cc %s -emit-llvm -o - -triple=x86_64-apple-darwin9 | FileCheck %s
struct A { int a; };
struct B { int b; };
@@ -9,17 +9,17 @@
void (B::*pb)();
void (C::*pc)();
-
void f() {
- // CHECK: store i64 0, i64* getelementptr inbounds (%0* @pa, i64 0, i32 0)
- // CHECK: store i64 0, i64* getelementptr inbounds (%0* @pa, i64 0, i32 1)
+ // CHECK: store i64 0, i64* getelementptr inbounds (%0* @pa, i32 0, i32 0)
+ // CHECK: store i64 0, i64* getelementptr inbounds (%0* @pa, i32 0, i32 1)
pa = 0;
-
- // CHECK: volatile store i64 0, i64* getelementptr inbounds (%0* @vpa, i64 0, i32 0)
- // CHECK: volatile store i64 0, i64* getelementptr inbounds (%0* @vpa, i64 0, i32 1)
+
+ // CHECK: volatile store i64 0, i64* getelementptr inbounds (%0* @vpa, i32 0, i32 0)
+ // CHECK: volatile store i64 0, i64* getelementptr inbounds (%0* @vpa, i32 0, i32 1)
vpa = 0;
-
- // CHECK: store i64 0, i64* getelementptr inbounds (%0* @pc, i64 0, i32 0)
- // CHECK: store i64 4, i64* getelementptr inbounds (%0* @pc, i64 0, i32 1)
- pc = pa;
+
+ // CHECK: store i64 %0, i64* getelementptr inbounds (%0* @pc, i32 0, i32 0)
+ // CHECK: [[ADJ:%[a-zA-Z0-9]+]] = add i64 %1, 4
+ // CHECK: store i64 [[ADJ]], i64* getelementptr inbounds (%0* @pc, i32 0, i32 1)
+ pc = pa;
}
More information about the cfe-commits
mailing list