1 ; RUN: llvm-as %s -o %t.o
3 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \
5 ; RUN: --plugin-opt=save-temps \
6 ; RUN: -shared %t.o -o %t2.o
7 ; RUN: llvm-dis %t2.o.0.2.internalize.bc -o - | FileCheck %s
9 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \
10 ; RUN: -m elf_x86_64 \
11 ; RUN: --plugin-opt=emit-llvm \
12 ; RUN: -shared %t.o -o %t2.o
13 ; RUN: llvm-dis %t2.o -o - | FileCheck --check-prefix=NONAME %s
15 ; CHECK: @GlobalValueName
16 ; CHECK: @foo(i32 %in)
18 ; CHECK: %GV = load i32, i32* @GlobalValueName
19 ; CHECK: %add = add i32 %in, %GV
22 ; NONAME: @GlobalValueName
23 ; NONAME: @foo(i32 %0)
24 ; NONAME-NOT: somelabel:
25 ; NONAME: %2 = load i32, i32* @GlobalValueName
26 ; NONAME: %3 = add i32 %0, %2
29 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
30 target triple = "x86_64-unknown-linux-gnu"
32 @GlobalValueName = global i32 0
34 define i32 @foo(i32 %in) {
36 %GV = load i32, i32* @GlobalValueName
37 %add = add i32 %in, %GV