9d2b7ea85257492f9f666787da349d95bc97b51d
[oota-llvm.git] / test / CodeGen / X86 / 2012-10-02-DAGCycle.ll
1 ; RUN: llc -mtriple=i386-apple-macosx -relocation-model=pic < %s
2 ; rdar://12393897
3
4 %TRp = type { i32, %TRH*, i32, i32 }
5 %TRH = type { i8*, i8*, i8*, i8*, {}* }
6
7 define i32 @t(%TRp* inreg %rp) nounwind optsize ssp {
8 entry:
9   %handler = getelementptr inbounds %TRp* %rp, i32 0, i32 1
10   %0 = load %TRH** %handler, align 4
11   %sync = getelementptr inbounds %TRH* %0, i32 0, i32 4
12   %sync12 = load {}** %sync, align 4
13   %1 = bitcast {}* %sync12 to i32 (%TRp*)*
14   %call = tail call i32 %1(%TRp* inreg %rp) nounwind optsize
15   ret i32 %call
16 }