diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 1 | ||||
-rw-r--r-- | test/Makefile | 11 | ||||
-rw-r--r-- | test/lit.cfg | 4 | ||||
-rw-r--r-- | test/lit.site.cfg.in | 1 | ||||
-rw-r--r-- | test/tools/lto/cfi_endproc.ll | 20 | ||||
-rw-r--r-- | test/tools/lto/lit.local.cfg | 3 |
6 files changed, 27 insertions, 13 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 392f5f218e..4effaf727c 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -28,6 +28,7 @@ set(LLVM_TEST_DEPENDS llvm-extract llvm-dwarfdump llvm-link + llvm-lto llvm-mc llvm-mcmarkup llvm-nm diff --git a/test/Makefile b/test/Makefile index 33c8a0c1dc..fc85f24e7e 100644 --- a/test/Makefile +++ b/test/Makefile @@ -116,16 +116,6 @@ else ENABLE_ASSERTIONS=1 endif -# Derive whether or not LTO is enabled by checking the extra options. -LTO_IS_ENABLED := 0 -ifneq ($(findstring -flto,$(CompileCommonOpts)),) -LTO_IS_ENABLED := 1 -else -ifneq ($(findstring -O4,$(CompileCommonOpts)),) -LTO_IS_ENABLED := 1 -endif -endif - lit.site.cfg: FORCE @echo "Making LLVM 'lit.site.cfg' file..." @$(ECHOPATH) s=@LLVM_HOST_TRIPLE@=$(HOST_TRIPLE)=g > lit.tmp @@ -139,7 +129,6 @@ lit.site.cfg: FORCE @$(ECHOPATH) s=@OCAMLOPT@=$(OCAMLOPT) -cc $(subst *,'\\\"',*$(subst =,"\\=",$(CXX_FOR_OCAMLOPT))*) -I $(LibDir)/ocaml=g >> lit.tmp @$(ECHOPATH) s=@ENABLE_SHARED@=$(ENABLE_SHARED)=g >> lit.tmp @$(ECHOPATH) s=@ENABLE_ASSERTIONS@=$(ENABLE_ASSERTIONS)=g >> lit.tmp - @$(ECHOPATH) s=@LTO_IS_ENABLED@=$(LTO_IS_ENABLED)=g >> lit.tmp @$(ECHOPATH) s=@TARGETS_TO_BUILD@=$(TARGETS_TO_BUILD)=g >> lit.tmp @$(ECHOPATH) s=@LLVM_BINDINGS@=$(BINDINGS_TO_BUILD)=g >> lit.tmp @$(ECHOPATH) s=@HOST_OS@=$(HOST_OS)=g >> lit.tmp diff --git a/test/lit.cfg b/test/lit.cfg index 9e4e0b0229..ea9303d197 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -221,7 +221,9 @@ for pattern in [r"\bbugpoint\b(?!-)", r"(?<!/|-)\bclang\b(?!-)", r"\bllvm-size\b", # Match llvmc but not -llvmc NOHYPHEN + r"\bllvmc\b", - r"\blto\b", + r"\bllvm-lto\b", + # Match lto but not -lto + NOHYPHEN + r"\blto\b", # Don't match '.opt', '-opt', # '^opt' or '/opt'. r"\bmacho-dump\b", r"(?<!\.|-|\^|/)\bopt\b", diff --git a/test/lit.site.cfg.in b/test/lit.site.cfg.in index 6ebdddf5f8..72fd9c9ff7 100644 --- a/test/lit.site.cfg.in +++ b/test/lit.site.cfg.in @@ -14,7 +14,6 @@ config.python_executable = "@PYTHON_EXECUTABLE@" config.ocamlopt_executable = "@OCAMLOPT@" config.enable_shared = @ENABLE_SHARED@ config.enable_assertions = @ENABLE_ASSERTIONS@ -config.lto_is_enabled = "@LTO_IS_ENABLED@" config.targets_to_build = "@TARGETS_TO_BUILD@" config.llvm_bindings = "@LLVM_BINDINGS@" config.host_os = "@HOST_OS@" diff --git a/test/tools/lto/cfi_endproc.ll b/test/tools/lto/cfi_endproc.ll new file mode 100644 index 0000000000..0a47b0225e --- /dev/null +++ b/test/tools/lto/cfi_endproc.ll @@ -0,0 +1,20 @@ +; RUN: llvm-as < %s >%t1 +; RUN: llvm-lto -o %t2 %t1 + +target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128" +target triple = "x86_64-unknown-linux-gnu" + +module asm ".text" +module asm ".align 16, 0x90" +module asm ".type PR14512, @function" +module asm "PR14512:.cfi_startproc" +module asm "ret" +module asm ".cfi_endproc" + +declare void @PR14512() + +define i32 @main(i32 %argc, i8** %argv) { + call void @PR14512() + ret i32 0 +} +; XFAIL: win32 diff --git a/test/tools/lto/lit.local.cfg b/test/tools/lto/lit.local.cfg new file mode 100644 index 0000000000..6df0e03ee6 --- /dev/null +++ b/test/tools/lto/lit.local.cfg @@ -0,0 +1,3 @@ +targets = set(config.root.targets_to_build.split()) +if not 'X86' in targets: + config.unsupported = True |