brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 87b292f Raw
72 lines · plain
1; Based llvm/test/CodeGen/X86/aliases.ll2; RUN: llc < %s -mtriple=wasm32-unknown-uknown -asm-verbose=false | FileCheck %s3 4@bar = global i32 425 6; CHECK-DAG: .globl	foo17; CHECK-DAG: foo1 = bar8@foo1 = alias i32, ptr @bar9 10; CHECK-DAG: .globl	foo211; CHECK-DAG: foo2 = bar12@foo2 = alias i32, ptr @bar13 14%FunTy = type i32()15 16define i32 @foo_f() {17  ret i32 018}19 20; CHECK-DAG: .weak	bar_f21; CHECK-DAG: .type	bar_f,@function22; CHECK-DAG: bar_f = foo_f23@bar_f = weak alias %FunTy, ptr @foo_f24 25; CHECK-DAG: .weak	bar_l26; CHECK-DAG: bar_l = bar27@bar_l = linkonce_odr alias i32, ptr @bar28 29; CHECK-DAG: bar_i = bar30@bar_i = internal alias i32, ptr @bar31 32; CHECK-DAG: .globl	A33@A = alias i64, ptr @bar34 35; CHECK-DAG: .globl	bar_h36; CHECK-DAG: .hidden	bar_h37; CHECK-DAG: bar_h = bar38@bar_h = hidden alias i32, ptr @bar39 40; CHECK-DAG: .globl	bar_p41; CHECK-DAG: .protected	bar_p42; CHECK-DAG: bar_p = bar43@bar_p = protected alias i32, ptr @bar44 45; CHECK-DAG: test2 = bar+446@test2 = alias i32, getelementptr(i32, ptr @bar, i32 1)47 48; CHECK-DAG: test3 = 4249@test3 = alias i32, inttoptr(i32 42 to ptr)50 51; CHECK-DAG: test4 = bar52@test4 = alias i32, inttoptr(i64 ptrtoint (ptr @bar to i64) to ptr)53 54; CHECK-DAG: test5 = test2-bar55@test5 = alias i32, inttoptr(i32 sub (i32 ptrtoint (ptr @test2 to i32),56                                 i32 ptrtoint (ptr @bar to i32)) to ptr)57 58; CHECK-DAG: .globl	test59define i32 @test() {60entry:61   %tmp = load i32, ptr @foo162   %tmp1 = load i32, ptr @foo263   %tmp0 = load i32, ptr @bar_i64   %tmp2 = call i32 @foo_f()65   %tmp3 = add i32 %tmp, %tmp266   %tmp4 = call i32 @bar_f()67   %tmp5 = add i32 %tmp3, %tmp468   %tmp6 = add i32 %tmp1, %tmp569   %tmp7 = add i32 %tmp6, %tmp070   ret i32 %tmp771}72