18ebb3eacSBjorn Pettersson; RUN: opt < %s -passes=globalopt -disable-output 2cee313d2SEric Christopher 3cee313d2SEric Christophertarget datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64" 4cee313d2SEric Christophertarget triple = "i686-apple-darwin8" 5cee313d2SEric Christopher %struct.SFLMutableListItem = type { i16 } 6cee313d2SEric Christopher %struct.__CFDictionary = type opaque 7cee313d2SEric Christopher %struct.__CFString = type opaque 8*d586bd5cSNikita Popov %struct.__builtin_CFString = type { ptr, i32, ptr, i32 } 9*d586bd5cSNikita Popov@_ZZ19SFLGetVisibilityKeyvE19_kSFLLVisibilityKey = internal global ptr null ; <ptr> [#uses=2] 10*d586bd5cSNikita Popov@_ZZ22SFLGetAlwaysVisibleKeyvE22_kSFLLAlwaysVisibleKey = internal global ptr null ; <ptr> [#uses=7] 11cee313d2SEric Christopher@0 = internal constant %struct.__builtin_CFString { 12*d586bd5cSNikita Popov ptr @__CFConstantStringClassReference, 13cee313d2SEric Christopher i32 1992, 14*d586bd5cSNikita Popov ptr @.str, 15*d586bd5cSNikita Popov i32 13 }, section "__DATA,__cfstring" ; <ptr>:0 [#uses=1] 16*d586bd5cSNikita Popov@__CFConstantStringClassReference = external global [0 x i32] ; <ptr> [#uses=1] 17*d586bd5cSNikita Popov@.str = internal constant [14 x i8] c"AlwaysVisible\00" ; <ptr> [#uses=1] 18*d586bd5cSNikita Popov@_ZZ21SFLGetNeverVisibleKeyvE21_kSFLLNeverVisibleKey = internal global ptr null ; <ptr> [#uses=2] 19cee313d2SEric Christopher 20*d586bd5cSNikita Popovdefine ptr @_Z19SFLGetVisibilityKeyv() { 21cee313d2SEric Christopherentry: 22*d586bd5cSNikita Popov %tmp1 = load ptr, ptr @_ZZ19SFLGetVisibilityKeyvE19_kSFLLVisibilityKey ; <ptr> [#uses=1] 23*d586bd5cSNikita Popov ret ptr %tmp1 24cee313d2SEric Christopher} 25cee313d2SEric Christopher 26*d586bd5cSNikita Popovdefine ptr @_Z22SFLGetAlwaysVisibleKeyv() { 27cee313d2SEric Christopherentry: 28*d586bd5cSNikita Popov %tmp1 = load ptr, ptr @_ZZ22SFLGetAlwaysVisibleKeyvE22_kSFLLAlwaysVisibleKey ; <ptr> [#uses=1] 29*d586bd5cSNikita Popov %tmp2 = icmp eq ptr %tmp1, null ; <i1> [#uses=1] 30cee313d2SEric Christopher br i1 %tmp2, label %cond_true, label %cond_next 31cee313d2SEric Christopher 32cee313d2SEric Christophercond_true: ; preds = %entry 33*d586bd5cSNikita Popov store ptr @0, ptr @_ZZ22SFLGetAlwaysVisibleKeyvE22_kSFLLAlwaysVisibleKey 34cee313d2SEric Christopher br label %cond_next 35cee313d2SEric Christopher 36cee313d2SEric Christophercond_next: ; preds = %entry, %cond_true 37*d586bd5cSNikita Popov %tmp4 = load ptr, ptr @_ZZ22SFLGetAlwaysVisibleKeyvE22_kSFLLAlwaysVisibleKey ; <ptr> [#uses=1] 38*d586bd5cSNikita Popov ret ptr %tmp4 39cee313d2SEric Christopher} 40cee313d2SEric Christopher 41*d586bd5cSNikita Popovdefine ptr @_Z21SFLGetNeverVisibleKeyv() { 42cee313d2SEric Christopherentry: 43*d586bd5cSNikita Popov %tmp1 = load ptr, ptr @_ZZ21SFLGetNeverVisibleKeyvE21_kSFLLNeverVisibleKey ; <ptr> [#uses=1] 44*d586bd5cSNikita Popov ret ptr %tmp1 45cee313d2SEric Christopher} 46cee313d2SEric Christopher 47*d586bd5cSNikita Popovdefine ptr @_ZN18SFLMutableListItem18GetPrefsDictionaryEv(ptr %this) { 48cee313d2SEric Christopherentry: 49*d586bd5cSNikita Popov %tmp4 = getelementptr %struct.SFLMutableListItem, ptr %this, i32 0, i32 0 ; <ptr> [#uses=1] 50*d586bd5cSNikita Popov %tmp5 = load i16, ptr %tmp4 ; <i16> [#uses=1] 51cee313d2SEric Christopher %tmp6 = icmp eq i16 %tmp5, 0 ; <i1> [#uses=1] 52cee313d2SEric Christopher br i1 %tmp6, label %cond_next22, label %cond_true 53cee313d2SEric Christopher 54cee313d2SEric Christophercond_true: ; preds = %entry 55*d586bd5cSNikita Popov %tmp9 = load ptr, ptr @_ZZ22SFLGetAlwaysVisibleKeyvE22_kSFLLAlwaysVisibleKey ; <ptr> [#uses=1] 56*d586bd5cSNikita Popov %tmp10 = icmp eq ptr %tmp9, null ; <i1> [#uses=1] 57cee313d2SEric Christopher br i1 %tmp10, label %cond_true13, label %cond_next22 58cee313d2SEric Christopher 59cee313d2SEric Christophercond_true13: ; preds = %cond_true 60*d586bd5cSNikita Popov store ptr @0, ptr @_ZZ22SFLGetAlwaysVisibleKeyvE22_kSFLLAlwaysVisibleKey 61cee313d2SEric Christopher br label %cond_next22 62cee313d2SEric Christopher 63cee313d2SEric Christophercond_next22: ; preds = %entry, %cond_true13, %cond_true 64*d586bd5cSNikita Popov %iftmp.1.0.in = phi ptr [ @_ZZ22SFLGetAlwaysVisibleKeyvE22_kSFLLAlwaysVisibleKey, %cond_true ], [ @_ZZ22SFLGetAlwaysVisibleKeyvE22_kSFLLAlwaysVisibleKey, %cond_true13 ], [ @_ZZ21SFLGetNeverVisibleKeyvE21_kSFLLNeverVisibleKey, %entry ] ; <ptr> [#uses=1] 65*d586bd5cSNikita Popov %iftmp.1.0 = load ptr, ptr %iftmp.1.0.in ; <ptr> [#uses=1] 66*d586bd5cSNikita Popov %tmp24 = load ptr, ptr @_ZZ19SFLGetVisibilityKeyvE19_kSFLLVisibilityKey ; <ptr> [#uses=1] 67*d586bd5cSNikita Popov call void @_Z20CFDictionaryAddValuePKvS0_( ptr %tmp24, ptr %iftmp.1.0 ) 68*d586bd5cSNikita Popov ret ptr undef 69cee313d2SEric Christopher} 70cee313d2SEric Christopher 71*d586bd5cSNikita Popovdeclare void @_Z20CFDictionaryAddValuePKvS0_(ptr, ptr) 72cee313d2SEric Christopher 73