mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-01 00:17:01 +00:00
test: Make a start on a test suite for libLTO.
This works in a similar way to the gold plugin tests. We search for a compatible linker on $PATH and use it to run tests against our just-built libLTO. To start with, test the just added opt level functionality. Differential Revision: http://reviews.llvm.org/D8472 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232785 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
20
test/tools/lto/opt-level.ll
Normal file
20
test/tools/lto/opt-level.ll
Normal file
@@ -0,0 +1,20 @@
|
||||
; RUN: llvm-as %s -o %t.o
|
||||
; RUN: env DYLD_LIBRARY_PATH=%llvmshlibdir %ld64 -arch x86_64 -dylib -mllvm -O0 -o %t.dylib %t.o
|
||||
; RUN: llvm-nm -no-llvm-bc %t.dylib | FileCheck --check-prefix=CHECK-O0 %s
|
||||
; RUN: env DYLD_LIBRARY_PATH=%llvmshlibdir %ld64 -arch x86_64 -dylib -mllvm -O2 -o %t.dylib %t.o
|
||||
; RUN: llvm-nm -no-llvm-bc %t.dylib | FileCheck --check-prefix=CHECK-O2 %s
|
||||
|
||||
target triple = "x86_64-apple-macosx10.8.0"
|
||||
|
||||
; CHECK-O0: t _f1
|
||||
; CHECK-O2-NOT: _f1
|
||||
define internal void @f1() {
|
||||
ret void
|
||||
}
|
||||
|
||||
; CHECK-O0: T _f2
|
||||
; CHECK-O2: T _f2
|
||||
define void @f2() {
|
||||
call void @f1()
|
||||
ret void
|
||||
}
|
||||
Reference in New Issue
Block a user