llvm.org GIT mirror llvm / 54c4735
Speculatively revert r138809 in an attempt to fix DragonEgg. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138829 91177308-0d34-0410-b5e6-96231b3b80d8 Owen Anderson 8 years ago
2 changed file(s) with 1 addition(s) and 29 deletion(s). Raw diff Collapse all Expand all
616616 DeleteDeadInstruction(Dead, *MD, &DeadStackObjects);
617617 ++NumFastStores;
618618 MadeChange = true;
619 continue;
619620 }
620
621 continue;
622621 }
623622
624623 // Remove any dead non-memory-mutating instructions.
None ; RUN: opt -dse -S < %s | FileCheck %s
1
2 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
3 target triple = "x86_64-apple-darwin"
4
5 %"class.std::auto_ptr" = type { i32* }
6
7 ; CHECK: @_Z3foov
8 define void @_Z3foov(%"class.std::auto_ptr"* noalias nocapture sret %agg.result) uwtable ssp {
9 _ZNSt8auto_ptrIiED1Ev.exit:
10 %temp.lvalue = alloca %"class.std::auto_ptr", align 8
11 call void @_Z3barv(%"class.std::auto_ptr"* sret %temp.lvalue)
12 %_M_ptr.i.i = getelementptr inbounds %"class.std::auto_ptr"* %temp.lvalue, i64 0, i32 0
13 %tmp.i.i = load i32** %_M_ptr.i.i, align 8, !tbaa !0
14 ; CHECK-NOT: store i32* null
15 store i32* null, i32** %_M_ptr.i.i, align 8, !tbaa !0
16 %_M_ptr.i.i4 = getelementptr inbounds %"class.std::auto_ptr"* %agg.result, i64 0, i32 0
17 store i32* %tmp.i.i, i32** %_M_ptr.i.i4, align 8, !tbaa !0
18 ; CHECK: ret void
19 ret void
20 }
21
22 declare void @_Z3barv(%"class.std::auto_ptr"* sret)
23
24 !0 = metadata !{metadata !"any pointer", metadata !1}
25 !1 = metadata !{metadata !"omnipotent char", metadata !2}
26 !2 = metadata !{metadata !"Simple C/C++ TBAA", null}