diff options
Diffstat (limited to 'test/CodeGen/X86/ipra-inline-asm.ll')
| -rw-r--r-- | test/CodeGen/X86/ipra-inline-asm.ll | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/CodeGen/X86/ipra-inline-asm.ll b/test/CodeGen/X86/ipra-inline-asm.ll new file mode 100644 index 000000000000..e70b149e19e1 --- /dev/null +++ b/test/CodeGen/X86/ipra-inline-asm.ll @@ -0,0 +1,20 @@ +; RUN: llc -enable-ipra -print-regusage -o /dev/null 2>&1 < %s | FileCheck %s + +target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-apple-macosx10.12.0" + +; Verify that bar does not clobber anything +; CHECK-NOT: bar Clobbered Registers:{{.+}} +; CHECK: bar Clobbered Registers: +define void @bar() #0 { + ret void +} + +; Verifies that inline assembly is correctly handled by giving a list of clobbered registers +; CHECK: foo Clobbered Registers: AH AL AX CH CL CX DI DIL EAX ECX EDI RAX RCX RDI +define void @foo() #0 { + call void asm sideeffect "", "~{eax},~{ecx},~{edi}"() #0 + ret void +} + +attributes #0 = { nounwind } |
