1 ; RUN: opt %s -globalopt -S | FileCheck %s
3 @a = internal global i32 0, align 4
4 @b = internal global i32 0, align 4
5 @c = internal global i32 0, align 4
6 @d = internal constant [4 x i8] c"foo\00", align 1
7 @e = linkonce_odr global i32 0
9 ; CHECK: @a = internal global i32 0, align 4
10 ; CHECK: @b = internal global i32 0, align 4
11 ; CHECK: @c = internal unnamed_addr global i32 0, align 4
12 ; CHECK: @d = internal unnamed_addr constant [4 x i8] c"foo\00", align 1
13 ; CHECK: @e = linkonce_odr global i32 0
20 define void @set_e(i32 %x) {
25 define i1 @bah(i64 %i) nounwind readonly optsize ssp {
27 %arrayidx4 = getelementptr inbounds [4 x i8]* @d, i64 0, i64 %i
28 %tmp5 = load i8* %arrayidx4, align 1
29 %cmp = icmp eq i8 %tmp5, 42
33 define void @baz(i32 %x) {
35 store i32 %x, i32* @a, align 4
36 store i32 %x, i32* @b, align 4
37 store i32 %x, i32* @c, align 4
41 define i32 @foo(i32* %x) nounwind readnone optsize ssp {
43 %cmp = icmp eq i32* %x, @a
44 %conv = zext i1 %cmp to i32
50 switch i64 ptrtoint (i32* @b to i64), label %sw.epilog [
64 %tmp1 = load i32* @c, align 4