File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 1111; RUN: -o %t-out
1212; RUN: llvm-dis %t-out.0.5.precodegen.bc -o - | FileCheck %s
1313
14+ ; Check thin LTO as well
15+ ; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \
16+ ; RUN: -m elf_x86_64 \
17+ ; RUN: -plugin-opt=unifiedlto \
18+ ; RUN: -plugin-opt=thinlto \
19+ ; RUN: -plugin-opt=save-temps \
20+ ; RUN: -u main \
21+ ; RUN: %t.bc %t-foo.bc \
22+ ; RUN: -o %t-out
23+ ; RUN: llvm-dis %t.bc.5.precodegen.bc -o - | FileCheck %s --check-prefix=THIN
24+
1425; Constant propagation is not supported by thin LTO.
1526; With full LTO we fold argument into constant 43
1627; CHECK: define dso_local noundef i32 @main()
2031; CHECK: define internal fastcc void @foo()
2132; CHECK-NEXT: store i32 43, ptr @_g, align 4
2233
34+ ; ThinLTO doesn't import foo, because the latter has noinline attribute
35+ ; THIN: define dso_local i32 @main()
36+ ; THIN-NEXT: %1 = tail call i32 @foo(i32 noundef 1)
37+
2338target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
2439target triple = "x86_64-pc-linux-gnu"
2540
You can’t perform that action at this time.
0 commit comments