diff options
author | Stephen Hines <srhines@google.com> | 2014-05-29 02:49:00 -0700 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2014-05-29 02:49:00 -0700 |
commit | dce4a407a24b04eebc6a376f8e62b41aaa7b071f (patch) | |
tree | dcebc53f2b182f145a2e659393bf9a0472cedf23 /test/Transforms/GlobalOpt | |
parent | 220b921aed042f9e520c26cffd8282a94c66c3d5 (diff) | |
download | external_llvm-dce4a407a24b04eebc6a376f8e62b41aaa7b071f.zip external_llvm-dce4a407a24b04eebc6a376f8e62b41aaa7b071f.tar.gz external_llvm-dce4a407a24b04eebc6a376f8e62b41aaa7b071f.tar.bz2 |
Update LLVM for 3.5 rebase (r209712).
Change-Id: I149556c940fb7dc92d075273c87ff584f400941f
Diffstat (limited to 'test/Transforms/GlobalOpt')
-rw-r--r-- | test/Transforms/GlobalOpt/2009-02-15-BitcastAlias.ll | 2 | ||||
-rw-r--r-- | test/Transforms/GlobalOpt/alias-resolve.ll | 4 | ||||
-rw-r--r-- | test/Transforms/GlobalOpt/alias-used-section.ll | 4 | ||||
-rw-r--r-- | test/Transforms/GlobalOpt/atexit.ll | 2 | ||||
-rw-r--r-- | test/Transforms/GlobalOpt/ctor-list-opt.ll | 19 |
5 files changed, 23 insertions, 8 deletions
diff --git a/test/Transforms/GlobalOpt/2009-02-15-BitcastAlias.ll b/test/Transforms/GlobalOpt/2009-02-15-BitcastAlias.ll index d6a565a..03d6ee4 100644 --- a/test/Transforms/GlobalOpt/2009-02-15-BitcastAlias.ll +++ b/test/Transforms/GlobalOpt/2009-02-15-BitcastAlias.ll @@ -2,7 +2,7 @@ @g = global i32 0 -@a = alias bitcast (i32* @g to i8*) +@a = alias i8, i32* @g define void @f() { %tmp = load i8* @a diff --git a/test/Transforms/GlobalOpt/alias-resolve.ll b/test/Transforms/GlobalOpt/alias-resolve.ll index 2d5a956..bd07b31 100644 --- a/test/Transforms/GlobalOpt/alias-resolve.ll +++ b/test/Transforms/GlobalOpt/alias-resolve.ll @@ -1,9 +1,9 @@ ; RUN: opt < %s -globalopt -S | FileCheck %s -@foo1 = alias void ()* @foo2 +@foo1 = alias void ()* @bar2 ; CHECK: @foo1 = alias void ()* @bar2 -@foo2 = alias void()* @bar1 +@foo2 = alias void()* @bar2 ; CHECK: @foo2 = alias void ()* @bar2 @bar1 = alias void ()* @bar2 diff --git a/test/Transforms/GlobalOpt/alias-used-section.ll b/test/Transforms/GlobalOpt/alias-used-section.ll index 987c4a4..1217937 100644 --- a/test/Transforms/GlobalOpt/alias-used-section.ll +++ b/test/Transforms/GlobalOpt/alias-used-section.ll @@ -1,8 +1,8 @@ ; RUN: opt -S -globalopt < %s | FileCheck %s @_Z17in_custom_section = internal global i8 42, section "CUSTOM" -@in_custom_section = protected dllexport alias internal i8* @_Z17in_custom_section +@in_custom_section = dllexport alias internal i8* @_Z17in_custom_section -; CHECK: @in_custom_section = internal protected dllexport global i8 42, section "CUSTOM" +; CHECK: @in_custom_section = internal dllexport global i8 42, section "CUSTOM" @llvm.used = appending global [1 x i8*] [i8* @in_custom_section], section "llvm.metadata" diff --git a/test/Transforms/GlobalOpt/atexit.ll b/test/Transforms/GlobalOpt/atexit.ll index dbcd0d7..55c2dab 100644 --- a/test/Transforms/GlobalOpt/atexit.ll +++ b/test/Transforms/GlobalOpt/atexit.ll @@ -1,6 +1,6 @@ ; RUN: opt < %s -globalopt -S | FileCheck %s ; CHECK: ModuleID -define internal hidden i32 @__cxa_atexit(void (i8*)* nocapture %func, i8* nocapture %arg, i8* nocapture %dso_handle) nounwind readnone optsize noimplicitfloat { +define internal i32 @__cxa_atexit(void (i8*)* nocapture %func, i8* nocapture %arg, i8* nocapture %dso_handle) nounwind readnone optsize noimplicitfloat { unreachable } diff --git a/test/Transforms/GlobalOpt/ctor-list-opt.ll b/test/Transforms/GlobalOpt/ctor-list-opt.ll index 542c786..450bdb8 100644 --- a/test/Transforms/GlobalOpt/ctor-list-opt.ll +++ b/test/Transforms/GlobalOpt/ctor-list-opt.ll @@ -1,5 +1,20 @@ -; RUN: opt < %s -globalopt -S | not grep CTOR -@llvm.global_ctors = appending global [11 x { i32, void ()* }] [ { i32, void ()* } { i32 65535, void ()* @CTOR1 }, { i32, void ()* } { i32 65535, void ()* @CTOR1 }, { i32, void ()* } { i32 65535, void ()* @CTOR2 }, { i32, void ()* } { i32 65535, void ()* @CTOR3 }, { i32, void ()* } { i32 65535, void ()* @CTOR4 }, { i32, void ()* } { i32 65535, void ()* @CTOR5 }, { i32, void ()* } { i32 65535, void ()* @CTOR6 }, { i32, void ()* } { i32 65535, void ()* @CTOR7 }, { i32, void ()* } { i32 65535, void ()* @CTOR8 }, { i32, void ()* } { i32 65535, void ()* @CTOR9 }, { i32, void ()* } { i32 2147483647, void ()* null } ] ; <[10 x { i32, void ()* }]*> [#uses=0] +; RUN: opt < %s -globalopt -S | FileCheck %s +; CHECK-NOT: CTOR +%ini = type { i32, void()*, i8* } +@llvm.global_ctors = appending global [11 x %ini] [ + %ini { i32 65535, void ()* @CTOR1, i8* null }, + %ini { i32 65535, void ()* @CTOR1, i8* null }, + %ini { i32 65535, void ()* @CTOR2, i8* null }, + %ini { i32 65535, void ()* @CTOR3, i8* null }, + %ini { i32 65535, void ()* @CTOR4, i8* null }, + %ini { i32 65535, void ()* @CTOR5, i8* null }, + %ini { i32 65535, void ()* @CTOR6, i8* null }, + %ini { i32 65535, void ()* @CTOR7, i8* null }, + %ini { i32 65535, void ()* @CTOR8, i8* null }, + %ini { i32 65535, void ()* @CTOR9, i8* null }, + %ini { i32 2147483647, void ()* null, i8* null } +] + @G = global i32 0 ; <i32*> [#uses=1] @G2 = global i32 0 ; <i32*> [#uses=1] @G3 = global i32 -123 ; <i32*> [#uses=2] |