1 ; RUN: llvm-as -o %t.bc %s
2 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext -plugin-opt=save-temps \
4 ; RUN: -plugin-opt=O0 -r -o %t.o %t.bc
5 ; RUN: llvm-dis < %t.o.0.4.opt.bc -o - | FileCheck --check-prefix=CHECK-O0 %s
6 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext -plugin-opt=save-temps \
8 ; RUN: -plugin-opt=O1 -r -o %t.o %t.bc
9 ; RUN: llvm-dis < %t.o.0.4.opt.bc -o - | FileCheck --check-prefix=CHECK-O1 %s
10 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext -plugin-opt=save-temps \
11 ; RUN: -m elf_x86_64 \
12 ; RUN: -plugin-opt=O2 -r -o %t.o %t.bc
13 ; RUN: llvm-dis < %t.o.0.4.opt.bc -o - | FileCheck --check-prefix=CHECK-O2 %s
15 ; CHECK-O0: define internal void @foo(
16 ; CHECK-O1: define internal void @foo(
17 ; CHECK-O2-NOT: define internal void @foo(
19 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
20 target triple = "x86_64-unknown-linux-gnu"
22 define internal void @foo() {
26 ; CHECK-O0: define internal i32 @bar(
27 ; CHECK-O1: define internal i32 @bar(
28 define internal i32 @bar(i1 %p) {
29 br i1 %p, label %t, label %f
40 %r = phi i32 [ 1, %t ], [ 2, %f ]
46 %c = call i32 @bar(i1 true)
47 %p = call i1 @llvm.type.test(i8* undef, metadata !"typeid1")
54 @a = constant i32 1, !type !0
56 !0 = !{i32 0, !"typeid1"}
58 declare i1 @llvm.type.test(i8* %ptr, metadata %bitset) nounwind readnone