You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
875 B
35 lines
875 B
4 months ago
|
; RUN: llvm-as %s -o %t.o
|
||
|
|
||
|
; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
|
||
|
; RUN: --plugin-opt=save-temps \
|
||
|
; RUN: -shared %t.o -o %t2.o
|
||
|
; RUN: llvm-dis %t2.o.bc -o - | FileCheck %s
|
||
|
|
||
|
; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
|
||
|
; RUN: --plugin-opt=emit-llvm \
|
||
|
; RUN: -shared %t.o -o %t2.o
|
||
|
; RUN: llvm-dis %t2.o -o - | FileCheck ---check-prefix=NONAME %s
|
||
|
|
||
|
; CHECK: @GlobalValueName
|
||
|
; CHECK: @foo(i32 %in)
|
||
|
; CHECK: somelabel:
|
||
|
; CHECK: %GV = load i32, i32* @GlobalValueName
|
||
|
; CHECK: %add = add i32 %in, %GV
|
||
|
; CHECK: ret i32 %add
|
||
|
|
||
|
; NONAME: @GlobalValueName
|
||
|
; NONAME: @foo(i32)
|
||
|
; NONAME-NOT: somelabel:
|
||
|
; NONAME: %2 = load i32, i32* @GlobalValueName
|
||
|
; NONAME: %3 = add i32 %0, %2
|
||
|
; NONAME: ret i32 %3
|
||
|
|
||
|
@GlobalValueName = global i32 0
|
||
|
|
||
|
define i32 @foo(i32 %in) {
|
||
|
somelabel:
|
||
|
%GV = load i32, i32* @GlobalValueName
|
||
|
%add = add i32 %in, %GV
|
||
|
ret i32 %add
|
||
|
}
|