Imported Upstream version 5.18.0.167

Former-commit-id: 289509151e0fee68a1b591a20c9f109c3c789d3a
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-10-20 08:25:10 +00:00
parent e19d552987
commit b084638f15
28489 changed files with 184 additions and 3866856 deletions

View File

@ -1,17 +0,0 @@
; RUN: opt < %s -globalopt
@V = global float 1.200000e+01 ; <float*> [#uses=1]
@G = internal global i32* null ; <i32**> [#uses=2]
define i32 @user() {
%P = load i32*, i32** @G ; <i32*> [#uses=1]
%Q = load i32, i32* %P ; <i32> [#uses=1]
ret i32 %Q
}
define void @setter() {
%Vi = bitcast float* @V to i32* ; <i32*> [#uses=1]
store i32* %Vi, i32** @G
ret void
}

View File

@ -1,10 +0,0 @@
; RUN: opt < %s -globalopt -disable-output
; PR579
@g_40507551 = internal global i16 31038 ; <i16*> [#uses=1]
define void @main() {
%tmp.4.i.1 = load i8, i8* getelementptr (i8, i8* bitcast (i16* @g_40507551 to i8*), i32 1) ; <i8> [#uses=0]
ret void
}

View File

@ -1,27 +0,0 @@
; RUN: opt < %s -globalopt -disable-output
%RPyString = type { i32, %arraytype.Char }
%arraytype.Char = type { i32, [0 x i8] }
%arraytype.Signed = type { i32, [0 x i32] }
%functiontype.1 = type { %RPyString* (i32) *}
%structtype.test = type { i32, %arraytype.Signed }
@structinstance.test = internal global { i32, { i32, [2 x i32] } } { i32 41, { i32, [2 x i32] } { i32 2, [2 x i32] [ i32 100, i32 101 ] } } ; <{ i32, { i32, [2 x i32] } }*> [#uses=1]
define fastcc void @pypy_array_constant() {
block0:
%tmp.9 = getelementptr %structtype.test, %structtype.test* bitcast ({ i32, { i32, [2 x i32] } }* @structinstance.test to %structtype.test*), i32 0, i32 0 ; <i32*> [#uses=0]
ret void
}
define fastcc void @new.varsizestruct.rpy_string() {
unreachable
}
define void @__entrypoint__pypy_array_constant() {
call fastcc void @pypy_array_constant( )
ret void
}
define void @__entrypoint__raised_LLVMException() {
ret void
}

View File

@ -1,135 +0,0 @@
; RUN: opt < %s -globalopt -disable-output
; PR820
target datalayout = "e-p:32:32"
target triple = "i686-pc-linux-gnu"
%struct..0FileDescriptor = type { i32 }
%"struct.FlagDescription<int32>" = type { i8*, i32*, i1, i1, i32, i8* }
%"struct.FlagRegisterer<bool>" = type { i8 }
%struct.MutexLock = type { %struct..0FileDescriptor* }
%"struct.std::DisabledRangeMap" = type { %"struct.std::_Rb_tree<const char*,std::pair<const char* const, FlagDescription<bool> >,std::_Select1st<std::pair<const char* const, FlagDescription<bool> > >,StringCmp,std::allocator<std::pair<const char* const, FlagDescription<bool> > > >" }
%"struct.std::_Rb_tree<const char*,std::pair<const char* const, FlagDescription<bool> >,std::_Select1st<std::pair<const char* const, FlagDescription<bool> > >,StringCmp,std::allocator<std::pair<const char* const, FlagDescription<bool> > > >" = type { %"struct.std::_Rb_tree<const char*,std::pair<const char* const, FlagDescription<bool> >,std::_Select1st<std::pair<const char* const, FlagDescription<bool> > >,StringCmp,std::allocator<std::pair<const char* const, FlagDescription<bool> > > >::_Rb_tree_impl<StringCmp,false>" }
%"struct.std::_Rb_tree<const char*,std::pair<const char* const, FlagDescription<bool> >,std::_Select1st<std::pair<const char* const, FlagDescription<bool> > >,StringCmp,std::allocator<std::pair<const char* const, FlagDescription<bool> > > >::_Rb_tree_impl<StringCmp,false>" = type { %"struct.FlagRegisterer<bool>", %"struct.std::_Rb_tree_node_base", i32 }
%"struct.std::_Rb_tree_const_iterator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >" = type { %"struct.std::_Rb_tree_node_base"* }
%"struct.std::_Rb_tree_node_base" = type { i32, %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }
%"struct.std::_Vector_base<int,std::allocator<int> >" = type { %"struct.std::_Vector_base<int,std::allocator<int> >::_Vector_impl" }
%"struct.std::_Vector_base<int,std::allocator<int> >::_Vector_impl" = type { i32*, i32*, i32* }
%"struct.std::vector<int,std::allocator<int> >" = type { %"struct.std::_Vector_base<int,std::allocator<int> >" }
@registry_lock = external global %struct..0FileDescriptor ; <%struct..0FileDescriptor*> [#uses=0]
@_ZN61FLAG__foo_int32_44FLAGS_E = external global %"struct.FlagRegisterer<bool>" ; <%"struct.FlagRegisterer<bool>"*> [#uses=0]
@llvm.global_ctors = appending global [20 x { i32, void ()* }] [ { i32, void ()* } { i32 65535, void ()* @_GLOBAL__I__ZN62FLAG__foo_string_10FLAGS_E }, { i32, void ()* } { i32 65535, void ()* @_GLOBAL__I__ZN60FLAG__foo_bool_19FLAGS_E }, { i32, void ()* } { i32 65535, void ()* @_GLOBAL__I__ZNK5Bzh4Enum13is_contiguousEv }, { i32, void ()* } { i32 65535, void ()* @_GLOBAL__I__ZN62FLAG__foo_string_17FLAGS_E }, { i32, void ()* } { i32 65535, void ()* @_GLOBAL__I__ZN61FLAG__foo_int32_21FLAGS_E }, { i32, void ()* } { i32 65535, void ()* @_GLOBAL__I__ZN7ScannerC2Ev }, { i32, void ()* } { i32 65535, void ()* @_GLOBAL__I__Z11StripStringPSsPKcc }, { i32, void ()* } { i32 65535, void ()* @_GLOBAL__I__ZNK9__gnu_cxx4hashI11StringPieceEclERKS1_ }, { i32, void ()* } { i32 65535, void ()* @_GLOBAL__I__ZN8Hasher325ResetEj }, { i32, void ()* } { i32 65535, void ()* @_GLOBAL__I__Z25ACLRv }, { i32, void ()* } { i32 65535, void ()* @_GLOBAL__I__ZN61FLAG__foo_int64_25FLAGS_E }, { i32, void ()* } { i32 65535, void ()* @_GLOBAL__I__ZN61FLAG__foo_int32_7FLAGS_E }, { i32, void ()* } { i32 65535, void ()* @_GLOBAL__I__ZN62FLAG__foo_string_18FLAGS_E }, { i32, void ()* } { i32 65535, void ()* @_GLOBAL__I__ZN62FLAG__foo_string_17FLAGS_E }, { i32, void ()* } { i32 65535, void ()* @_GLOBAL__I__ZN61FLAG__foo_int32_25FLAGS_E }, { i32, void ()* } { i32 65535, void ()* @_GLOBAL__I_eventbuf }, { i32, void ()* } { i32 65535, void ()* @_GLOBAL__I__ZN61FLAG__foo_int32_26FLAGS_E }, { i32, void ()* } { i32 65535, void ()* @_GLOBAL__I__ZN62FLAG__foo_string_16FLAGS_E }, { i32, void ()* } { i32 65535, void ()* @_GLOBAL__I__ZN17InitializerC2EPKcS1_PFvvE }, { i32, void ()* } { i32 65535, void ()* @_GLOBAL__I__checker_bcad_variable } ] ; <[20 x { i32, void ()* }]*> [#uses=0]
declare void @_GLOBAL__I__ZN62FLAG__foo_string_10FLAGS_E()
declare void @_GLOBAL__I__ZN60FLAG__foo_bool_19FLAGS_E()
declare void @_GLOBAL__I__ZNK5Bzh4Enum13is_contiguousEv()
declare void @_GLOBAL__I__ZN62FLAG__foo_string_17FLAGS_E()
declare void @_GLOBAL__I__ZN61FLAG__foo_int32_21FLAGS_E()
define void @_ZN14FlagRegistererIiEC1EPKcRK15FlagDescriptionIiE() {
entry:
call void @_Z12RegisterFlagIiEvPKcRK15FlagDescriptionIT_E( )
ret void
}
define void @_Z12RegisterFlagIiEvPKcRK15FlagDescriptionIT_E() {
entry:
call void @_ZN9MutexLockC1EP5Mutex( )
ret void
}
declare void @_GLOBAL__I__ZN7ScannerC2Ev()
declare void @_GLOBAL__I__Z11StripStringPSsPKcc()
define void @_ZNSt6vectorIiSaIiEEC1ERKS0_() {
entry:
unreachable
}
declare void @_GLOBAL__I__ZNK9__gnu_cxx4hashI11StringPieceEclERKS1_()
declare void @_GLOBAL__I__ZN8Hasher325ResetEj()
declare void @_GLOBAL__I__Z25ACLRv()
define void @_ZN9MutexLockC1EP5Mutex() {
entry:
call void @_ZN5Mutex4LockEv( )
ret void
}
define void @_ZN5Mutex4LockEv() {
entry:
call void @_Z22Acquire_CASPViii( )
ret void
}
define void @_ZNSt3mapIPKc15FlagDescriptionIiE9StringCmpSaISt4pairIKS1_S3_EEE3endEv(%"struct.std::_Rb_tree_const_iterator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >"* sret %agg.result) {
entry:
unreachable
}
declare void @_GLOBAL__I__ZN61FLAG__foo_int64_25FLAGS_E()
define void @_Z14CASPViii() {
entry:
%tmp3 = call i32 asm sideeffect "lock; cmpxchg $1,$2", "={ax},q,m,0,~{dirflag},~{fpsr},~{flags},~{memory}"( i32 0, i32* null, i32 0 ) ; <i32> [#uses=0]
unreachable
}
declare void @_GLOBAL__I__ZN61FLAG__foo_int32_7FLAGS_E()
declare void @_GLOBAL__I__ZN62FLAG__foo_string_18FLAGS_E()
define void @_Z22Acquire_CASPViii() {
entry:
call void @_Z14CASPViii( )
unreachable
}
declare void @_GLOBAL__I__ZN61FLAG__foo_int32_25FLAGS_E()
declare void @_GLOBAL__I_eventbuf()
define void @_GLOBAL__I__ZN61FLAG__foo_int32_26FLAGS_E() {
entry:
call void @_Z41__static_initialization_and_destruction_0ii1662( i32 1, i32 65535 )
ret void
}
define void @_Z41__static_initialization_and_destruction_0ii1662(i32 %__initialize_p, i32 %__priority) {
entry:
%__initialize_p_addr = alloca i32 ; <i32*> [#uses=2]
%__priority_addr = alloca i32 ; <i32*> [#uses=2]
store i32 %__initialize_p, i32* %__initialize_p_addr
store i32 %__priority, i32* %__priority_addr
%tmp = load i32, i32* %__priority_addr ; <i32> [#uses=1]
%tmp.upgrd.1 = icmp eq i32 %tmp, 65535 ; <i1> [#uses=1]
br i1 %tmp.upgrd.1, label %cond_true, label %cond_next14
cond_true: ; preds = %entry
%tmp8 = load i32, i32* %__initialize_p_addr ; <i32> [#uses=1]
%tmp9 = icmp eq i32 %tmp8, 1 ; <i1> [#uses=1]
br i1 %tmp9, label %cond_true10, label %cond_next14
cond_true10: ; preds = %cond_true
call void @_ZN14FlagRegistererIiEC1EPKcRK15FlagDescriptionIiE( )
ret void
cond_next14: ; preds = %cond_true, %entry
ret void
}
declare void @_GLOBAL__I__ZN62FLAG__foo_string_16FLAGS_E()
define void @_ZN9__gnu_cxx13new_allocatorIPNS_15_Hashtable_nodeIjEEEC2Ev() {
entry:
unreachable
}
declare void @_GLOBAL__I__ZN17InitializerC2EPKcS1_PFvvE()
declare void @_GLOBAL__I__checker_bcad_variable()

View File

@ -1,33 +0,0 @@
; RUN: opt < %s -globalopt -disable-output
%struct._list = type { i32*, %struct._list* }
%struct._play = type { i32, i32*, %struct._list*, %struct._play* }
@nrow = internal global i32 0 ; <i32*> [#uses=2]
define void @make_play() {
entry:
br label %cond_true16.i
cond_true16.i: ; preds = %cond_true16.i, %entry
%low.0.in.i.0 = phi i32* [ @nrow, %entry ], [ null, %cond_true16.i ] ; <i32*> [#uses=1]
%low.0.i = load i32, i32* %low.0.in.i.0 ; <i32> [#uses=0]
br label %cond_true16.i
}
define void @make_wanted() {
entry:
unreachable
}
define void @get_good_move() {
entry:
ret void
}
define void @main() {
entry:
store i32 8, i32* @nrow
tail call void @make_play( )
ret void
}

View File

@ -1,34 +0,0 @@
; RUN: opt < %s -globalopt -disable-output
target 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"
target triple = "thumb-apple-darwin8"
@replacementUnichar = internal global i16 -3 ; <i16*> [#uses=2]
@"L_OBJC_IMAGE_INFO" = internal global [2 x i32] zeroinitializer ; <[2 x i32]*> [#uses=1]
@llvm.used = appending global [1 x i8*] [ i8* bitcast ([2 x i32]* @"L_OBJC_IMAGE_INFO" to i8*) ] ; <[1 x i8*]*> [#uses=0]
define zeroext i16 @__NSCharToUnicharCFWrapper(i8 zeroext %ch) {
entry:
%iftmp.0.0.in.in = select i1 false, i16* @replacementUnichar, i16* null ; <i16*> [#uses=1]
%iftmp.0.0.in = load i16, i16* %iftmp.0.0.in.in ; <i16> [#uses=1]
ret i16 %iftmp.0.0.in
}
define void @__NSASCIICharToUnichar() {
entry:
ret void
}
define void @_NSDefaultCStringEncoding() {
entry:
call void @__NSSetCStringCharToUnichar( )
br i1 false, label %cond_true6, label %cond_next8
cond_true6: ; preds = %entry
store i16 -2, i16* @replacementUnichar
ret void
cond_next8: ; preds = %entry
ret void
}
declare void @__NSSetCStringCharToUnichar()

View File

@ -1,74 +0,0 @@
; RUN: opt < %s -globalopt -disable-output
target 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"
target triple = "i686-apple-darwin8"
%struct.SFLMutableListItem = type { i16 }
%struct.__CFDictionary = type opaque
%struct.__CFString = type opaque
%struct.__builtin_CFString = type { i32*, i32, i8*, i32 }
@_ZZ19SFLGetVisibilityKeyvE19_kSFLLVisibilityKey = internal global %struct.__CFString* null ; <%struct.__CFString**> [#uses=2]
@_ZZ22SFLGetAlwaysVisibleKeyvE22_kSFLLAlwaysVisibleKey = internal global %struct.__CFString* null ; <%struct.__CFString**> [#uses=7]
@0 = internal constant %struct.__builtin_CFString {
i32* getelementptr ([0 x i32], [0 x i32]* @__CFConstantStringClassReference, i32 0, i32 0),
i32 1992,
i8* getelementptr ([14 x i8], [14 x i8]* @.str, i32 0, i32 0),
i32 13 }, section "__DATA,__cfstring" ; <%struct.__builtin_CFString*>:0 [#uses=1]
@__CFConstantStringClassReference = external global [0 x i32] ; <[0 x i32]*> [#uses=1]
@.str = internal constant [14 x i8] c"AlwaysVisible\00" ; <[14 x i8]*> [#uses=1]
@_ZZ21SFLGetNeverVisibleKeyvE21_kSFLLNeverVisibleKey = internal global %struct.__CFString* null ; <%struct.__CFString**> [#uses=2]
define %struct.__CFString* @_Z19SFLGetVisibilityKeyv() {
entry:
%tmp1 = load %struct.__CFString*, %struct.__CFString** @_ZZ19SFLGetVisibilityKeyvE19_kSFLLVisibilityKey ; <%struct.__CFString*> [#uses=1]
ret %struct.__CFString* %tmp1
}
define %struct.__CFString* @_Z22SFLGetAlwaysVisibleKeyv() {
entry:
%tmp1 = load %struct.__CFString*, %struct.__CFString** @_ZZ22SFLGetAlwaysVisibleKeyvE22_kSFLLAlwaysVisibleKey ; <%struct.__CFString*> [#uses=1]
%tmp2 = icmp eq %struct.__CFString* %tmp1, null ; <i1> [#uses=1]
br i1 %tmp2, label %cond_true, label %cond_next
cond_true: ; preds = %entry
store %struct.__CFString* bitcast (%struct.__builtin_CFString* @0 to %struct.__CFString*), %struct.__CFString** @_ZZ22SFLGetAlwaysVisibleKeyvE22_kSFLLAlwaysVisibleKey
br label %cond_next
cond_next: ; preds = %entry, %cond_true
%tmp4 = load %struct.__CFString*, %struct.__CFString** @_ZZ22SFLGetAlwaysVisibleKeyvE22_kSFLLAlwaysVisibleKey ; <%struct.__CFString*> [#uses=1]
ret %struct.__CFString* %tmp4
}
define %struct.__CFString* @_Z21SFLGetNeverVisibleKeyv() {
entry:
%tmp1 = load %struct.__CFString*, %struct.__CFString** @_ZZ21SFLGetNeverVisibleKeyvE21_kSFLLNeverVisibleKey ; <%struct.__CFString*> [#uses=1]
ret %struct.__CFString* %tmp1
}
define %struct.__CFDictionary* @_ZN18SFLMutableListItem18GetPrefsDictionaryEv(%struct.SFLMutableListItem* %this) {
entry:
%tmp4 = getelementptr %struct.SFLMutableListItem, %struct.SFLMutableListItem* %this, i32 0, i32 0 ; <i16*> [#uses=1]
%tmp5 = load i16, i16* %tmp4 ; <i16> [#uses=1]
%tmp6 = icmp eq i16 %tmp5, 0 ; <i1> [#uses=1]
br i1 %tmp6, label %cond_next22, label %cond_true
cond_true: ; preds = %entry
%tmp9 = load %struct.__CFString*, %struct.__CFString** @_ZZ22SFLGetAlwaysVisibleKeyvE22_kSFLLAlwaysVisibleKey ; <%struct.__CFString*> [#uses=1]
%tmp10 = icmp eq %struct.__CFString* %tmp9, null ; <i1> [#uses=1]
br i1 %tmp10, label %cond_true13, label %cond_next22
cond_true13: ; preds = %cond_true
store %struct.__CFString* bitcast (%struct.__builtin_CFString* @0 to %struct.__CFString*), %struct.__CFString** @_ZZ22SFLGetAlwaysVisibleKeyvE22_kSFLLAlwaysVisibleKey
br label %cond_next22
cond_next22: ; preds = %entry, %cond_true13, %cond_true
%iftmp.1.0.in = phi %struct.__CFString** [ @_ZZ22SFLGetAlwaysVisibleKeyvE22_kSFLLAlwaysVisibleKey, %cond_true ], [ @_ZZ22SFLGetAlwaysVisibleKeyvE22_kSFLLAlwaysVisibleKey, %cond_true13 ], [ @_ZZ21SFLGetNeverVisibleKeyvE21_kSFLLNeverVisibleKey, %entry ] ; <%struct.__CFString**> [#uses=1]
%iftmp.1.0 = load %struct.__CFString*, %struct.__CFString** %iftmp.1.0.in ; <%struct.__CFString*> [#uses=1]
%tmp24 = load %struct.__CFString*, %struct.__CFString** @_ZZ19SFLGetVisibilityKeyvE19_kSFLLVisibilityKey ; <%struct.__CFString*> [#uses=1]
%tmp2728 = bitcast %struct.__CFString* %tmp24 to i8* ; <i8*> [#uses=1]
%tmp2930 = bitcast %struct.__CFString* %iftmp.1.0 to i8* ; <i8*> [#uses=1]
call void @_Z20CFDictionaryAddValuePKvS0_( i8* %tmp2728, i8* %tmp2930 )
ret %struct.__CFDictionary* undef
}
declare void @_Z20CFDictionaryAddValuePKvS0_(i8*, i8*)

View File

@ -1,36 +0,0 @@
; RUN: opt < %s -globalopt -disable-output
; PR1491
target 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"
target triple = "i686-pc-linux-gnu"
%"struct.__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<const int, int> > >" = type <{ i8 }>
%"struct.std::_Rb_tree<int,std::pair<const int, int>,std::_Select1st<std::pair<const int, int> >,std::less<int>,std::allocator<std::pair<const int, int> > >" = type { %"struct.std::_Rb_tree<int,std::pair<const int, int>,std::_Select1st<std::pair<const int, int> >,std::less<int>,std::allocator<std::pair<const int, int> > >::_Rb_tree_impl<std::less<int>,false>" }
%"struct.std::_Rb_tree<int,std::pair<const int, int>,std::_Select1st<std::pair<const int, int> >,std::less<int>,std::allocator<std::pair<const int, int> > >::_Rb_tree_impl<std::less<int>,false>" = type { %"struct.__gnu_cxx::new_allocator<std::_Rb_tree_node<std::pair<const int, int> > >", %"struct.std::_Rb_tree_node_base", i32 }
%"struct.std::_Rb_tree_node_base" = type { i32, %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"*, %"struct.std::_Rb_tree_node_base"* }
%"struct.std::map<int,int,std::less<int>,std::allocator<std::pair<const int, int> > >" = type { %"struct.std::_Rb_tree<int,std::pair<const int, int>,std::_Select1st<std::pair<const int, int> >,std::less<int>,std::allocator<std::pair<const int, int> > >" }
@someMap = global %"struct.std::map<int,int,std::less<int>,std::allocator<std::pair<const int, int> > >" zeroinitializer ; <%"struct.std::map<int,int,std::less<int>,std::allocator<std::pair<const int, int> > >"*> [#uses=1]
@llvm.global_ctors = appending global [1 x { i32, void ()* }] [ { i32, void ()* } { i32 65535, void ()* @_GLOBAL__I_someMap } ] ; <[1 x { i32, void ()* }]*> [#uses=0]
@llvm.global_dtors = appending global [1 x { i32, void ()* }] [ { i32, void ()* } { i32 65535, void ()* @_GLOBAL__D_someMap } ] ; <[1 x { i32, void ()* }]*> [#uses=0]
define void @_GLOBAL__I_someMap() {
entry:
call void @_Z41__static_initialization_and_destruction_0ii( i32 1, i32 65535 )
ret void
}
declare void @_GLOBAL__D_someMap()
define void @_Z41__static_initialization_and_destruction_0ii(i32 %__initialize_p, i32 %__priority) {
entry:
%tmp1 = icmp eq i32 %__priority, 65535 ; <i1> [#uses=1]
%tmp4 = icmp eq i32 %__initialize_p, 1 ; <i1> [#uses=1]
%tmp7 = and i1 %tmp1, %tmp4 ; <i1> [#uses=1]
br i1 %tmp7, label %cond_true, label %cond_next
cond_true: ; preds = %entry
store i8 0, i8* getelementptr (%"struct.std::map<int,int,std::less<int>,std::allocator<std::pair<const int, int> > >", %"struct.std::map<int,int,std::less<int>,std::allocator<std::pair<const int, int> > >"* @someMap, i32 0, i32 0, i32 0, i32 0, i32 0)
ret void
cond_next: ; preds = %entry
ret void
}

View File

@ -1,19 +0,0 @@
; RUN: opt < %s -globalopt -disable-output
target 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-f128:64:128"
target triple = "powerpc-apple-darwin8"
%struct.empty0 = type { }
%struct.es = type { %struct.empty0 }
%struct.es1 = type { %struct.empty0 }
@aaui1 = internal global [6 x [2 x i32]] [ [2 x i32] [ i32 1, i32 1 ], [2 x i32] [ i32 1, i32 1 ], [2 x i32] [ i32 1, i32 1 ], [2 x i32] [ i32 1, i32 1 ], [2 x i32] [ i32 1, i32 1 ], [2 x i32] [ i32 1, i32 1 ] ] ; <[6 x [2 x i32]]*> [#uses=1]
@aaui0 = internal global [0 x [2 x i32]] zeroinitializer ; <[0 x [2 x i32]]*> [#uses=1]
define i8 @func() {
entry:
%tmp10 = getelementptr [2 x i32], [2 x i32]* getelementptr ([6 x [2 x i32]], [6 x [2 x i32]]* @aaui1, i32 0, i32 0), i32 5, i32 1 ; <i32*> [#uses=1]
%tmp11 = load i32, i32* %tmp10, align 4 ; <i32> [#uses=1]
%tmp12 = call i32 (...) @func3( i32* null, i32 0, i32 %tmp11 ) ; <i32> [#uses=0]
ret i8 undef
}
declare i32 @func3(...)

View File

@ -1,26 +0,0 @@
; RUN: opt < %s -globalopt | llvm-dis
; PR1896
@indirect1 = internal global void (i32)* null ; <void (i32)**> [#uses=2]
declare void @indirectmarked(i32)
define i32 @main() {
entry:
br i1 false, label %cond_next20.i, label %cond_true.i9
cond_true.i9: ; preds = %entry
ret i32 0
cond_next20.i: ; preds = %entry
store void (i32)* @indirectmarked, void (i32)** @indirect1, align 4
br i1 false, label %cond_next21.i.i23.i, label %stack_restore
stack_restore: ; preds = %cond_next20.i
ret i32 0
cond_next21.i.i23.i: ; preds = %cond_next20.i
%tmp6.i4.i = load i32, i32* bitcast (void (i32)** @indirect1 to i32*), align 4 ; <i32> [#uses=0]
ret i32 0
}

View File

@ -1,18 +0,0 @@
; RUN: opt < %s -globalopt -S | FileCheck %s
; The 'X' indices could be larger than 31. Do not SROA the outer
; indices of this array.
; CHECK: @mm = {{.*}} [16 x [31 x double]] zeroinitializer
@mm = internal global [16 x [31 x double]] zeroinitializer, align 32
define void @test(i32 %X) {
%P = getelementptr [16 x [31 x double]], [16 x [31 x double]]* @mm, i32 0, i32 0, i32 %X
store double 1.0, double* %P
ret void
}
define double @get(i32 %X) {
%P = getelementptr [16 x [31 x double]], [16 x [31 x double]]* @mm, i32 0, i32 0, i32 %X
%V = load double, double* %P
ret double %V
}

View File

@ -1,10 +0,0 @@
; RUN: opt < %s -globalopt -S | FileCheck %s
; CHECK: load volatile
@t0.1441 = internal global double 0x3FD5555555555555, align 8 ; <double*> [#uses=1]
define double @foo() nounwind {
entry:
%tmp1 = load volatile double, double* @t0.1441, align 8 ; <double> [#uses=2]
%tmp4 = fmul double %tmp1, %tmp1 ; <double> [#uses=1]
ret double %tmp4
}

View File

@ -1,34 +0,0 @@
; Verify that when @G is SROA'd that the new globals have correct
; alignments. Elements 0 and 2 must be 16-byte aligned, and element
; 1 must be at least 8 byte aligned (but could be more).
; RUN: opt < %s -globalopt -S | FileCheck %s
; CHECK: @G.0 = internal unnamed_addr global {{.*}}align 16
; CHECK: @G.1 = internal unnamed_addr global {{.*}}align 8
; CHECK: @G.2 = internal unnamed_addr global {{.*}}align 16
; rdar://5891920
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:32:32-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128"
target triple = "x86_64-apple-darwin8"
%T = type { double, double, double }
@G = internal global %T zeroinitializer, align 16
define void @test() {
store double 1.0, double* getelementptr (%T, %T* @G, i32 0, i32 0), align 16
store double 2.0, double* getelementptr (%T, %T* @G, i32 0, i32 1), align 8
store double 3.0, double* getelementptr (%T, %T* @G, i32 0, i32 2), align 16
ret void
}
define double @test2() {
%V1 = load double, double* getelementptr (%T, %T* @G, i32 0, i32 0), align 16
%V2 = load double, double* getelementptr (%T, %T* @G, i32 0, i32 1), align 8
%V3 = load double, double* getelementptr (%T, %T* @G, i32 0, i32 2), align 16
%R = fadd double %V1, %V2
%R2 = fadd double %R, %V3
ret double %R2
}

View File

@ -1,28 +0,0 @@
; This test lets globalopt split the global struct and array into different
; values. This used to crash, because globalopt forgot to put the new var in the
; same address space as the old one.
; RUN: opt < %s -globalopt -S | FileCheck %s
; Check that the new global values still have their address space
; CHECK: addrspace(1) global
; CHECK: addrspace(1) global
@struct = internal addrspace(1) global { i32, i32 } zeroinitializer
@array = internal addrspace(1) global [ 2 x i32 ] zeroinitializer
define i32 @foo() {
%A = load i32, i32 addrspace(1) * getelementptr ({ i32, i32 }, { i32, i32 } addrspace(1) * @struct, i32 0, i32 0)
%B = load i32, i32 addrspace(1) * getelementptr ([ 2 x i32 ], [ 2 x i32 ] addrspace(1) * @array, i32 0, i32 0)
; Use the loaded values, so they won't get removed completely
%R = add i32 %A, %B
ret i32 %R
}
; We put stores in a different function, so that the global variables won't get
; optimized away completely.
define void @bar(i32 %R) {
store i32 %R, i32 addrspace(1) * getelementptr ([ 2 x i32 ], [ 2 x i32 ] addrspace(1) * @array, i32 0, i32 0)
store i32 %R, i32 addrspace(1) * getelementptr ({ i32, i32 }, { i32, i32 } addrspace(1) * @struct, i32 0, i32 0)
ret void
}

View File

@ -1,28 +0,0 @@
; RUN: opt < %s -globalopt | llvm-dis
target 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-f80:128:128"
target triple = "i386-apple-darwin7"
%struct.foo = type { i32, i32 }
@X = internal global %struct.foo* null ; <%struct.foo**> [#uses=2]
define void @bar(i32 %Size) nounwind noinline {
entry:
%malloccall = tail call i8* @malloc(i32 trunc (i64 mul (i64 ptrtoint (i32* getelementptr (i32, i32* null, i32 1) to i64), i64 2000000) to i32))
%tmp = bitcast i8* %malloccall to [1000000 x %struct.foo]*
%.sub = getelementptr [1000000 x %struct.foo], [1000000 x %struct.foo]* %tmp, i32 0, i32 0 ; <%struct.foo*> [#uses=1]
store %struct.foo* %.sub, %struct.foo** @X, align 4
ret void
}
declare noalias i8* @malloc(i32)
define i32 @baz() nounwind readonly noinline {
bb1.thread:
%tmpLD1 = load %struct.foo*, %struct.foo** @X, align 4 ; <%struct.foo*> [#uses=2]
br label %bb1
bb1: ; preds = %bb1, %bb1.thread
%tmp = phi %struct.foo* [ %tmpLD1, %bb1.thread ], [ %tmpLD1, %bb1 ] ; <%struct.foo*> [#uses=1]
%0 = getelementptr %struct.foo, %struct.foo* %tmp, i32 1 ; <%struct.foo*> [#uses=0]
br label %bb1
}

View File

@ -1,30 +0,0 @@
; RUN: opt < %s -globalopt | llvm-dis
target 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-f80:128:128"
target triple = "i386-apple-darwin7"
%struct.foo = type { i32, i32 }
@X = internal global %struct.foo* null ; <%struct.foo**> [#uses=2]
define void @bar(i32 %Size) nounwind noinline {
entry:
%malloccall = tail call i8* @malloc(i32 trunc (i64 mul (i64 ptrtoint (i32* getelementptr (i32, i32* null, i32 1) to i64), i64 2000000) to i32))
%tmp = bitcast i8* %malloccall to [1000000 x %struct.foo]*
%.sub = getelementptr [1000000 x %struct.foo], [1000000 x %struct.foo]* %tmp, i32 0, i32 0 ; <%struct.foo*> [#uses=1]
store %struct.foo* %.sub, %struct.foo** @X, align 4
ret void
}
declare noalias i8* @malloc(i32)
define i32 @baz() nounwind readonly noinline {
bb1.thread:
%tmpLD1 = load %struct.foo*, %struct.foo** @X, align 4 ; <%struct.foo*> [#uses=3]
store %struct.foo* %tmpLD1, %struct.foo** null
br label %bb1
bb1: ; preds = %bb1, %bb1.thread
%tmp = phi %struct.foo* [ %tmpLD1, %bb1.thread ], [ %tmpLD1, %bb1 ] ; <%struct.foo*> [#uses=0]
br i1 false, label %bb2, label %bb1
bb2: ; preds = %bb1
ret i32 0
}

View File

@ -1,36 +0,0 @@
; RUN: opt < %s -globalopt -S | FileCheck %s
; CHECK: phi{{.*}}@head
; PR3321
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"
target triple = "x86_64-unknown-linux-gnu"
%struct.node = type { %struct.node*, i32 }
@head = internal global %struct.node* null ; <%struct.node**> [#uses=2]
@node = internal global %struct.node { %struct.node* null, i32 42 }, align 16 ; <%struct.node*> [#uses=1]
define i32 @f() nounwind {
entry:
store %struct.node* @node, %struct.node** @head, align 8
br label %bb1
bb: ; preds = %bb1
%0 = getelementptr %struct.node, %struct.node* %t.0, i64 0, i32 1 ; <i32*> [#uses=1]
%1 = load i32, i32* %0, align 4 ; <i32> [#uses=1]
%2 = getelementptr %struct.node, %struct.node* %t.0, i64 0, i32 0 ; <%struct.node**> [#uses=1]
br label %bb1
bb1: ; preds = %bb, %entry
%value.0 = phi i32 [ undef, %entry ], [ %1, %bb ] ; <i32> [#uses=1]
%t.0.in = phi %struct.node** [ @head, %entry ], [ %2, %bb ] ; <%struct.node**> [#uses=1]
%t.0 = load %struct.node*, %struct.node** %t.0.in ; <%struct.node*> [#uses=3]
%3 = icmp eq %struct.node* %t.0, null ; <i1> [#uses=1]
br i1 %3, label %bb2, label %bb
bb2: ; preds = %bb1
ret i32 %value.0
}
define i32 @main() nounwind {
entry:
%0 = call i32 @f() nounwind ; <i32> [#uses=1]
ret i32 %0
}

View File

@ -1,10 +0,0 @@
; RUN: opt < %s -globalopt
@g = global i32 0
@a = alias i8, bitcast (i32* @g to i8*)
define void @f() {
%tmp = load i8, i8* @a
ret void
}

View File

@ -1,24 +0,0 @@
; RUN: opt < %s -globalopt -S | FileCheck %s
define internal void @f() {
; CHECK-NOT: @f(
; CHECK: define void @a
ret void
}
@a = alias void (), void ()* @f
define void @g() {
call void() @a()
ret void
}
@b = internal alias void (), void ()* @g
; CHECK-NOT: @b
define void @h() {
call void() @b()
; CHECK: call void @g
ret void
}

View File

@ -1,80 +0,0 @@
; REQUIRES: asserts
; RUN: opt < %s -globalopt -stats -disable-output 2>&1 | FileCheck %s
; CHECK: 1 globalopt - Number of global vars shrunk to booleans
source_filename = "test/Transforms/GlobalOpt/2009-03-05-dbg.ll"
@Stop = internal global i32 0, !dbg !0
; Function Attrs: nounwind ssp
define i32 @foo(i32 %i) #0 {
entry:
%"alloca point" = bitcast i32 0 to i32
call void @llvm.dbg.value(metadata i32 %i, metadata !8, metadata !12), !dbg !13
%0 = icmp eq i32 %i, 1, !dbg !13
br i1 %0, label %bb, label %bb1, !dbg !13
bb: ; preds = %entry
store i32 0, i32* @Stop, align 4, !dbg !15
%1 = mul nsw i32 %i, 42, !dbg !16
call void @llvm.dbg.value(metadata i32 %1, metadata !8, metadata !12), !dbg !16
br label %bb2, !dbg !16
bb1: ; preds = %entry
store i32 1, i32* @Stop, align 4, !dbg !17
br label %bb2, !dbg !17
bb2: ; preds = %bb1, %bb
%i_addr.0 = phi i32 [ %1, %bb ], [ %i, %bb1 ]
br label %return, !dbg !18
return: ; preds = %bb2
ret i32 %i_addr.0, !dbg !18
}
; Function Attrs: nounwind readnone
declare void @llvm.dbg.declare(metadata, metadata, metadata) #1
; Function Attrs: nounwind ssp
define i32 @bar() #0 {
entry:
%"alloca point" = bitcast i32 0 to i32
%0 = load i32, i32* @Stop, align 4, !dbg !19
%1 = icmp eq i32 %0, 1, !dbg !19
br i1 %1, label %bb, label %bb1, !dbg !19
bb: ; preds = %entry
br label %bb2, !dbg !24
bb1: ; preds = %entry
br label %bb2, !dbg !25
bb2: ; preds = %bb1, %bb
%.0 = phi i32 [ 0, %bb ], [ 1, %bb1 ]
br label %return, !dbg !25
return: ; preds = %bb2
ret i32 %.0, !dbg !25
}
; Function Attrs: nounwind readnone
declare void @llvm.dbg.value(metadata, metadata, metadata) #1
attributes #0 = { nounwind ssp }
attributes #1 = { nounwind readnone }
!llvm.dbg.cu = !{!2}
!llvm.module.flags = !{!6, !7}
!0 = !DIGlobalVariableExpression(var: !1, expr: !DIExpression())
!1 = !DIGlobalVariable(name: "Stop", scope: !2, file: !3, line: 2, type: !5, isLocal: true, isDefinition: true)
!2 = distinct !DICompileUnit(language: DW_LANG_C89, file: !3, producer: "4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug, globals: !4)
!3 = !DIFile(filename: "g.c", directory: "/tmp")
!4 = !{!0}
!5 = !DIBasicType(name: "int", size: 32, align: 32, encoding: DW_ATE_signed)
!6 = !{i32 2, !"Dwarf Version", i32 2}
!7 = !{i32 2, !"Debug Info Version", i32 3}
!8 = !DILocalVariable(name: "i", arg: 1, scope: !9, file: !3, line: 4, type: !5)
!9 = distinct !DISubprogram(name: "foo", linkageName: "foo", scope: !2, file: !3, line: 4, type: !10, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !2)!10 = !DISubroutineType(types: !11)!11 = !{!5, !5}!12 = !DIExpression()!13 = !DILocation(line: 5, scope: !14)!14 = distinct !DILexicalBlock(scope: !9, file: !3)!15 = !DILocation(line: 6, scope: !14)!16 = !DILocation(line: 7, scope: !14)!17 = !DILocation(line: 9, scope: !14)!18 = !DILocation(line: 11, scope: !14)!19 = !DILocation(line: 14, scope: !20)!20 = distinct !DILexicalBlock(scope: !21, file: !3)!21 = distinct !DISubprogram(name: "bar", linkageName: "bar", scope: !2, file: !3, line: 13, type: !22, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !2)!22 = !DISubroutineType(types: !23)!23 = !{!5}!24 = !DILocation(line: 15, scope: !20)!25 = !DILocation(line: 16, scope: !20)

Some files were not shown because too many files have changed in this diff Show More