Home | History | Annotate | Download | only in X86
      1 ; RUN: llvm-as %s -o %t.o
      2 
      3 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
      4 ; RUN:    --plugin-opt=save-temps \
      5 ; RUN:    -shared %t.o -o %t2.o
      6 ; RUN: llvm-dis %t2.o.bc -o - | FileCheck %s
      7 
      8 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
      9 ; RUN:    --plugin-opt=emit-llvm \
     10 ; RUN:    -shared %t.o -o %t2.o
     11 ; RUN: llvm-dis %t2.o -o - | FileCheck ---check-prefix=NONAME %s
     12 
     13 ; CHECK: @GlobalValueName
     14 ; CHECK: @foo(i32 %in)
     15 ; CHECK: somelabel:
     16 ; CHECK:  %GV = load i32, i32* @GlobalValueName
     17 ; CHECK:  %add = add i32 %in, %GV
     18 ; CHECK:  ret i32 %add
     19 
     20 ; NONAME: @GlobalValueName
     21 ; NONAME: @foo(i32)
     22 ; NONAME-NOT: somelabel:
     23 ; NONAME:  %2 = load i32, i32* @GlobalValueName
     24 ; NONAME:  %3 = add i32 %0, %2
     25 ; NONAME:  ret i32 %3
     26 
     27 @GlobalValueName = global i32 0
     28 
     29 define i32 @foo(i32 %in) {
     30 somelabel:
     31   %GV = load i32, i32* @GlobalValueName
     32   %add = add i32 %in, %GV
     33   ret i32 %add
     34 }
     35