brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1005 B · 414ee40 Raw
33 lines · plain
1; REQUIRES: x862; RUN: llvm-as %s -o %t1.o3; RUN: llvm-as %S/Inputs/linker-script-symbols-ipo.ll -o %t2.o4; RUN: echo "bar = foo;" > %t.script5 6;; Check that without linkerscript bar is inlined.7; RUN: ld.lld %t1.o %t2.o -o %t3 -save-temps8; RUN: llvm-objdump --no-print-imm-hex -d %t3 | FileCheck %s --check-prefix=IPO9; IPO:      Disassembly of section .text:10; IPO:      <_start>:11; IPO-NEXT:   movl $1, %eax12; IPO-NEXT:   retq13 14;; Check that LTO does not do IPO for symbols assigned by script.15; RUN: ld.lld %t1.o %t2.o -o %t4 --script %t.script -save-temps16; RUN: llvm-objdump --no-print-imm-hex -d %t4 | FileCheck %s --check-prefix=NOIPO17; NOIPO:      Disassembly of section .text:18; NOIPO:      <foo>:19; NOIPO-NEXT:   movl $2, %eax20; NOIPO:      <_start>:21; NOIPO-NEXT:   jmp 0x201160 <foo>22 23target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"24target triple = "x86_64-unknown-linux-gnu"25 26define i32 @bar() {27  ret i32 128}29 30define i32 @foo() {31  ret i32 232}33