1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/test/tools/gold/X86/emit-asm.ll
Teresa Johnson 1ee00738b8 [gold] emit assembly listing from gold plugin on LTO stage
Summary:
Sometimes it's useful to emit assembly after LTO stage to modify it manually. Emitting precodegen bitcode file (via save-temps plugin option) and then feeding it to llc doesn't always give the same binary as original.
This patch is simpler alternative to https://reviews.llvm.org/D24020.

Patch by Denis Bakhvalov.

Reviewers: mehdi_amini, tejohnson

Reviewed By: tejohnson

Subscribers: MaskRay, inglorion, dexonsmith, llvm-commits

Differential Revision: https://reviews.llvm.org/D56114

llvm-svn: 350276
2019-01-02 23:48:00 +00:00

26 lines
643 B
LLVM

; RUN: llvm-as %s -o %t.o
; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \
; RUN: -m elf_x86_64 --plugin-opt=emit-asm \
; RUN: -shared %t.o -o %t2.s
; RUN: FileCheck --input-file %t2.s %s
; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \
; RUN: -m elf_x86_64 --plugin-opt=emit-asm --plugin-opt=lto-partitions=2\
; RUN: -shared %t.o -o %t2.s
; RUN: cat %t2.s %t2.s1 > %t3.s
; RUN: FileCheck --input-file %t3.s %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
; CHECK-DAG: f1:
define void @f1() {
ret void
}
; CHECK-DAG: f2:
define void @f2() {
ret void
}