brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.0 KiB · f82e3c1 Raw
89 lines · plain
1; RUN: llc -relocation-model=pic < %s | grep -E ': ?\s*$' | sort | uniq -d | count 02target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:64:64-v128:128:128-a0:0:32-n32"3target triple = "thumbv7-apple-darwin10"4 5; This function produces a duplicate LPC label unless special care is taken when duplicating a t2LDRpci_pic instruction.6 7%struct.PlatformMutex = type { i32, [40 x i8] }8%struct.SpinLock = type { %struct.PlatformMutex }9%"struct.WTF::TCMalloc_ThreadCache" = type { i32, ptr, i8, [68 x %"struct.WTF::TCMalloc_ThreadCache_FreeList"], i32, i32, ptr, ptr }10%"struct.WTF::TCMalloc_ThreadCache_FreeList" = type { ptr, i16, i16 }11%struct.__darwin_pthread_handler_rec = type { ptr, ptr, ptr }12%struct._opaque_pthread_t = type { i32, ptr, [596 x i8] }13 14@_ZN3WTFL8heap_keyE = internal global i32 0       ; <ptr> [#uses=1]15@_ZN3WTFL10tsd_initedE.b = internal global i1 false ; <ptr> [#uses=2]16@_ZN3WTFL13pageheap_lockE = internal global %struct.SpinLock { %struct.PlatformMutex { i32 850045863, [40 x i8] zeroinitializer } } ; <ptr> [#uses=1]17@_ZN3WTFL12thread_heapsE = internal global ptr null ; <ptr> [#uses=1]18@llvm.used = appending global [1 x ptr] [ptr @_ZN3WTF20TCMalloc_ThreadCache22CreateCacheIfNecessaryEv], section "llvm.metadata" ; <ptr> [#uses=0]19 20define ptr @_ZN3WTF20TCMalloc_ThreadCache22CreateCacheIfNecessaryEv() nounwind {21entry:22  %0 = tail call  i32 @pthread_mutex_lock(ptr @_ZN3WTFL13pageheap_lockE) nounwind23  %.b24 = load i1, ptr @_ZN3WTFL10tsd_initedE.b, align 4 ; <i1> [#uses=1]24  br i1 %.b24, label %bb5, label %bb625 26bb5:                                              ; preds = %entry27  %1 = tail call  ptr @pthread_self() nounwind28  br label %bb629 30bb6:                                              ; preds = %bb5, %entry31  %me.0 = phi ptr [ %1, %bb5 ], [ null, %entry ] ; <ptr> [#uses=2]32  br label %bb1133 34bb7:                                              ; preds = %bb1135  %2 = getelementptr inbounds %"struct.WTF::TCMalloc_ThreadCache", ptr %h.0, i32 0, i32 136  %3 = load ptr, ptr %2, align 437  %4 = tail call  i32 @pthread_equal(ptr %3, ptr %me.0) nounwind38  %5 = icmp eq i32 %4, 039  br i1 %5, label %bb10, label %bb1440 41bb10:                                             ; preds = %bb742  %6 = getelementptr inbounds %"struct.WTF::TCMalloc_ThreadCache", ptr %h.0, i32 0, i32 643  br label %bb1144 45bb11:                                             ; preds = %bb10, %bb646  %h.0.in = phi ptr [ @_ZN3WTFL12thread_heapsE, %bb6 ], [ %6, %bb10 ] ; <ptr> [#uses=1]47  %h.0 = load ptr, ptr %h.0.in, align 4 ; <ptr> [#uses=4]48  %7 = icmp eq ptr %h.0, null49  br i1 %7, label %bb13, label %bb750 51bb13:                                             ; preds = %bb1152  %8 = tail call  ptr @_ZN3WTF20TCMalloc_ThreadCache7NewHeapEP17_opaque_pthread_t(ptr %me.0) nounwind53  br label %bb1454 55bb14:                                             ; preds = %bb13, %bb756  %heap.1 = phi ptr [ %8, %bb13 ], [ %h.0, %bb7 ] ; <ptr> [#uses=4]57  %9 = tail call  i32 @pthread_mutex_unlock(ptr @_ZN3WTFL13pageheap_lockE) nounwind58  %10 = getelementptr inbounds %"struct.WTF::TCMalloc_ThreadCache", ptr %heap.1, i32 0, i32 259  %11 = load i8, ptr %10, align 460  %toBool15not = icmp eq i8 %11, 0                ; <i1> [#uses=1]61  br i1 %toBool15not, label %bb19, label %bb2262 63bb19:                                             ; preds = %bb1464  %.b = load i1, ptr @_ZN3WTFL10tsd_initedE.b, align 4 ; <i1> [#uses=1]65  br i1 %.b, label %bb21, label %bb2266 67bb21:                                             ; preds = %bb1968  store i8 1, ptr %10, align 469  %12 = load i32, ptr @_ZN3WTFL8heap_keyE, align 470  %13 = tail call  i32 @pthread_setspecific(i32 %12, ptr %heap.1) nounwind71  ret ptr %heap.172 73bb22:                                             ; preds = %bb19, %bb1474  ret ptr %heap.175}76 77declare i32 @pthread_mutex_lock(ptr)78 79declare i32 @pthread_mutex_unlock(ptr)80 81declare hidden ptr @_ZN3WTF20TCMalloc_ThreadCache7NewHeapEP17_opaque_pthread_t(ptr) nounwind82 83declare i32 @pthread_setspecific(i32, ptr)84 85declare ptr @pthread_self()86 87declare i32 @pthread_equal(ptr, ptr)88 89