1 ; RUN: llc < %s -march=x86-64 | FileCheck %s
3 %struct.obj = type { i64 }
5 define void @_Z7releaseP3obj(%struct.obj* nocapture %o) nounwind uwtable ssp {
7 ; CHECK: decq (%{{rdi|rcx}})
9 %refcnt = getelementptr inbounds %struct.obj* %o, i64 0, i32 0
10 %0 = load i64* %refcnt, align 8, !tbaa !0
12 store i64 %dec, i64* %refcnt, align 8, !tbaa !0
13 %tobool = icmp eq i64 %dec, 0
14 br i1 %tobool, label %if.end, label %return
16 if.end: ; preds = %entry
17 %1 = bitcast %struct.obj* %o to i8*
18 tail call void @free(i8* %1)
21 return: ; preds = %entry, %if.end
25 declare void @free(i8* nocapture) nounwind
27 !0 = metadata !{metadata !"long", metadata !1}
28 !1 = metadata !{metadata !"omnipotent char", metadata !2}
29 !2 = metadata !{metadata !"Simple C/C++ TBAA", null}