From 6ad01742d5665402eb181457b92278e85ebb3c5b Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Sat, 3 Oct 2009 14:39:13 +0000 Subject: [PATCH] Rewrite member function pointer test not to rely on -O2. llvm-svn: 83262 --- .../CodeGenCXX/member-function-pointers.cpp | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/clang/test/CodeGenCXX/member-function-pointers.cpp b/clang/test/CodeGenCXX/member-function-pointers.cpp index 9f322a75ec6c..bf24aea9fc49 100644 --- a/clang/test/CodeGenCXX/member-function-pointers.cpp +++ b/clang/test/CodeGenCXX/member-function-pointers.cpp @@ -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 (A::*volatile vpa)(); 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; }