]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/ELF/lto/cpu-string.ll
Vendor import of lld trunk r338150:
[FreeBSD/FreeBSD.git] / test / ELF / lto / cpu-string.ll
1 ; REQUIRES: x86
2 ; RUN: llvm-as %s -o %t.o
3
4 ; RUN: ld.lld %t.o -o %t.so -shared
5 ; RUN: llvm-objdump -d -section=".text" -no-leading-addr -no-show-raw-insn %t.so | FileCheck %s
6 ; CHECK: nop{{$}}
7
8 ; RUN: ld.lld -mllvm -mcpu=znver1 %t.o -o %t.znver1.so -shared
9 ; RUN: llvm-objdump -d -section=".text" -no-leading-addr -no-show-raw-insn %t.znver1.so | FileCheck -check-prefix=ZNVER1 %s
10 ; ZNVER1: nopw
11
12 ; Check we are able to use -plugin-opt=mcpu=<CPU> to set CPU string.
13 ; RUN: ld.lld -plugin-opt=mcpu=znver1 %t.o -o %t.znver1.so -shared
14 ; RUN: llvm-objdump -d -section=".text" -no-leading-addr -no-show-raw-insn %t.znver1.so | FileCheck -check-prefix=ZNVER1 %s
15
16 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
17 target triple = "x86_64-unknown-linux-gnu"
18
19 define void @foo() #0 {
20 entry:
21   call void asm sideeffect ".p2align        4, 0x90", "~{dirflag},~{fpsr},~{flags}"()
22   ret void
23 }
24
25 attributes #0 = { "no-frame-pointer-elim"="true" }