brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · a8c95e9 Raw
44 lines · plain
1; RUN: llvm-as < %s | llvm-dis > %t1.ll2; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll3; RUN: diff %t1.ll %t2.ll4 5@llvm.used = appending global [1 x i8*] [i8* bitcast (i32* @foo1 to i8*)], section "llvm.metadata"6 7@bar = global i32 08@foo1 = alias i32, i32* @bar9@foo2 = alias i32, i32* @bar10@foo3 = alias i32, i32* @foo211@foo4 = unnamed_addr alias i32, i32* @foo212 13; Make sure the verifier does not complain about references to a global14; declaration from an initializer.15@decl = external global i3216@ptr = global i32* @decl17@ptr_a = alias i32*, i32** @ptr18 19%FunTy = type i32()20 21define i32 @foo_f() {22  ret i32 023}24@bar_f = weak_odr alias %FunTy, %FunTy* @foo_f25@bar_ff = alias i32(), i32()* @bar_f26 27@bar_i = internal alias i32, i32* @bar28 29@A = alias i64, bitcast (i32* @bar to i64*)30 31define i32 @test() {32entry:33   %tmp = load i32, i32* @foo134   %tmp1 = load i32, i32* @foo235   %tmp0 = load i32, i32* @bar_i36   %tmp2 = call i32 @foo_f()37   %tmp3 = add i32 %tmp, %tmp238   %tmp4 = call %FunTy @bar_f()39   %tmp5 = add i32 %tmp3, %tmp440   %tmp6 = add i32 %tmp1, %tmp541   %tmp7 = add i32 %tmp6, %tmp042   ret i32 %tmp743}44