From 6e1c0123855f6eacda37bd2c1bd9b29c8c99c1cb Mon Sep 17 00:00:00 2001 From: John McCall Date: Sun, 29 Jan 2012 02:35:02 +0000 Subject: Get a little bit smarter about killing off the ReturnValue alloca in the presence of straight-line cleanups. This is a simple but important case, particularly for ARC. llvm-svn: 149190 --- clang/test/CodeGenCXX/arm.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'clang/test/CodeGenCXX/arm.cpp') diff --git a/clang/test/CodeGenCXX/arm.cpp b/clang/test/CodeGenCXX/arm.cpp index a767f425553..0a4754b815a 100644 --- a/clang/test/CodeGenCXX/arm.cpp +++ b/clang/test/CodeGenCXX/arm.cpp @@ -45,24 +45,18 @@ namespace test1 { } // CHECK: define linkonce_odr [[A]]* @_ZN5test11AC1Ei([[A]]* %this, i32 %i) unnamed_addr - // CHECK: [[RET:%.*]] = alloca [[A]]*, align 4 // CHECK: [[THIS:%.*]] = alloca [[A]]*, align 4 // CHECK: store [[A]]* {{.*}}, [[A]]** [[THIS]] // CHECK: [[THIS1:%.*]] = load [[A]]** [[THIS]] - // CHECK: store [[A]]* [[THIS1]], [[A]]** [[RET]] // CHECK: call [[A]]* @_ZN5test11AC2Ei( - // CHECK: [[THIS2:%.*]] = load [[A]]** [[RET]] - // CHECK: ret [[A]]* [[THIS2]] + // CHECK: ret [[A]]* [[THIS1]] // CHECK: define linkonce_odr [[A]]* @_ZN5test11AD1Ev([[A]]* %this) unnamed_addr - // CHECK: [[RET:%.*]] = alloca [[A]]*, align 4 // CHECK: [[THIS:%.*]] = alloca [[A]]*, align 4 // CHECK: store [[A]]* {{.*}}, [[A]]** [[THIS]] // CHECK: [[THIS1:%.*]] = load [[A]]** [[THIS]] - // CHECK: store [[A]]* [[THIS1]], [[A]]** [[RET]] // CHECK: call [[A]]* @_ZN5test11AD2Ev( - // CHECK: [[THIS2:%.*]] = load [[A]]** [[RET]] - // CHECK: ret [[A]]* [[THIS2]] + // CHECK: ret [[A]]* [[THIS1]] } // Awkward virtual cases. -- cgit v1.2.3