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
16target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
17target triple = "x86_64-unknown-linux-gnu"
18
19define void @foo() #0 {
20entry:
21  call void asm sideeffect ".p2align        4, 0x90", "~{dirflag},~{fpsr},~{flags}"()
22  ret void
23}
24
25attributes #0 = { "frame-pointer"="all" }
26