r234700 - Revert r234581, it might have caused a few miscompiles in Chromium.
Nico Weber
nicolasweber at gmx.de
Sat Apr 11 16:51:39 PDT 2015
Author: nico
Date: Sat Apr 11 18:51:38 2015
New Revision: 234700
URL: http://llvm.org/viewvc/llvm-project?rev=234700&view=rev
Log:
Revert r234581, it might have caused a few miscompiles in Chromium.
If the revert helps, I'll get a repro this Monday. Else I'll put the change
back in.
Removed:
cfe/trunk/test/CodeGen/cleanup-destslot-simple.c
cfe/trunk/test/CodeGen/lifetime-debuginfo-1.c
cfe/trunk/test/CodeGen/lifetime-debuginfo-2.c
Modified:
cfe/trunk/lib/CodeGen/CGCall.cpp
cfe/trunk/lib/CodeGen/CGCleanup.cpp
cfe/trunk/lib/CodeGen/CGCleanup.h
cfe/trunk/lib/CodeGen/CGDecl.cpp
cfe/trunk/lib/CodeGen/CodeGenFunction.cpp
cfe/trunk/lib/CodeGen/CodeGenFunction.h
cfe/trunk/lib/CodeGen/EHScopeStack.h
cfe/trunk/test/CodeGenCXX/destructors.cpp
cfe/trunk/test/CodeGenCXX/nrvo.cpp
cfe/trunk/test/CodeGenObjC/arc-blocks.m
cfe/trunk/test/CodeGenObjC/arc-bridged-cast.m
cfe/trunk/test/CodeGenObjC/arc-literals.m
cfe/trunk/test/CodeGenObjC/arc-precise-lifetime.m
cfe/trunk/test/CodeGenObjC/arc-ternary-op.m
cfe/trunk/test/CodeGenObjC/arc.m
cfe/trunk/test/CodeGenObjC/exceptions.m
cfe/trunk/test/CodeGenObjCXX/arc-move.mm
cfe/trunk/test/CodeGenObjCXX/arc-references.mm
cfe/trunk/test/CodeGenObjCXX/arc.mm
cfe/trunk/test/CodeGenObjCXX/literals.mm
Modified: cfe/trunk/lib/CodeGen/CGCall.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCall.cpp?rev=234700&r1=234699&r2=234700&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCall.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCall.cpp Sat Apr 11 18:51:38 2015
@@ -30,7 +30,6 @@
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/InlineAsm.h"
#include "llvm/IR/Intrinsics.h"
-#include "llvm/IR/IntrinsicInst.h"
#include "llvm/Transforms/Utils/Local.h"
#include <sstream>
using namespace clang;
@@ -2217,29 +2216,7 @@ static llvm::StoreInst *findDominatingSt
if (!CGF.ReturnValue->hasOneUse()) {
llvm::BasicBlock *IP = CGF.Builder.GetInsertBlock();
if (IP->empty()) return nullptr;
- llvm::Instruction *I = &IP->back();
-
- // Skip lifetime markers
- for (llvm::BasicBlock::reverse_iterator II = IP->rbegin(),
- IE = IP->rend();
- II != IE; ++II) {
- if (llvm::IntrinsicInst *Intrinsic =
- dyn_cast<llvm::IntrinsicInst>(&*II)) {
- if (Intrinsic->getIntrinsicID() == llvm::Intrinsic::lifetime_end) {
- const llvm::Value *CastAddr = Intrinsic->getArgOperand(1);
- ++II;
- if (isa<llvm::BitCastInst>(&*II)) {
- if (CastAddr == &*II) {
- continue;
- }
- }
- }
- }
- I = &*II;
- break;
- }
-
- llvm::StoreInst *store = dyn_cast<llvm::StoreInst>(I);
+ llvm::StoreInst *store = dyn_cast<llvm::StoreInst>(&IP->back());
if (!store) return nullptr;
if (store->getPointerOperand() != CGF.ReturnValue) return nullptr;
assert(!store->isAtomic() && !store->isVolatile()); // see below
@@ -2337,8 +2314,7 @@ void CodeGenFunction::EmitFunctionEpilog
// If there is a dominating store to ReturnValue, we can elide
// the load, zap the store, and usually zap the alloca.
- if (llvm::StoreInst *SI =
- findDominatingStoreToReturnValue(*this)) {
+ if (llvm::StoreInst *SI = findDominatingStoreToReturnValue(*this)) {
// Reuse the debug location from the store unless there is
// cleanup code to be emitted between the store and return
// instruction.
Modified: cfe/trunk/lib/CodeGen/CGCleanup.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCleanup.cpp?rev=234700&r1=234699&r2=234700&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCleanup.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGCleanup.cpp Sat Apr 11 18:51:38 2015
@@ -125,17 +125,6 @@ char *EHScopeStack::allocate(size_t Size
return StartOfData;
}
-bool EHScopeStack::containsOnlyLifetimeMarkers(
- EHScopeStack::stable_iterator Old) const {
- for (EHScopeStack::iterator it = begin(); stabilize(it) != Old; it++) {
- EHCleanupScope *cleanup = dyn_cast<EHCleanupScope>(&*it);
- if (!cleanup || !cleanup->isLifetimeMarker())
- return false;
- }
-
- return true;
-}
-
EHScopeStack::stable_iterator
EHScopeStack::getInnermostActiveNormalCleanup() const {
for (stable_iterator si = getInnermostNormalCleanup(), se = stable_end();
@@ -759,15 +748,7 @@ void CodeGenFunction::PopCleanupBlock(bo
Scope.getNumBranchAfters() == 1) {
assert(!BranchThroughDest || !IsActive);
- // Clean up the possibly dead store to the cleanup dest slot.
- llvm::Instruction *NormalCleanupDestSlot =
- cast<llvm::Instruction>(getNormalCleanupDestSlot());
- if (NormalCleanupDestSlot->hasOneUse()) {
- NormalCleanupDestSlot->user_back()->eraseFromParent();
- NormalCleanupDestSlot->eraseFromParent();
- NormalCleanupDest = nullptr;
- }
-
+ // TODO: clean up the possibly dead stores to the cleanup dest slot.
llvm::BasicBlock *BranchAfter = Scope.getBranchAfterBlock(0);
InstsToAppend.push_back(llvm::BranchInst::Create(BranchAfter));
Modified: cfe/trunk/lib/CodeGen/CGCleanup.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGCleanup.h?rev=234700&r1=234699&r2=234700&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGCleanup.h (original)
+++ cfe/trunk/lib/CodeGen/CGCleanup.h Sat Apr 11 18:51:38 2015
@@ -62,9 +62,6 @@ protected:
/// Whether this cleanup is currently active.
unsigned IsActive : 1;
- /// Whether this cleanup is a lifetime marker
- unsigned IsLifetimeMarker : 1;
-
/// Whether the normal cleanup should test the activation flag.
unsigned TestFlagInNormalCleanup : 1;
@@ -78,7 +75,7 @@ protected:
/// The number of fixups required by enclosing scopes (not including
/// this one). If this is the top cleanup scope, all the fixups
/// from this index onwards belong to this scope.
- unsigned FixupDepth : 32 - 18 - NumCommonBits; // currently 13
+ unsigned FixupDepth : 32 - 17 - NumCommonBits; // currently 13
};
class FilterBitFields {
@@ -275,7 +272,6 @@ public:
CleanupBits.IsNormalCleanup = isNormal;
CleanupBits.IsEHCleanup = isEH;
CleanupBits.IsActive = isActive;
- CleanupBits.IsLifetimeMarker = false;
CleanupBits.TestFlagInNormalCleanup = false;
CleanupBits.TestFlagInEHCleanup = false;
CleanupBits.CleanupSize = cleanupSize;
@@ -299,9 +295,6 @@ public:
bool isActive() const { return CleanupBits.IsActive; }
void setActive(bool A) { CleanupBits.IsActive = A; }
- bool isLifetimeMarker() const { return CleanupBits.IsLifetimeMarker; }
- void setLifetimeMarker() { CleanupBits.IsLifetimeMarker = true; }
-
llvm::AllocaInst *getActiveFlag() const { return ActiveFlag; }
void setActiveFlag(llvm::AllocaInst *Var) { ActiveFlag = Var; }
Modified: cfe/trunk/lib/CodeGen/CGDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDecl.cpp?rev=234700&r1=234699&r2=234700&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDecl.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDecl.cpp Sat Apr 11 18:51:38 2015
@@ -12,7 +12,6 @@
//===----------------------------------------------------------------------===//
#include "CodeGenFunction.h"
-#include "CGCleanup.h"
#include "CGDebugInfo.h"
#include "CGOpenCLRuntime.h"
#include "CodeGenModule.h"
@@ -517,7 +516,10 @@ namespace {
: Addr(addr), Size(size) {}
void Emit(CodeGenFunction &CGF, Flags flags) override {
- CGF.EmitLifetimeEnd(Size, Addr);
+ llvm::Value *castAddr = CGF.Builder.CreateBitCast(Addr, CGF.Int8PtrTy);
+ CGF.Builder.CreateCall2(CGF.CGM.getLLVMLifetimeEndFn(),
+ Size, castAddr)
+ ->setDoesNotThrow();
}
};
}
@@ -838,6 +840,21 @@ static bool shouldUseMemSetPlusStoresToI
canEmitInitWithFewStoresAfterMemset(Init, StoreBudget);
}
+/// Should we use the LLVM lifetime intrinsics for the given local variable?
+static bool shouldUseLifetimeMarkers(CodeGenFunction &CGF, const VarDecl &D,
+ unsigned Size) {
+ // For now, only in optimized builds.
+ if (CGF.CGM.getCodeGenOpts().OptimizationLevel == 0)
+ return false;
+
+ // Limit the size of marked objects to 32 bytes. We don't want to increase
+ // compile time by marking tiny objects.
+ unsigned SizeThreshold = 32;
+
+ return Size > SizeThreshold;
+}
+
+
/// EmitAutoVarDecl - Emit code and set up an entry in LocalDeclMap for a
/// variable declaration with auto, register, or no storage class specifier.
/// These turn into simple stack objects, or GlobalValues depending on target.
@@ -847,33 +864,6 @@ void CodeGenFunction::EmitAutoVarDecl(co
EmitAutoVarCleanups(emission);
}
-/// Emit a lifetime.begin marker if some criteria are satisfied.
-/// \return a pointer to the temporary size Value if a marker was emitted, null
-/// otherwise
-llvm::Value *CodeGenFunction::EmitLifetimeStart(uint64_t Size,
- llvm::Value *Addr) {
- // For now, only in optimized builds.
- if (CGM.getCodeGenOpts().OptimizationLevel == 0)
- return nullptr;
-
- llvm::Value *SizeV = llvm::ConstantInt::get(Int64Ty, Size);
- llvm::Value *Args[] = {
- SizeV,
- new llvm::BitCastInst(Addr, Int8PtrTy, "", Builder.GetInsertBlock())};
- llvm::CallInst *C = llvm::CallInst::Create(CGM.getLLVMLifetimeStartFn(), Args,
- "", Builder.GetInsertBlock());
- C->setDoesNotThrow();
- return SizeV;
-}
-
-void CodeGenFunction::EmitLifetimeEnd(llvm::Value *Size, llvm::Value *Addr) {
- llvm::Value *Args[] = {Size, new llvm::BitCastInst(Addr, Int8PtrTy, "",
- Builder.GetInsertBlock())};
- llvm::CallInst *C = llvm::CallInst::Create(CGM.getLLVMLifetimeEndFn(), Args,
- "", Builder.GetInsertBlock());
- C->setDoesNotThrow();
-}
-
/// EmitAutoVarAlloca - Emit the alloca and debug information for a
/// local variable. Does not emit initialization or destruction.
CodeGenFunction::AutoVarEmission
@@ -969,8 +959,13 @@ CodeGenFunction::EmitAutoVarAlloca(const
// Emit a lifetime intrinsic if meaningful. There's no point
// in doing this if we don't have a valid insertion point (?).
uint64_t size = CGM.getDataLayout().getTypeAllocSize(LTy);
- if (HaveInsertPoint()) {
- emission.SizeForLifetimeMarkers = EmitLifetimeStart(size, Alloc);
+ if (HaveInsertPoint() && shouldUseLifetimeMarkers(*this, D, size)) {
+ llvm::Value *sizeV = llvm::ConstantInt::get(Int64Ty, size);
+
+ emission.SizeForLifetimeMarkers = sizeV;
+ llvm::Value *castAddr = Builder.CreateBitCast(Alloc, Int8PtrTy);
+ Builder.CreateCall2(CGM.getLLVMLifetimeStartFn(), sizeV, castAddr)
+ ->setDoesNotThrow();
} else {
assert(!emission.useLifetimeMarkers());
}
@@ -1316,8 +1311,6 @@ void CodeGenFunction::EmitAutoVarCleanup
EHStack.pushCleanup<CallLifetimeEnd>(NormalCleanup,
emission.getAllocatedAddress(),
emission.getSizeForLifetimeMarkers());
- EHCleanupScope &cleanup = cast<EHCleanupScope>(*EHStack.begin());
- cleanup.setLifetimeMarker();
}
// Check the type for a cleanup.
Modified: cfe/trunk/lib/CodeGen/CodeGenFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.cpp?rev=234700&r1=234699&r2=234700&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenFunction.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenFunction.cpp Sat Apr 11 18:51:38 2015
@@ -12,7 +12,6 @@
//===----------------------------------------------------------------------===//
#include "CodeGenFunction.h"
-#include "CGCleanup.h"
#include "CGCUDARuntime.h"
#include "CGCXXABI.h"
#include "CGDebugInfo.h"
@@ -244,13 +243,12 @@ void CodeGenFunction::FinishFunction(Sou
// parameters. Do this in whatever block we're currently in; it's
// important to do this before we enter the return block or return
// edges will be *really* confused.
- bool HasCleanups = EHStack.stable_begin() != PrologueCleanupDepth;
- bool HasOnlyLifetimeMarkers =
- HasCleanups && EHStack.containsOnlyLifetimeMarkers(PrologueCleanupDepth);
- bool EmitRetDbgLoc = !HasCleanups || HasOnlyLifetimeMarkers;
- if (HasCleanups) {
+ bool EmitRetDbgLoc = true;
+ if (EHStack.stable_begin() != PrologueCleanupDepth) {
// Make sure the line table doesn't jump back into the body for
// the ret after it's been at EndLoc.
+ EmitRetDbgLoc = false;
+
if (CGDebugInfo *DI = getDebugInfo())
if (OnlySimpleReturnStmts)
DI->EmitLocation(Builder, EndLoc);
Modified: cfe/trunk/lib/CodeGen/CodeGenFunction.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.h?rev=234700&r1=234699&r2=234700&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenFunction.h (original)
+++ cfe/trunk/lib/CodeGen/CodeGenFunction.h Sat Apr 11 18:51:38 2015
@@ -1730,9 +1730,6 @@ public:
void EmitCXXTemporary(const CXXTemporary *Temporary, QualType TempType,
llvm::Value *Ptr);
- llvm::Value *EmitLifetimeStart(uint64_t Size, llvm::Value *Addr);
- void EmitLifetimeEnd(llvm::Value *Size, llvm::Value *Addr);
-
llvm::Value *EmitCXXNewExpr(const CXXNewExpr *E);
void EmitCXXDeleteExpr(const CXXDeleteExpr *E);
Modified: cfe/trunk/lib/CodeGen/EHScopeStack.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/EHScopeStack.h?rev=234700&r1=234699&r2=234700&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/EHScopeStack.h (original)
+++ cfe/trunk/lib/CodeGen/EHScopeStack.h Sat Apr 11 18:51:38 2015
@@ -319,10 +319,6 @@ public:
/// Pops a terminate handler off the stack.
void popTerminate();
- // Returns true iff the current scope is either empty or contains only
- // lifetime markers, i.e. no real cleanup code
- bool containsOnlyLifetimeMarkers(stable_iterator Old) const;
-
/// Determines whether the exception-scopes stack is empty.
bool empty() const { return StartOfData == EndOfBuffer; }
Removed: cfe/trunk/test/CodeGen/cleanup-destslot-simple.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/cleanup-destslot-simple.c?rev=234699&view=auto
==============================================================================
--- cfe/trunk/test/CodeGen/cleanup-destslot-simple.c (original)
+++ cfe/trunk/test/CodeGen/cleanup-destslot-simple.c (removed)
@@ -1,15 +0,0 @@
-// RUN: %clang_cc1 -O1 -triple x86_64-none-linux-gnu -emit-llvm -gline-tables-only %s -o - | FileCheck %s
-
-// There is no exception to handle here, lifetime.end is not a destructor,
-// so there is no need have cleanup dest slot related code
-// CHECK-LABEL: define i32 @test
-int test() {
- int x = 3;
- int *volatile p = &x;
- return *p;
-// CHECK: [[X:%.*]] = alloca i32
-// CHECK: [[P:%.*]] = alloca i32*
-// CHECK: call void @llvm.lifetime.start(i64 4, i8* %{{.*}})
-// CHECK: call void @llvm.lifetime.start(i64 8, i8* %{{.*}})
-// CHECK-NOT: store i32 %{{.*}}, i32* %cleanup.dest.slot
-}
Removed: cfe/trunk/test/CodeGen/lifetime-debuginfo-1.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/lifetime-debuginfo-1.c?rev=234699&view=auto
==============================================================================
--- cfe/trunk/test/CodeGen/lifetime-debuginfo-1.c (original)
+++ cfe/trunk/test/CodeGen/lifetime-debuginfo-1.c (removed)
@@ -1,13 +0,0 @@
-// RUN: %clang_cc1 -O1 -triple x86_64-none-linux-gnu -emit-llvm -gline-tables-only %s -o - | FileCheck %s
-
-// Inserting lifetime markers should not affect debuginfo
-
-extern int x;
-
-// CHECK-LABEL: define i32 @f
-int f() {
- int *p = &x;
-// CHECK: ret i32 %{{.*}}, !dbg [[DI:![0-9]*]]
-// CHECK: [[DI]] = !MDLocation(line: [[@LINE+1]]
- return *p;
-}
Removed: cfe/trunk/test/CodeGen/lifetime-debuginfo-2.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/lifetime-debuginfo-2.c?rev=234699&view=auto
==============================================================================
--- cfe/trunk/test/CodeGen/lifetime-debuginfo-2.c (original)
+++ cfe/trunk/test/CodeGen/lifetime-debuginfo-2.c (removed)
@@ -1,29 +0,0 @@
-// RUN: %clang_cc1 -O1 -triple x86_64-none-linux-gnu -emit-llvm -gline-tables-only %s -o - | FileCheck %s
-
-// Inserting lifetime markers should not affect debuginfo: lifetime.end is not
-// a destructor, but instrumentation for the compiler. Ensure the debug info for
-// the return statement (in the IR) does not point to the function closing '}'
-// which is used to show some destructors have been called before leaving the
-// function.
-
-extern int f(int);
-extern int g(int);
-
-// CHECK-LABEL: define i32 @test
-int test(int a, int b) {
- int res;
-
- if (a==2) {
- int r = f(b);
- res = r + b;
- a += 2;
- } else {
- int r = f(a);
- res = r + a;
- b += 1;
- }
-
- return res;
-// CHECK: ret i32 %{{.*}}, !dbg [[DI:![0-9]+]]
-// CHECK: [[DI]] = !MDLocation(line: [[@LINE-2]]
-}
Modified: cfe/trunk/test/CodeGenCXX/destructors.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/destructors.cpp?rev=234700&r1=234699&r2=234700&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/destructors.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/destructors.cpp Sat Apr 11 18:51:38 2015
@@ -279,8 +279,6 @@ namespace test5 {
// CHECK5: [[ELEMS:%.*]] = alloca [5 x [[A:%.*]]], align
// CHECK5-NEXT: [[EXN:%.*]] = alloca i8*
// CHECK5-NEXT: [[SEL:%.*]] = alloca i32
- // CHECK5-NEXT: [[PELEMS:%.*]] = bitcast [5 x [[A]]]* [[ELEMS]] to i8*
- // CHECK5-NEXT: call void @llvm.lifetime.start(i64 5, i8* [[PELEMS]])
// CHECK5-NEXT: [[BEGIN:%.*]] = getelementptr inbounds [5 x [[A]]], [5 x [[A]]]* [[ELEMS]], i32 0, i32 0
// CHECK5-NEXT: [[END:%.*]] = getelementptr inbounds [[A]], [[A]]* [[BEGIN]], i64 5
// CHECK5-NEXT: br label
@@ -289,8 +287,7 @@ namespace test5 {
// CHECK5-NEXT: invoke void @_ZN5test51AD1Ev([[A]]* [[ELT]])
// CHECK5: [[T0:%.*]] = icmp eq [[A]]* [[ELT]], [[BEGIN]]
// CHECK5-NEXT: br i1 [[T0]],
- // CHECK5: call void @llvm.lifetime.end
- // CHECK5-NEXT: ret void
+ // CHECK5: ret void
// lpad
// CHECK5: [[EMPTY:%.*]] = icmp eq [[A]]* [[BEGIN]], [[ELT]]
// CHECK5-NEXT: br i1 [[EMPTY]]
Modified: cfe/trunk/test/CodeGenCXX/nrvo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/nrvo.cpp?rev=234700&r1=234699&r2=234700&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/nrvo.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/nrvo.cpp Sat Apr 11 18:51:38 2015
@@ -54,22 +54,16 @@ X test2(bool B) {
return x;
// CHECK: call {{.*}} @_ZN1XC1Ev
- // CHECK-NEXT: {{.*}} getelementptr inbounds %class.X, %class.X* %y, i32 0, i32 0
- // CHECK-NEXT: call void @llvm.lifetime.start
// CHECK-NEXT: call {{.*}} @_ZN1XC1Ev
// CHECK: call {{.*}} @_ZN1XC1ERKS_
// CHECK: call {{.*}} @_ZN1XC1ERKS_
// CHECK: call {{.*}} @_ZN1XD1Ev
- // CHECK-NEXT: call void @llvm.lifetime.end
// CHECK: call {{.*}} @_ZN1XD1Ev
- // CHECK-NEXT: call void @llvm.lifetime.end
// CHECK: ret void
// The block ordering in the -fexceptions IR is unfortunate.
- // CHECK-EH: call void @llvm.lifetime.start
- // CHECK-EH-NEXT: call {{.*}} @_ZN1XC1Ev
- // CHECK-EH: call void @llvm.lifetime.start
+ // CHECK-EH: call {{.*}} @_ZN1XC1Ev
// CHECK-EH-NEXT: invoke {{.*}} @_ZN1XC1Ev
// -> %invoke.cont, %lpad
@@ -102,9 +96,7 @@ X test2(bool B) {
// -> %invoke.cont11, %lpad
// %invoke.cont11: normal cleanup for 'x'
- // CHECK-EH: call void @llvm.lifetime.end
- // CHECK-EH-NEXT: call {{.*}} @_ZN1XD1Ev
- // CHECK-EH-NEXT: call void @llvm.lifetime.end
+ // CHECK-EH: call {{.*}} @_ZN1XD1Ev
// CHECK-EH-NEXT: ret void
// %eh.cleanup: EH cleanup for 'x'
@@ -176,12 +168,9 @@ X test6() {
X a __attribute__((aligned(8)));
return a;
// CHECK: [[A:%.*]] = alloca [[X:%.*]], align 8
- // CHECK-NEXT: [[PTR:%.*]] = getelementptr inbounds %class.X, %class.X* [[A]], i32 0, i32 0
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 1, i8* [[PTR]])
// CHECK-NEXT: call {{.*}} @_ZN1XC1Ev([[X]]* [[A]])
// CHECK-NEXT: call {{.*}} @_ZN1XC1ERKS_([[X]]* {{%.*}}, [[X]]* dereferenceable({{[0-9]+}}) [[A]])
// CHECK-NEXT: call {{.*}} @_ZN1XD1Ev([[X]]* [[A]])
- // CHECK-NEXT: call void @llvm.lifetime.end(i64 1, i8* [[PTR]])
// CHECK-NEXT: ret void
}
Modified: cfe/trunk/test/CodeGenObjC/arc-blocks.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/arc-blocks.m?rev=234700&r1=234699&r2=234700&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/arc-blocks.m (original)
+++ cfe/trunk/test/CodeGenObjC/arc-blocks.m Sat Apr 11 18:51:38 2015
@@ -74,8 +74,6 @@ void test3(void (^sink)(id*)) {
// CHECK-NEXT: call i8* @objc_retain(
// CHECK-NEXT: bitcast i8*
// CHECK-NEXT: store void (i8**)* {{%.*}}, void (i8**)** [[SINK]]
- // CHECK-NEXT: [[STRONGPTR1:%.*]] = bitcast i8** [[STRONG]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[STRONGPTR1]])
// CHECK-NEXT: store i8* null, i8** [[STRONG]]
// CHECK-NEXT: load void (i8**)*, void (i8**)** [[SINK]]
@@ -96,8 +94,6 @@ void test3(void (^sink)(id*)) {
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[STRONG]]
// CHECK-NEXT: call void @objc_release(i8* [[T0]])
- // CHECK-NEXT: [[STRONGPTR2:%.*]] = bitcast i8** [[STRONG]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.end(i64 8, i8* [[STRONGPTR2]])
// CHECK-NEXT: load void (i8**)*, void (i8**)** [[SINK]]
// CHECK-NEXT: bitcast
@@ -171,8 +167,6 @@ void test5(void) {
// CHECK-LABEL: define void @test5()
// CHECK: [[VAR:%.*]] = alloca i8*
// CHECK-NEXT: [[BLOCK:%.*]] = alloca [[BLOCK_T:<{.*}>]],
- // CHECK-NEXT: [[VARPTR1:%.*]] = bitcast i8** [[VAR]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[VARPTR1]])
// CHECK: [[T0:%.*]] = call i8* @test5_source()
// CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
// CHECK-NEXT: store i8* [[T1]], i8** [[VAR]],
@@ -184,8 +178,6 @@ void test5(void) {
// CHECK-NEXT: store i8* [[T0]], i8** [[CAPTURE]]
// CHECK-NEXT: [[T0:%.*]] = bitcast [[BLOCK_T]]* [[BLOCK]] to
// CHECK: call void @test5_helper
- // CHECK-NEXT: [[VARPTR2:%.*]] = bitcast i8** [[VAR]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.end(i64 8, i8* [[VARPTR2]])
// CHECK-NEXT: ret void
}
@@ -198,8 +190,6 @@ void test6(void) {
// CHECK-LABEL: define void @test6()
// CHECK: [[VAR:%.*]] = alloca [[BYREF_T:%.*]],
// CHECK-NEXT: [[BLOCK:%.*]] = alloca [[BLOCK_T:<{.*}>]],
- // CHECK-NEXT: [[VARPTR1:%.*]] = bitcast [[BYREF_T]]* [[VAR]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 48, i8* [[VARPTR1]])
// CHECK: [[T0:%.*]] = getelementptr inbounds [[BYREF_T]], [[BYREF_T]]* [[VAR]], i32 0, i32 2
// 0x02000000 - has copy/dispose helpers weak
// CHECK-NEXT: store i32 1107296256, i32* [[T0]]
@@ -217,9 +207,7 @@ void test6(void) {
// CHECK: [[T0:%.*]] = bitcast [[BYREF_T]]* [[VAR]] to i8*
// CHECK-NEXT: call void @_Block_object_dispose(i8* [[T0]], i32 8)
// CHECK-NEXT: call void @objc_destroyWeak(i8** [[SLOT]])
- // CHECK-NEXT: [[VARPTR2:%.*]] = bitcast [[BYREF_T]]* [[VAR]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.end(i64 48, i8* [[VARPTR2]])
- // CHECK-NEXT: ret void
+ // CHECK: ret void
// CHECK-LABEL: define internal void @__Block_byref_object_copy_
// CHECK: [[T0:%.*]] = getelementptr inbounds [[BYREF_T]], [[BYREF_T]]* {{%.*}}, i32 0, i32 6
@@ -506,8 +494,6 @@ void test13(id x) {
// CHECK-NEXT: [[CLEANUP_ACTIVE:%.*]] = alloca i1
// CHECK-NEXT: [[T0:%.*]] = call i8* @objc_retain(i8* {{%.*}})
// CHECK-NEXT: store i8* [[T0]], i8** [[X]], align 8
- // CHECK-NEXT: [[BPTR1:%.*]] = bitcast void ()** [[B]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[BPTR1]])
// CHECK-NEXT: [[CLEANUP_ADDR:%.*]] = getelementptr inbounds [[BLOCK_T]], [[BLOCK_T]]* [[BLOCK]], i32 0, i32 5
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[X]], align 8
// CHECK-NEXT: [[T1:%.*]] = icmp ne i8* [[T0]], null
@@ -533,8 +519,6 @@ void test13(id x) {
// CHECK-NEXT: [[T0:%.*]] = load void ()*, void ()** [[B]]
// CHECK-NEXT: [[T1:%.*]] = bitcast void ()* [[T0]] to i8*
// CHECK-NEXT: call void @objc_release(i8* [[T1]])
- // CHECK-NEXT: [[BPTR2:%.*]] = bitcast void ()** [[B]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.end(i64 8, i8* [[BPTR2]])
// CHECK-NEXT: [[T0:%.*]] = load i1, i1* [[CLEANUP_ACTIVE]]
// CHECK-NEXT: br i1 [[T0]]
@@ -566,8 +550,6 @@ void test16() {
// CHECK-LABEL: define void @test16(
// CHECK: [[BLKVAR:%.*]] = alloca void ()*, align 8
// CHECK-NEXT: [[BLOCK:%.*]] = alloca [[BLOCK_T:<{.*}>]],
- // CHECK-NEXT: [[BLKVARPTR1:%.*]] = bitcast void ()** [[BLKVAR]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[BLKVARPTR1]])
// CHECK-NEXT: [[SLOTREL:%.*]] = getelementptr inbounds [[BLOCK_T]], [[BLOCK_T]]* [[BLOCK]], i32 0, i32 5
// CHECK-NEXT: store void ()* null, void ()** [[BLKVAR]], align 8
}
Modified: cfe/trunk/test/CodeGenObjC/arc-bridged-cast.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/arc-bridged-cast.m?rev=234700&r1=234699&r2=234700&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/arc-bridged-cast.m (original)
+++ cfe/trunk/test/CodeGenObjC/arc-bridged-cast.m Sat Apr 11 18:51:38 2015
@@ -31,8 +31,6 @@ void bridge_transfer_from_cf(int *i) {
// CHECK: store i32 17
*i = 17;
// CHECK: call void @objc_release
- // CHECK-NEXT: bitcast
- // CHECK-NEXT: call void @llvm.lifetime.end
// CHECK-NEXT: ret void
}
@@ -52,8 +50,6 @@ void bridge_from_cf(int *i) {
// CHECK: store i32 17
*i = 17;
// CHECK: call void @objc_release
- // CHECK-NEXT: bitcast
- // CHECK-NEXT: call void @llvm.lifetime.end
// CHECK-NEXT: ret void
}
@@ -71,8 +67,6 @@ void bridge_retained_of_cf(int *i) {
// CHECK: store i32 13
// CHECK: store i32 17
*i = 17;
- // CHECK-NEXT: bitcast
- // CHECK-NEXT: call void @llvm.lifetime.end
// CHECK-NEXT: ret void
}
@@ -80,8 +74,7 @@ void bridge_retained_of_cf(int *i) {
void bridge_of_cf(int *i) {
// CHECK: store i32 7
*i = 7;
- // CHECK: call void @llvm.lifetime.start
- // CHECK-NEXT: call i8* @CreateSomething()
+ // CHECK: call i8* @CreateSomething()
CFTypeRef cf1 = (__bridge CFTypeRef)CreateSomething();
// CHECK-NOT: retain
// CHECK: store i32 11
@@ -92,8 +85,6 @@ void bridge_of_cf(int *i) {
// CHECK-NOT: release
// CHECK: store i32 17
*i = 17;
- // CHECK-NEXT: bitcast
- // CHECK-NEXT: call void @llvm.lifetime.end
// CHECK-NEXT: ret void
}
Modified: cfe/trunk/test/CodeGenObjC/arc-literals.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/arc-literals.m?rev=234700&r1=234699&r2=234700&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/arc-literals.m (original)
+++ cfe/trunk/test/CodeGenObjC/arc-literals.m Sat Apr 11 18:51:38 2015
@@ -27,13 +27,9 @@ void test_numeric() {
// CHECK: call i8* @objc_retainAutoreleasedReturnValue
id charlit = @'a';
// CHECK: call void @objc_release
- // CHECK: call void @llvm.lifetime.end
// CHECK: call void @objc_release
- // CHECK: call void @llvm.lifetime.end
// CHECK: call void @objc_release
- // CHECK: call void @llvm.lifetime.end
// CHECK: call void @objc_release
- // CHECK: call void @llvm.lifetime.end
// CHECK-NEXT: ret void
}
Modified: cfe/trunk/test/CodeGenObjC/arc-precise-lifetime.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/arc-precise-lifetime.m?rev=234700&r1=234699&r2=234700&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/arc-precise-lifetime.m (original)
+++ cfe/trunk/test/CodeGenObjC/arc-precise-lifetime.m Sat Apr 11 18:51:38 2015
@@ -7,8 +7,6 @@ void test0() {
PRECISE_LIFETIME id x = test0_helper();
x = 0;
// CHECK: [[X:%.*]] = alloca i8*
- // CHECK-NEXT: [[XPTR1:%.*]] = bitcast i8** [[X]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[XPTR1]])
// CHECK-NEXT: [[CALL:%.*]] = call i8* @test0_helper()
// CHECK-NEXT: store i8* [[CALL]], i8** [[X]]
@@ -21,8 +19,6 @@ void test0() {
// CHECK-NEXT: call void @objc_release(i8* [[T1]]) [[NUW:#[0-9]+]]
// CHECK-NOT: clang.imprecise_release
- // CHECK-NEXT: [[XPTR2:%.*]] = bitcast i8** [[X]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.end(i64 8, i8* [[XPTR2]])
// CHECK-NEXT: ret void
}
@@ -36,17 +32,11 @@ extern Test1 *test1_helper(void);
// CHECK-LABEL: define void @test1a()
void test1a(void) {
- // CHECK: [[PTR:%.*]] = alloca [[PTR_T:%.*]]*, align 8
- // CHECK: [[C:%.*]] = alloca i8*, align 8
- // CHECK: [[PTRPTR1:%.*]] = bitcast [[PTR_T]]** [[PTR]] to i8*
- // CHECK: call void @llvm.lifetime.start(i64 8, i8* [[PTRPTR1]])
// CHECK: [[T0:%.*]] = call [[TEST1:%.*]]* @test1_helper()
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST1]]* [[T0]] to i8*
// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[TEST1]]*
// CHECK-NEXT: store [[TEST1]]* [[T3]]
- // CHECK-NEXT: [[CPTR1:%.*]] = bitcast i8** [[C]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[CPTR1]])
// CHECK-NEXT: [[T0:%.*]] = load [[TEST1]]*, [[TEST1]]**
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST1]]* [[T0]] to i8*
// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainAutorelease(i8* [[T1]])
@@ -55,13 +45,9 @@ void test1a(void) {
// CHECK-NEXT: [[T5:%.*]] = bitcast [[TEST1]]* [[T3]] to i8*
// CHECK-NEXT: [[T6:%.*]] = call i8* bitcast
// CHECK-NEXT: store i8* [[T6]], i8**
- // CHECK-NEXT: [[CPTR2:%.*]] = bitcast i8** [[C]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.end(i64 8, i8* [[CPTR2]])
// CHECK-NEXT: [[T0:%.*]] = load [[TEST1]]*, [[TEST1]]**
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST1]]* [[T0]] to i8*
// CHECK-NEXT: call void @objc_release(i8* [[T1]]) [[NUW]], !clang.imprecise_release
- // CHECK-NEXT: [[PTRPTR2:%.*]] = bitcast [[PTR_T]]** [[PTR]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.end(i64 8, i8* [[PTRPTR2]])
// CHECK-NEXT: ret void
Test1 *ptr = test1_helper();
char *c = [(ptr) interior];
@@ -69,47 +55,31 @@ void test1a(void) {
// CHECK-LABEL: define void @test1b()
void test1b(void) {
- // CHECK: [[PTR:%.*]] = alloca [[PTR_T:%.*]]*, align 8
- // CHECK: [[C:%.*]] = alloca i8*, align 8
- // CHECK: [[PTRPTR1:%.*]] = bitcast [[PTR_T]]** [[PTR]] to i8*
- // CHECK: call void @llvm.lifetime.start(i64 8, i8* [[PTRPTR1]])
// CHECK: [[T0:%.*]] = call [[TEST1:%.*]]* @test1_helper()
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST1]]* [[T0]] to i8*
// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[TEST1]]*
// CHECK-NEXT: store [[TEST1]]* [[T3]]
- // CHECK-NEXT: [[CPTR1:%.*]] = bitcast i8** [[C]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[CPTR1]])
// CHECK-NEXT: [[T0:%.*]] = load [[TEST1]]*, [[TEST1]]**
// CHECK-NEXT: [[T1:%.*]] = load i8*, i8** @OBJC_SELECTOR_REFERENCES_
// CHECK-NEXT: [[T2:%.*]] = bitcast [[TEST1]]* [[T0]] to i8*
// CHECK-NEXT: [[T3:%.*]] = call i8* bitcast
// CHECK-NEXT: store i8* [[T3]], i8**
- // CHECK-NEXT: [[CPTR2:%.*]] = bitcast i8** [[C]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.end(i64 8, i8* [[CPTR2]])
// CHECK-NEXT: [[T0:%.*]] = load [[TEST1]]*, [[TEST1]]**
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST1]]* [[T0]] to i8*
// CHECK-NEXT: call void @objc_release(i8* [[T1]]) [[NUW]]
// CHECK-NOT: clang.imprecise_release
- // CHECK-NEXT: [[PTRPTR2:%.*]] = bitcast [[PTR_T]]** [[PTR]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.end(i64 8, i8* [[PTRPTR2]])
// CHECK-NEXT: ret void
__attribute__((objc_precise_lifetime)) Test1 *ptr = test1_helper();
char *c = [ptr interior];
}
void test1c(void) {
- // CHECK: [[PTR:%.*]] = alloca [[PTR_T:%.*]]*, align 8
- // CHECK: [[PC:%.*]] = alloca i8*, align 8
- // CHECK: [[PTRPTR1:%.*]] = bitcast [[PTR_T]]** [[PTR]] to i8*
- // CHECK: call void @llvm.lifetime.start(i64 8, i8* [[PTRPTR1]])
// CHECK: [[T0:%.*]] = call [[TEST1:%.*]]* @test1_helper()
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST1]]* [[T0]] to i8*
// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[TEST1]]*
// CHECK-NEXT: store [[TEST1]]* [[T3]]
- // CHECK-NEXT: [[PCPTR1:%.*]] = bitcast i8** [[PC]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[PCPTR1]])
// CHECK-NEXT: [[T0:%.*]] = load [[TEST1]]*, [[TEST1]]**
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST1]]* [[T0]] to i8*
// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainAutorelease(i8* [[T1]])
@@ -118,30 +88,20 @@ void test1c(void) {
// CHECK-NEXT: [[T5:%.*]] = bitcast [[TEST1]]* [[T3]] to i8*
// CHECK-NEXT: [[T6:%.*]] = call i8* bitcast
// CHECK-NEXT: store i8* [[T6]], i8**
- // CHECK-NEXT: [[PCPTR2:%.*]] = bitcast i8** [[PC]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.end(i64 8, i8* [[PCPTR2]])
// CHECK-NEXT: [[T0:%.*]] = load [[TEST1]]*, [[TEST1]]**
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST1]]* [[T0]] to i8*
// CHECK-NEXT: call void @objc_release(i8* [[T1]]) [[NUW]], !clang.imprecise_release
- // CHECK-NEXT: [[PTRPTR2:%.*]] = bitcast [[PTR_T]]** [[PTR]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.end(i64 8, i8* [[PTRPTR2]])
// CHECK-NEXT: ret void
Test1 *ptr = test1_helper();
char *pc = ptr.PropertyReturnsInnerPointer;
}
void test1d(void) {
- // CHECK: [[PTR:%.*]] = alloca [[PTR_T:%.*]]*, align 8
- // CHECK: [[PC:%.*]] = alloca i8*, align 8
- // CHECK: [[PTRPTR1:%.*]] = bitcast [[PTR_T]]** [[PTR]] to i8*
- // CHECK: call void @llvm.lifetime.start(i64 8, i8* [[PTRPTR1]])
// CHECK: [[T0:%.*]] = call [[TEST1:%.*]]* @test1_helper()
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST1]]* [[T0]] to i8*
// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[TEST1]]*
// CHECK-NEXT: store [[TEST1]]* [[T3]]
- // CHECK-NEXT: [[PCPTR1:%.*]] = bitcast i8** [[PC]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[PCPTR1]])
// CHECK-NEXT: [[T0:%.*]] = load [[TEST1]]*, [[TEST1]]**
// CHECK-NEXT: [[T2:%.*]] = bitcast [[TEST1]]* [[T0]] to i8*
// CHECK-NEXT: [[T3:%.*]] = call i8* @objc_retainAutorelease
@@ -150,13 +110,9 @@ void test1d(void) {
// CHECK-NEXT: [[EIGHT:%.*]] = bitcast [[TEST1]]* [[SIX]] to i8*
// CHECK-NEXT: [[CALL1:%.*]] = call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(i8* [[EIGHT]], i8* [[SEVEN]])
// CHECK-NEXT: store i8* [[CALL1]], i8**
- // CHECK-NEXT: [[PCPTR2:%.*]] = bitcast i8** [[PC]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.end(i64 8, i8* [[PCPTR2]])
// CHECK-NEXT: [[NINE:%.*]] = load [[TEST1]]*, [[TEST1]]**
// CHECK-NEXT: [[TEN:%.*]] = bitcast [[TEST1]]* [[NINE]] to i8*
// CHECK-NEXT: call void @objc_release(i8* [[TEN]])
- // CHECK-NEXT: [[PTRPTR2:%.*]] = bitcast [[PTR_T]]** [[PTR]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.end(i64 8, i8* [[PTRPTR2]])
// CHECK-NEXT: ret void
__attribute__((objc_precise_lifetime)) Test1 *ptr = test1_helper();
char *pc = ptr.PropertyReturnsInnerPointer;
Modified: cfe/trunk/test/CodeGenObjC/arc-ternary-op.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/arc-ternary-op.m?rev=234700&r1=234699&r2=234700&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/arc-ternary-op.m (original)
+++ cfe/trunk/test/CodeGenObjC/arc-ternary-op.m Sat Apr 11 18:51:38 2015
@@ -10,8 +10,6 @@ void test0(_Bool cond) {
// CHECK-NEXT: [[RELCOND:%.*]] = alloca i1
// CHECK-NEXT: zext
// CHECK-NEXT: store
- // CHECK-NEXT: [[XPTR1:%.*]] = bitcast i8** [[X]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[XPTR1]])
// CHECK-NEXT: [[T0:%.*]] = load i8, i8* [[COND]]
// CHECK-NEXT: [[T1:%.*]] = trunc i8 [[T0]] to i1
// CHECK-NEXT: store i1 false, i1* [[RELCOND]]
@@ -31,8 +29,6 @@ void test0(_Bool cond) {
// CHECK-NEXT: br label
// CHECK: [[T0:%.*]] = load i8*, i8** [[X]]
// CHECK-NEXT: call void @objc_release(i8* [[T0]]) [[NUW]]
- // CHECK-NEXT: [[XPTR2:%.*]] = bitcast i8** [[X]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.end(i64 8, i8* [[XPTR2]])
// CHECK-NEXT: ret void
id x = (cond ? 0 : test0_helper());
}
@@ -53,11 +49,7 @@ void test1(int cond) {
// CHECK-NEXT: [[CONDCLEANUPSAVE:%.*]] = alloca i8*
// CHECK-NEXT: [[CONDCLEANUP:%.*]] = alloca i1
// CHECK-NEXT: store i32
- // CHECK-NEXT: [[STRONGPTR1:%.*]] = bitcast i8** [[STRONG]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[STRONGPTR1]])
// CHECK-NEXT: store i8* null, i8** [[STRONG]]
- // CHECK-NEXT: [[WEAKPTR1:%.*]] = bitcast i8** [[WEAK]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[WEAKPTR1]])
// CHECK-NEXT: call i8* @objc_initWeak(i8** [[WEAK]], i8* null)
// CHECK-NEXT: [[T0:%.*]] = load i32, i32* [[COND]]
@@ -101,10 +93,6 @@ void test1(int cond) {
// CHECK-NEXT: br label
// CHECK: call void @objc_destroyWeak(i8** [[WEAK]])
- // CHECK: [[WEAKPTR2:%.*]] = bitcast i8** [[WEAK]] to i8*
- // CHECK: call void @llvm.lifetime.end(i64 8, i8* [[WEAKPTR2]])
- // CHECK: [[STRONGPTR2:%.*]] = bitcast i8** [[STRONG]] to i8*
- // CHECK: call void @llvm.lifetime.end(i64 8, i8* [[STRONGPTR2]])
// CHECK: ret void
}
Modified: cfe/trunk/test/CodeGenObjC/arc.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/arc.m?rev=234700&r1=234699&r2=234700&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/arc.m (original)
+++ cfe/trunk/test/CodeGenObjC/arc.m Sat Apr 11 18:51:38 2015
@@ -46,17 +46,15 @@ void test0(id x) {
id test1(id x) {
// CHECK: [[X:%.*]] = alloca i8*
// CHECK-NEXT: [[Y:%.*]] = alloca i8*
+ // CHECK-NEXT: alloca i32
// CHECK-NEXT: [[PARM:%.*]] = call i8* @objc_retain(i8* {{%.*}})
// CHECK-NEXT: store i8* [[PARM]], i8** [[X]]
- // CHECK-NEXT: [[YPTR1:%.*]] = bitcast i8** [[Y]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[YPTR1]])
// CHECK-NEXT: store i8* null, i8** [[Y]]
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[Y]]
// CHECK-NEXT: [[RET:%.*]] = call i8* @objc_retain(i8* [[T0]])
+ // CHECK-NEXT: store i32
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[Y]]
// CHECK-NEXT: call void @objc_release(i8* [[T0]])
- // CHECK-NEXT: [[YPTR2:%.*]] = bitcast i8** [[Y]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.end(i64 8, i8* [[YPTR2]])
// CHECK-NEXT: [[T1:%.*]] = load i8*, i8** [[X]]
// CHECK-NEXT: call void @objc_release(i8* [[T1]])
// CHECK-NEXT: [[T1:%.*]] = tail call i8* @objc_autoreleaseReturnValue(i8* [[RET]])
@@ -101,8 +99,6 @@ void test3_unelided() {
extern void test3_helper(void);
// CHECK: [[X:%.*]] = alloca [[TEST3:%.*]]*
- // CHECK-NEXT: [[XPTR1:%.*]] = bitcast [[TEST3]]** [[X]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[XPTR1]])
// CHECK-NEXT: store [[TEST3]]* null, [[TEST3]]** [[X]], align
Test3 *x;
@@ -126,16 +122,12 @@ void test3_unelided() {
// CHECK-NEXT: [[T0:%.*]] = load [[TEST3]]*, [[TEST3]]** [[X]]
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST3]]* [[T0]] to i8*
// CHECK-NEXT: call void @objc_release(i8* [[T1]]) [[NUW]]
- // CHECK-NEXT: [[XPTR2:%.*]] = bitcast [[TEST3]]** [[X]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.end(i64 8, i8* [[XPTR2]])
// CHECK-NEXT: ret void
}
// CHECK-LABEL: define void @test3()
void test3() {
// CHECK: [[X:%.*]] = alloca i8*
- // CHECK-NEXT: [[XPTR1:%.*]] = bitcast i8** [[X]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[XPTR1]])
id x = [[Test3 alloc] initWith: 5];
@@ -170,8 +162,7 @@ void test3() {
// Cleanup for x.
// CHECK-NEXT: [[TMP:%.*]] = load i8*, i8** [[X]]
// CHECK-NEXT: call void @objc_release(i8* [[TMP]]) [[NUW]]
- // CHECK-NEXT: [[XPTR2:%.*]] = bitcast i8** [[X]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.end(i64 8, i8* [[XPTR2]])
+
// CHECK-NEXT: ret void
}
@@ -253,14 +244,10 @@ id test6_helper(void) __attribute__((ns_
// CHECK-LABEL: define void @test6()
void test6() {
// CHECK: [[X:%.*]] = alloca i8*
- // CHECK-NEXT: [[XPTR1:%.*]] = bitcast i8** [[X]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[XPTR1]])
// CHECK-NEXT: [[CALL:%.*]] = call i8* @test6_helper()
// CHECK-NEXT: store i8* [[CALL]], i8** [[X]]
// CHECK-NEXT: [[T1:%.*]] = load i8*, i8** [[X]]
// CHECK-NEXT: call void @objc_release(i8* [[T1]]) [[NUW]], !clang.imprecise_release
- // CHECK-NEXT: [[XPTR2:%.*]] = bitcast i8** [[X]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.end(i64 8, i8* [[XPTR2]])
// CHECK-NEXT: ret void
id x = test6_helper();
}
@@ -269,16 +256,12 @@ void test7_helper(id __attribute__((ns_c
// CHECK-LABEL: define void @test7()
void test7() {
// CHECK: [[X:%.*]] = alloca i8*
- // CHECK-NEXT: [[XPTR1:%.*]] = bitcast i8** [[X]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[XPTR1]])
// CHECK-NEXT: store i8* null, i8** [[X]]
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[X]]
// CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retain(i8* [[T0]]) [[NUW]]
// CHECK-NEXT: call void @test7_helper(i8* [[T1]])
// CHECK-NEXT: [[T1:%.*]] = load i8*, i8** [[X]]
// CHECK-NEXT: call void @objc_release(i8* [[T1]]) [[NUW]], !clang.imprecise_release
- // CHECK-NEXT: [[XPTR2:%.*]] = bitcast i8** [[X]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.end(i64 8, i8* [[XPTR2]])
// CHECK-NEXT: ret void
id x;
test7_helper(x);
@@ -288,13 +271,9 @@ id test8_helper(void) __attribute__((ns_
void test8() {
__unsafe_unretained id x = test8_helper();
// CHECK: [[X:%.*]] = alloca i8*
- // CHECK-NEXT: [[XPTR1:%.*]] = bitcast i8** [[X]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[XPTR1]])
// CHECK-NEXT: [[T0:%.*]] = call i8* @test8_helper()
// CHECK-NEXT: store i8* [[T0]], i8** [[X]]
// CHECK-NEXT: call void @objc_release(i8* [[T0]]) [[NUW]], !clang.imprecise_release
- // CHECK-NEXT: [[XPTR2:%.*]] = bitcast i8** [[X]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.end(i64 8, i8* [[XPTR2]])
// CHECK-NEXT: ret void
}
@@ -308,11 +287,7 @@ void test10() {
// CHECK-LABEL: define void @test10()
// CHECK: [[X:%.*]] = alloca [[TEST10:%.*]]*, align
// CHECK-NEXT: [[Y:%.*]] = alloca i8*, align
- // CHECK-NEXT: [[XPTR1:%.*]] = bitcast [[TEST10]]** [[X]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[XPTR1]])
// CHECK-NEXT: store [[TEST10]]* null, [[TEST10]]** [[X]]
- // CHECK-NEXT: [[YPTR1:%.*]] = bitcast i8** [[Y]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[YPTR1]])
// CHECK-NEXT: load [[TEST10]]*, [[TEST10]]** [[X]], align
// CHECK-NEXT: load i8*, i8** @OBJC_SELECTOR_REFERENCES_{{[0-9]*}}
// CHECK-NEXT: bitcast
@@ -332,13 +307,9 @@ void test10() {
// CHECK-NEXT: call void @objc_release(i8* [[T0]])
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[Y]]
// CHECK-NEXT: call void @objc_release(i8* [[T0]])
- // CHECK-NEXT: [[YPTR2:%.*]] = bitcast i8** [[Y]] to i8*
- // CHECK-NEXT: void @llvm.lifetime.end(i64 8, i8* [[YPTR2]])
// CHECK-NEXT: [[T0:%.*]] = load [[TEST10]]*, [[TEST10]]** [[X]]
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST10]]* [[T0]] to i8*
// CHECK-NEXT: call void @objc_release(i8* [[T1]])
- // CHECK-NEXT: [[XPTR2:%.*]] = bitcast [[TEST10]]** [[X]] to i8*
- // CHECK-NEXT: void @llvm.lifetime.end(i64 8, i8* [[XPTR2]])
// CHECK-NEXT: ret void
}
@@ -347,15 +318,11 @@ void test11(id (*f)(void) __attribute__(
// CHECK: [[F:%.*]] = alloca i8* ()*, align
// CHECK-NEXT: [[X:%.*]] = alloca i8*, align
// CHECK-NEXT: store i8* ()* {{%.*}}, i8* ()** [[F]], align
- // CHECK-NEXT: [[XPTR1:%.*]] = bitcast i8** [[X]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[XPTR1]])
// CHECK-NEXT: [[T0:%.*]] = load i8* ()*, i8* ()** [[F]], align
// CHECK-NEXT: [[T1:%.*]] = call i8* [[T0]]()
// CHECK-NEXT: store i8* [[T1]], i8** [[X]], align
// CHECK-NEXT: [[T3:%.*]] = load i8*, i8** [[X]]
// CHECK-NEXT: call void @objc_release(i8* [[T3]]) [[NUW]], !clang.imprecise_release
- // CHECK-NEXT: [[XPTR2:%.*]] = bitcast i8** [[X]] to i8*
- // CHECK-NEXT: void @llvm.lifetime.end(i64 8, i8* [[XPTR2]])
// CHECK-NEXT: ret void
id x = f();
}
@@ -368,8 +335,6 @@ void test12(void) {
// CHECK-NEXT: [[Y:%.*]] = alloca i8*, align
__weak id x = test12_helper();
- // CHECK-NEXT: [[XPTR1:%.*]] = bitcast i8** [[X]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[XPTR1]])
// CHECK-NEXT: [[T0:%.*]] = call i8* @test12_helper()
// CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
// CHECK-NEXT: call i8* @objc_initWeak(i8** [[X]], i8* [[T1]])
@@ -382,18 +347,12 @@ void test12(void) {
// CHECK-NEXT: call void @objc_release(i8* [[T1]])
id y = x;
- // CHECK-NEXT: [[YPTR1:%.*]] = bitcast i8** [[Y]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[YPTR1]])
// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_loadWeakRetained(i8** [[X]])
// CHECK-NEXT: store i8* [[T2]], i8** [[Y]], align
// CHECK-NEXT: [[T4:%.*]] = load i8*, i8** [[Y]]
// CHECK-NEXT: call void @objc_release(i8* [[T4]]) [[NUW]], !clang.imprecise_release
- // CHECK-NEXT: [[YPTR2:%.*]] = bitcast i8** [[Y]] to i8*
- // CHECK-NEXT: void @llvm.lifetime.end(i64 8, i8* [[YPTR2]])
// CHECK-NEXT: call void @objc_destroyWeak(i8** [[X]])
- // CHECK-NEXT: [[XPTR2:%.*]] = bitcast i8** [[X]] to i8*
- // CHECK-NEXT: void @llvm.lifetime.end(i64 8, i8* [[XPTR2]])
// CHECK: ret void
}
@@ -401,8 +360,6 @@ void test12(void) {
void test13(void) {
// CHECK-LABEL: define void @test13()
// CHECK: [[X:%.*]] = alloca i8*, align
- // CHECK-NEXT: [[XPTR1:%.*]] = bitcast i8** [[X]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[XPTR1]])
// CHECK-NEXT: store i8* null, i8** [[X]], align
id x;
@@ -428,8 +385,6 @@ void test13(void) {
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[X]]
// CHECK-NEXT: call void @objc_release(i8* [[T0]]) [[NUW]]
- // CHECK-NEXT: [[XPTR2:%.*]] = bitcast i8** [[X]] to i8*
- // CHECK-NEXT: void @llvm.lifetime.end(i64 8, i8* [[XPTR2]])
// CHECK-NEXT: ret void
}
@@ -662,6 +617,7 @@ void test21(unsigned n) {
// CHECK: define internal i8* @"\01-[Test27 init]"
// CHECK: [[SELF:%.*]] = alloca [[TEST27:%.*]]*,
// CHECK-NEXT: [[CMD:%.*]] = alloca i8*,
+// CHECK-NEXT: [[DEST:%.*]] = alloca i32
// CHECK-NEXT: store [[TEST27]]* {{%.*}}, [[TEST27]]** [[SELF]]
// CHECK-NEXT: store i8* {{%.*}}, i8** [[CMD]]
// CHECK-NEXT: [[T0:%.*]] = load [[TEST27]]*, [[TEST27]]** [[SELF]]
@@ -669,6 +625,7 @@ void test21(unsigned n) {
// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retain(i8* [[T1]])
// CHECK-NEXT: [[T3:%.*]] = bitcast i8* [[T2]] to [[TEST27]]*
// CHECK-NEXT: [[RET:%.*]] = bitcast [[TEST27]]* [[T3]] to i8*
+// CHECK-NEXT: store i32 {{[0-9]+}}, i32* [[DEST]]
// CHECK-NEXT: [[T0:%.*]] = load [[TEST27]]*, [[TEST27]]** [[SELF]]
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST27]]* [[T0]] to i8*
// CHECK-NEXT: call void @objc_release(i8* [[T1]])
@@ -705,6 +662,7 @@ static id _test29_allocator = 0;
// CHECK: define internal i8* @"\01-[Test29 init]"([[TEST29:%[^*]*]]* {{%.*}},
// CHECK: [[SELF:%.*]] = alloca [[TEST29]]*, align 8
// CHECK-NEXT: [[CMD:%.*]] = alloca i8*, align 8
+// CHECK-NEXT: [[CLEANUP:%.*]] = alloca i32
// CHECK-NEXT: store [[TEST29]]* {{%.*}}, [[TEST29]]** [[SELF]]
// CHECK-NEXT: store i8* {{%.*}}, i8** [[CMD]]
@@ -733,6 +691,7 @@ static id _test29_allocator = 0;
// CHECK-NEXT: [[T0:%.*]] = call i8* @objc_retain(i8* [[CALL]]) [[NUW]]
// CHECK-NEXT: [[T1:%.*]] = bitcast i8* [[T0]] to [[TEST29]]*
// CHECK-NEXT: [[RET:%.*]] = bitcast [[TEST29]]* [[T1]] to i8*
+// CHECK-NEXT: store i32 1, i32* [[CLEANUP]]
// Cleanup.
// CHECK-NEXT: [[T0:%.*]] = load [[TEST29]]*, [[TEST29]]** [[SELF]]
@@ -749,6 +708,7 @@ static id _test29_allocator = 0;
// CHECK-NEXT: [[CMD:%.*]] = alloca i8*, align 8
// CHECK-NEXT: [[ALLOCATOR:%.*]] = alloca i8*, align 8
// CHECK-NEXT: alloca
+// CHECK-NEXT: [[CLEANUP:%.*]] = alloca i32
// CHECK-NEXT: store [[TEST29]]* {{%.*}}, [[TEST29]]** [[SELF]]
// CHECK-NEXT: store i8* {{%.*}}, i8** [[CMD]]
// CHECK-NEXT: [[T0:%.*]] = call i8* @objc_retain(i8* {{%.*}})
@@ -787,6 +747,7 @@ static id _test29_allocator = 0;
// CHECK-NEXT: [[T0:%.*]] = call i8* @objc_retain(i8* [[T1]]) [[NUW]]
// CHECK-NEXT: [[T1:%.*]] = bitcast i8* [[T0]] to [[TEST29]]*
// CHECK-NEXT: [[RET:%.*]] = bitcast [[TEST29]]* [[T1]] to i8*
+// CHECK-NEXT: store i32 1, i32* [[CLEANUP]]
// Cleanup.
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[ALLOCATOR]]
@@ -815,6 +776,7 @@ char *helper;
// CHECK: define internal i8* @"\01-[Test30 init]"([[TEST30:%[^*]*]]* {{%.*}},
// CHECK: [[RET:%.*]] = alloca [[TEST30]]*
// CHECK-NEXT: alloca i8*
+// CHECK-NEXT: alloca i32
// CHECK-NEXT: store [[TEST30]]* {{%.*}}, [[TEST30]]** [[SELF]]
// CHECK-NEXT: store
@@ -842,6 +804,7 @@ char *helper;
// CHECK-NEXT: [[T0:%.*]] = call i8* @objc_retain(i8* [[T1]])
// CHECK-NEXT: [[T1:%.*]] = bitcast i8* [[T0]] to [[TEST30]]*
// CHECK-NEXT: [[RET:%.*]] = bitcast [[TEST30]]* [[T1]] to i8*
+// CHECK-NEXT: store i32 1
// Cleanup.
// CHECK-NEXT: [[T0:%.*]] = load [[TEST30]]*, [[TEST30]]** [[SELF]]
@@ -900,8 +863,6 @@ void test33(Test33 *ptr) {
// CHECK-NEXT: objc_retain
// CHECK-NEXT: bitcast
// CHECK-NEXT: store
- // CHECK-NEXT: bitcast
- // CHECK-NEXT: call void @llvm.lifetime.start
// CHECK-NEXT: store [[A_T]]* null, [[A_T]]** [[A]]
// CHECK-NEXT: load [[TEST33]]*, [[TEST33]]** [[PTR]]
@@ -964,8 +925,6 @@ void test33(Test33 *ptr) {
// CHECK-NEXT: load
// CHECK-NEXT: bitcast
// CHECK-NEXT: objc_release
- // CHECK-NEXT: bitcast
- // CHECK-NEXT: call void @llvm.lifetime.end
// CHECK-NEXT: load
// CHECK-NEXT: bitcast
// CHECK-NEXT: objc_release
@@ -1004,8 +963,6 @@ void test37(void) {
// CHECK-LABEL: define void @test37()
// CHECK: [[VAR:%.*]] = alloca [[TEST37:%.*]]*,
// CHECK-NEXT: [[TEMP:%.*]] = alloca i8*
- // CHECK-NEXT: [[VARPTR1:%.*]] = bitcast [[TEST37]]** [[VAR]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[VARPTR1]])
// CHECK-NEXT: store [[TEST37]]* null, [[TEST37]]** [[VAR]]
// CHECK-NEXT: [[W0:%.*]] = load [[TEST37]]*, [[TEST37]]** [[VAR]]
@@ -1026,8 +983,6 @@ void test37(void) {
// CHECK-NEXT: [[T0:%.*]] = load [[TEST37]]*, [[TEST37]]** [[VAR]]
// CHECK-NEXT: [[T1:%.*]] = bitcast [[TEST37]]* [[T0]] to i8*
// CHECK-NEXT: call void @objc_release(i8* [[T1]])
- // CHECK-NEXT: [[VARPTR2:%.*]] = bitcast [[TEST37]]** [[VAR]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.end(i64 8, i8* [[VARPTR2]])
// CHECK-NEXT: ret void
}
@@ -1084,8 +1039,6 @@ void test47(void) {
// CHECK-LABEL: define void @test47()
// CHECK: [[X:%.*]] = alloca i8*
- // CHECK-NEXT: [[XPTR1:%.*]] = bitcast i8** [[X]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[XPTR1]])
// CHECK-NEXT: store i8* null, i8** [[X]]
// CHECK-NEXT: [[CALL:%.*]] = call i8* @test47_helper()
// CHECK-NEXT: [[T0:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[CALL]])
@@ -1098,8 +1051,6 @@ void test47(void) {
// CHECK-NEXT: call void @objc_release(i8* [[T3]])
// CHECK-NEXT: [[T4:%.*]] = load i8*, i8** [[X]]
// CHECK-NEXT: call void @objc_release(i8* [[T4]])
- // CHECK-NEXT: [[XPTR2:%.*]] = bitcast i8** [[X]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.end(i64 8, i8* [[XPTR2]])
// CHECK-NEXT: ret void
}
@@ -1108,8 +1059,6 @@ void test48(void) {
__weak id x = x = test48_helper();
// CHECK-LABEL: define void @test48()
// CHECK: [[X:%.*]] = alloca i8*
- // CHECK-NEXT: [[XPTR1:%.*]] = bitcast i8** [[X]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[XPTR1]])
// CHECK-NEXT: [[T0:%.*]] = call i8* @objc_initWeak(i8** [[X]], i8* null)
// CHECK-NEXT: [[T1:%.*]] = call i8* @test48_helper()
// CHECK-NEXT: [[T2:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T1]])
@@ -1117,8 +1066,6 @@ void test48(void) {
// CHECK-NEXT: [[T4:%.*]] = call i8* @objc_storeWeak(i8** [[X]], i8* [[T3]])
// CHECK-NEXT: call void @objc_release(i8* [[T2]])
// CHECK-NEXT: call void @objc_destroyWeak(i8** [[X]])
- // CHECK-NEXT: [[XPTR2:%.*]] = bitcast i8** [[X]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.end(i64 8, i8* [[XPTR2]])
// CHECK-NEXT: ret void
}
@@ -1127,8 +1074,6 @@ void test49(void) {
__autoreleasing id x = x = test49_helper();
// CHECK-LABEL: define void @test49()
// CHECK: [[X:%.*]] = alloca i8*
- // CHECK-NEXT: [[XPTR1:%.*]] = bitcast i8** [[X]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[XPTR1]])
// CHECK-NEXT: store i8* null, i8** [[X]]
// CHECK-NEXT: [[CALL:%.*]] = call i8* @test49_helper()
// CHECK-NEXT: [[T0:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[CALL]])
@@ -1136,8 +1081,6 @@ void test49(void) {
// CHECK-NEXT: store i8* [[T2]], i8** [[X]]
// CHECK-NEXT: [[T3:%.*]] = call i8* @objc_retainAutorelease(i8* [[T1]])
// CHECK-NEXT: store i8* [[T3]], i8** [[X]]
- // CHECK-NEXT: [[XPTR2:%.*]] = bitcast i8** [[X]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.end(i64 8, i8* [[XPTR2]])
// CHECK-NEXT: ret void
}
@@ -1173,14 +1116,10 @@ id test52(void) {
// CHECK-LABEL: define i8* @test52()
// CHECK: [[X:%.*]] = alloca i32
// CHECK-NEXT: [[TMPALLOCA:%.*]] = alloca i8*
-// CHECK-NEXT: [[XPTR1:%.*]] = bitcast i32* [[X]] to i8*
-// CHECK-NEXT: call void @llvm.lifetime.start(i64 4, i8* [[XPTR1]])
// CHECK-NEXT: store i32 5, i32* [[X]],
// CHECK-NEXT: [[T0:%.*]] = load i32, i32* [[X]],
// CHECK-NEXT: [[T1:%.*]] = call i8* @test52_helper(i32 [[T0]])
// CHECK-NEXT: store i8* [[T1]], i8** [[TMPALLOCA]]
-// CHECK-NEXT: [[XPTR2:%.*]] = bitcast i32* [[X]] to i8*
-// CHECK-NEXT: call void @llvm.lifetime.end(i64 4, i8* [[XPTR2]])
// CHECK-NEXT: [[T2:%.*]] = load i8*, i8** [[TMPALLOCA]]
// CHECK-NEXT: [[T3:%.*]] = tail call i8* @objc_autoreleaseReturnValue(i8* [[T2]])
// CHECK-NEXT: ret i8* [[T3]]
@@ -1195,10 +1134,6 @@ void test53(void) {
// CHECK: [[X:%.*]] = alloca i8*,
// CHECK-NEXT: [[Y:%.*]] = alloca i8*,
// CHECK-NEXT: [[TMPALLOCA:%.*]] = alloca i8*,
-// CHECK-NEXT: [[XPTR1:%.*]] = bitcast i8** [[X]] to i8*
-// CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[XPTR1]])
-// CHECK-NEXT: [[YPTR1:%.*]] = bitcast i8** [[Y]] to i8*
-// CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[YPTR1]])
// CHECK-NEXT: [[T0:%.*]] = call i8* @test53_helper()
// CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
// CHECK-NEXT: store i8* [[T1]], i8** [[Y]],
@@ -1207,15 +1142,11 @@ void test53(void) {
// CHECK-NEXT: store i8* [[T1]], i8** [[TMPALLOCA]]
// CHECK-NEXT: [[T2:%.*]] = load i8*, i8** [[Y]]
// CHECK-NEXT: call void @objc_release(i8* [[T2]])
-// CHECK-NEXT: [[YPTR2:%.*]] = bitcast i8** [[Y]] to i8*
-// CHECK-NEXT: call void @llvm.lifetime.end(i64 8, i8* [[YPTR2]])
// CHECK-NEXT: [[T3:%.*]] = load i8*, i8** [[TMPALLOCA]]
// CHECK-NEXT: store i8* [[T3]], i8** [[X]],
// CHECK-NEXT: load i8*, i8** [[X]],
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[X]]
// CHECK-NEXT: call void @objc_release(i8* [[T0]])
-// CHECK-NEXT: [[XPTR2:%.*]] = bitcast i8** [[X]] to i8*
-// CHECK-NEXT: call void @llvm.lifetime.end(i64 8, i8* [[XPTR2]])
// CHECK-NEXT: ret void
}
@@ -1262,14 +1193,10 @@ void test56_test(void) {
id x = [Test56 make];
// CHECK-LABEL: define void @test56_test()
// CHECK: [[X:%.*]] = alloca i8*, align 8
- // CHECK-NEXT: [[XPTR1:%.*]] = bitcast i8** [[X]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[XPTR1]])
// CHECK: [[T0:%.*]] = call i8* bitcast (i8* (i8*, i8*, ...)* @objc_msgSend to i8* (i8*, i8*)*)(
// CHECK-NEXT: store i8* [[T0]], i8** [[X]]
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[X]]
// CHECK-NEXT: call void @objc_release(i8* [[T0]])
- // CHECK-NEXT: [[XPTR2:%.*]] = bitcast i8** [[X]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.end(i64 8, i8* [[XPTR2]])
// CHECK-NEXT: ret void
}
@@ -1349,8 +1276,6 @@ void test61(void) {
// CHECK-NEXT: call void @objc_release(i8* [[T1]])
[test61_make() performSelector: @selector(test61_void)];
- // CHECK-NEXT: [[YPTR1:%.*]] = bitcast i8** [[Y]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[YPTR1]])
// CHECK-NEXT: [[T0:%.*]] = call i8* @test61_make()
// CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
// CHECK-NEXT: [[T2:%.*]] = load i8*, i8** @OBJC_SELECTOR_REFERENCES_
@@ -1363,8 +1288,6 @@ void test61(void) {
// CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[Y]]
// CHECK-NEXT: call void @objc_release(i8* [[T0]])
- // CHECK-NEXT: [[YPTR2:%.*]] = bitcast i8** [[Y]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.end(i64 8, i8* [[YPTR2]])
// CHECK-NEXT: ret void
}
@@ -1377,8 +1300,6 @@ void test62(void) {
extern id test62_make(void);
extern void test62_body(void);
- // CHECK-NEXT: [[IPTR:%.*]] = bitcast i32* [[I]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 4, i8* [[IPTR]])
// CHECK-NEXT: store i32 0, i32* [[I]], align 4
// CHECK-NEXT: br label
@@ -1470,12 +1391,8 @@ void test67(void) {
}
// CHECK-LABEL: define void @test67()
// CHECK: [[CL:%.*]] = alloca i8*, align 8
-// CHECK-NEXT: [[CLPTR1:%.*]] = bitcast i8** [[CL]] to i8*
-// CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[CLPTR1]])
// CHECK-NEXT: [[T0:%.*]] = call i8* @test67_helper()
// CHECK-NEXT: store i8* [[T0]], i8** [[CL]], align 8
-// CHECK-NEXT: [[CLPTR2:%.*]] = bitcast i8** [[CL]] to i8*
-// CHECK-NEXT: call void @llvm.lifetime.end(i64 8, i8* [[CLPTR2]])
// CHECK-NEXT: ret void
Class test68_helper(void);
@@ -1484,15 +1401,11 @@ void test68(void) {
}
// CHECK-LABEL: define void @test68()
// CHECK: [[CL:%.*]] = alloca i8*, align 8
-// CHECK-NEXT: [[CLPTR1:%.*]] = bitcast i8** [[CL]] to i8*
-// CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[CLPTR1]])
// CHECK-NEXT: [[T0:%.*]] = call i8* @test67_helper()
// CHECK-NEXT: [[T1:%.*]] = call i8* @objc_retainAutoreleasedReturnValue(i8* [[T0]])
// CHECK-NEXT: store i8* [[T1]], i8** [[CL]], align 8
// CHECK-NEXT: [[T2:%.*]] = load i8*, i8** [[CL]]
// CHECK-NEXT: call void @objc_release(i8* [[T2]])
-// CHECK-NEXT: [[CLPTR2:%.*]] = bitcast i8** [[CL]] to i8*
-// CHECK-NEXT: call void @llvm.lifetime.end(i64 8, i8* [[CLPTR2]])
// CHECK-NEXT: ret void
// rdar://problem/10564852
Modified: cfe/trunk/test/CodeGenObjC/exceptions.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/exceptions.m?rev=234700&r1=234699&r2=234700&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/exceptions.m (original)
+++ cfe/trunk/test/CodeGenObjC/exceptions.m Sat Apr 11 18:51:38 2015
@@ -82,8 +82,6 @@ void f3() {
extern void f3_helper(int, int*);
// CHECK: [[X:%.*]] = alloca i32
- // CHECK: [[XPTR:%.*]] = bitcast i32* [[X]] to i8*
- // CHECK: call void @llvm.lifetime.start(i64 4, i8* [[XPTR]])
// CHECK: store i32 0, i32* [[X]]
int x = 0;
@@ -124,7 +122,6 @@ void f3() {
}
// CHECK: call void @f3_helper(i32 4, i32* [[X]])
- // CHECK-NEXT: call void @llvm.lifetime.end(i64 4, i8* [[XPTR]])
// CHECK-NEXT: ret void
f3_helper(4, &x);
}
Modified: cfe/trunk/test/CodeGenObjCXX/arc-move.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/arc-move.mm?rev=234700&r1=234699&r2=234700&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjCXX/arc-move.mm (original)
+++ cfe/trunk/test/CodeGenObjCXX/arc-move.mm Sat Apr 11 18:51:38 2015
@@ -46,10 +46,6 @@ void library_move(__strong id &x, __stro
// CHECK-LABEL: define void @_Z12library_moveRU8__strongP11objc_object
void library_move(__strong id &y) {
- // CHECK: [[X:%.*]] = alloca i8*, align 8
- // CHECK: [[I:%.*]] = alloca i32, align 4
- // CHECK: [[XPTR1:%.*]] = bitcast i8** [[X]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[XPTR1]])
// CHECK: [[Y:%[a-zA-Z0-9]+]] = call dereferenceable({{[0-9]+}}) i8** @_Z4moveIRU8__strongP11objc_objectEON16remove_referenceIT_E4typeEOS5_
// Load the object
// CHECK-NEXT: [[OBJ:%[a-zA-Z0-9]+]] = load i8*, i8** [[Y]]
@@ -59,16 +55,10 @@ void library_move(__strong id &y) {
// CHECK-NEXT: store i8* [[OBJ]], i8** [[X:%[a-zA-Z0-9]+]]
id x = move(y);
- // CHECK-NEXT: [[IPTR1:%.*]] = bitcast i32* [[I]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 4, i8* [[IPTR1]])
// CHECK-NEXT: store i32 17
int i = 17;
- // CHECK-NEXT: [[IPTR2:%.*]] = bitcast i32* [[I]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.end(i64 4, i8* [[IPTR2]])
// CHECK-NEXT: [[OBJ:%[a-zA-Z0-9]+]] = load i8*, i8** [[X]]
// CHECK-NEXT: call void @objc_release(i8* [[OBJ]])
- // CHECK-NEXT: [[XPTR2:%.*]] = bitcast i8** [[X]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.end(i64 8, i8* [[XPTR2]])
// CHECK-NEXT: ret void
}
Modified: cfe/trunk/test/CodeGenObjCXX/arc-references.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/arc-references.mm?rev=234700&r1=234699&r2=234700&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjCXX/arc-references.mm (original)
+++ cfe/trunk/test/CodeGenObjCXX/arc-references.mm Sat Apr 11 18:51:38 2015
@@ -38,14 +38,11 @@ typedef __strong id strong_id;
//CHECK: define void @_Z5test3v
void test3() {
- // CHECK: [[REF:%.*]] = alloca i8**, align 8
// CHECK: call i8* @objc_initWeak
// CHECK-NEXT: store i8**
const __weak id &ref = strong_id();
// CHECK-NEXT: call void @_Z6calleev()
callee();
- // CHECK-NEXT: [[PTR:%.*]] = bitcast i8*** [[REF]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.end(i64 8, i8* [[PTR]])
// CHECK-NEXT: call void @objc_destroyWeak
// CHECK-NEXT: ret void
}
@@ -65,7 +62,6 @@ void sink(__strong A* &&);
// CHECK-LABEL: define void @_Z5test5RU8__strongP11objc_object
void test5(__strong id &x) {
// CHECK: [[REFTMP:%.*]] = alloca {{%.*}}*, align 8
- // CHECK: [[I:%.*]] = alloca i32, align 4
// CHECK: [[OBJ_ID:%.*]] = call i8* @objc_retain(
// CHECK-NEXT: [[OBJ_A:%.*]] = bitcast i8* [[OBJ_ID]] to [[A:%[a-zA-Z0-9]+]]*
// CHECK-NEXT: store [[A]]* [[OBJ_A]], [[A]]** [[REFTMP:%[a-zA-Z0-9]+]]
@@ -74,12 +70,8 @@ void test5(__strong id &x) {
// CHECK-NEXT: [[OBJ_A:%[a-zA-Z0-9]+]] = load [[A]]*, [[A]]** [[REFTMP]]
// CHECK-NEXT: [[OBJ_ID:%[a-zA-Z0-9]+]] = bitcast [[A]]* [[OBJ_A]] to i8*
// CHECK-NEXT: call void @objc_release
- // CHECK-NEXT: [[IPTR1:%.*]] = bitcast i32* [[I]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 4, i8* [[IPTR1]])
// CHECK-NEXT: store i32 17, i32
int i = 17;
- // CHECK-NEXT: [[IPTR2:%.*]] = bitcast i32* [[I]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.end(i64 4, i8* [[IPTR2]])
// CHECK-NEXT: ret void
}
Modified: cfe/trunk/test/CodeGenObjCXX/arc.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/arc.mm?rev=234700&r1=234699&r2=234700&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjCXX/arc.mm (original)
+++ cfe/trunk/test/CodeGenObjCXX/arc.mm Sat Apr 11 18:51:38 2015
@@ -64,11 +64,7 @@ void test34(int cond) {
// CHECK-NEXT: [[CONDCLEANUPSAVE:%.*]] = alloca i8*
// CHECK-NEXT: [[CONDCLEANUP:%.*]] = alloca i1
// CHECK-NEXT: store i32
- // CHECK-NEXT: [[STRONGP:%.*]] = bitcast i8** [[STRONG]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[STRONGP]])
// CHECK-NEXT: store i8* null, i8** [[STRONG]]
- // CHECK-NEXT: [[WEAKP:%.*]] = bitcast i8** [[WEAK]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[WEAKP]])
// CHECK-NEXT: call i8* @objc_initWeak(i8** [[WEAK]], i8* null)
// CHECK-NEXT: [[T0:%.*]] = load i32, i32* [[COND]]
@@ -124,77 +120,56 @@ struct Test35_Helper {
// CHECK-LABEL: define void @_Z6test3513Test35_HelperPS_
void test35(Test35_Helper x0, Test35_Helper *x0p) {
- // CHECK: call void @llvm.lifetime.start
// CHECK: call i8* @_ZN13Test35_Helper11makeObject1Ev
// CHECK-NOT: call i8* @objc_retain
id obj1 = Test35_Helper::makeObject1();
- // CHECK: call void @llvm.lifetime.start
// CHECK: call i8* @_ZN13Test35_Helper11makeObject2Ev
// CHECK-NOT: call i8* @objc_retain
id obj2 = x0.makeObject2();
- // CHECK: call void @llvm.lifetime.start
// CHECK: call i8* @_ZN13Test35_Helper11makeObject2Ev
// CHECK-NOT: call i8* @objc_retain
id obj3 = x0p->makeObject2();
id (Test35_Helper::*pmf)() __attribute__((ns_returns_retained))
= &Test35_Helper::makeObject2;
- // CHECK: call void @llvm.lifetime.start
// CHECK: call i8* %
// CHECK-NOT: call i8* @objc_retain
id obj4 = (x0.*pmf)();
- // CHECK: call void @llvm.lifetime.start
// CHECK: call i8* %
// CHECK-NOT: call i8* @objc_retain
id obj5 = (x0p->*pmf)();
// CHECK: call void @objc_release
- // CHECK: call void @llvm.lifetime.end
// CHECK: call void @objc_release
- // CHECK: call void @llvm.lifetime.end
// CHECK: call void @objc_release
- // CHECK: call void @llvm.lifetime.end
// CHECK: call void @objc_release
- // CHECK: call void @llvm.lifetime.end
// CHECK: call void @objc_release
- // CHECK: call void @llvm.lifetime.end
// CHECK-NEXT: ret void
}
// CHECK-LABEL: define void @_Z7test35b13Test35_HelperPS_
void test35b(Test35_Helper x0, Test35_Helper *x0p) {
- // CHECK: call void @llvm.lifetime.start
// CHECK: call i8* @_ZN13Test35_Helper11makeObject3Ev
// CHECK: call i8* @objc_retain
id obj1 = Test35_Helper::makeObject3();
- // CHECK: call void @llvm.lifetime.start
// CHECK: call i8* @_ZN13Test35_Helper11makeObject4Ev
// CHECK: call i8* @objc_retain
id obj2 = x0.makeObject4();
- // CHECK: call void @llvm.lifetime.start
// CHECK: call i8* @_ZN13Test35_Helper11makeObject4Ev
// CHECK: call i8* @objc_retain
id obj3 = x0p->makeObject4();
id (Test35_Helper::*pmf)() = &Test35_Helper::makeObject4;
- // CHECK: call void @llvm.lifetime.start
// CHECK: call i8* %
// CHECK: call i8* @objc_retain
id obj4 = (x0.*pmf)();
- // CHECK: call void @llvm.lifetime.start
// CHECK: call i8* %
// CHECK: call i8* @objc_retain
id obj5 = (x0p->*pmf)();
// CHECK: call void @objc_release
- // CHECK: call void @llvm.lifetime.end
// CHECK: call void @objc_release
- // CHECK: call void @llvm.lifetime.end
- // CHECK: call void @llvm.lifetime.end
// CHECK: call void @objc_release
- // CHECK: call void @llvm.lifetime.end
// CHECK: call void @objc_release
- // CHECK: call void @llvm.lifetime.end
// CHECK: call void @objc_release
- // CHECK: call void @llvm.lifetime.end
// CHECK-NEXT: ret void
}
@@ -315,8 +290,6 @@ template void test40_helper<int>();
// CHECK-LABEL: define weak_odr void @_Z13test40_helperIiEvv()
// CHECK: [[X:%.*]] = alloca i8*
// CHECK-NEXT: [[TEMP:%.*]] = alloca i8*
-// CHECK-NEXT: [[XP:%.*]] = bitcast i8** [[X]] to i8*
-// CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[XP]])
// CHECK-NEXT: store i8* null, i8** [[X]]
// CHECK: [[T0:%.*]] = load i8*, i8** [[X]]
// CHECK-NEXT: store i8* [[T0]], i8** [[TEMP]]
Modified: cfe/trunk/test/CodeGenObjCXX/literals.mm
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjCXX/literals.mm?rev=234700&r1=234699&r2=234700&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjCXX/literals.mm (original)
+++ cfe/trunk/test/CodeGenObjCXX/literals.mm Sat Apr 11 18:51:38 2015
@@ -16,12 +16,9 @@ struct Y {
// CHECK-LABEL: define void @_Z10test_arrayv
void test_array() {
- // CHECK: [[ARR:%[a-zA-Z0-9.]+]] = alloca i8*
// CHECK: [[OBJECTS:%[a-zA-Z0-9.]+]] = alloca [2 x i8*]
// Initializing first element
- // CHECK: [[PTR1:%.*]] = bitcast i8** [[ARR]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[PTR1]])
// CHECK: [[ELEMENT0:%[a-zA-Z0-9.]+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[OBJECTS]], i32 0, i32 0
// CHECK-NEXT: call void @_ZN1XC1Ev
// CHECK-NEXT: [[OBJECT0:%[a-zA-Z0-9.]+]] = invoke i8* @_ZNK1XcvP11objc_objectEv
@@ -50,8 +47,6 @@ void test_array() {
// CHECK-NEXT: call void @_ZN1XD1Ev
// CHECK-NOT: ret void
// CHECK: call void @objc_release
- // CHECK-NEXT: [[PTR2:%.*]] = bitcast i8** [[ARR]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.end(i64 8, i8* [[PTR2]])
// CHECK-NEXT: ret void
// Check cleanups
@@ -68,12 +63,9 @@ void test_array() {
// CHECK-LABEL: define weak_odr void @_Z24test_array_instantiationIiEvv
template<typename T>
void test_array_instantiation() {
- // CHECK: [[ARR:%[a-zA-Z0-9.]+]] = alloca i8*
// CHECK: [[OBJECTS:%[a-zA-Z0-9.]+]] = alloca [2 x i8*]
// Initializing first element
- // CHECK: [[PTR1:%.*]] = bitcast i8** [[ARR]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.start(i64 8, i8* [[PTR1]])
// CHECK: [[ELEMENT0:%[a-zA-Z0-9.]+]] = getelementptr inbounds [2 x i8*], [2 x i8*]* [[OBJECTS]], i32 0, i32 0
// CHECK-NEXT: call void @_ZN1XC1Ev
// CHECK-NEXT: [[OBJECT0:%[a-zA-Z0-9.]+]] = invoke i8* @_ZNK1XcvP11objc_objectEv
@@ -102,8 +94,6 @@ void test_array_instantiation() {
// CHECK-NEXT: call void @_ZN1XD1Ev
// CHECK-NOT: ret void
// CHECK: call void @objc_release
- // CHECK-NEXT: [[PTR2]] = bitcast i8** [[ARR]] to i8*
- // CHECK-NEXT: call void @llvm.lifetime.end(i64 8, i8* [[PTR2]])
// CHECK-NEXT: ret void
// Check cleanups
More information about the cfe-commits
mailing list