xref: /llvm-project/llvm/test/CodeGen/X86/apx/asm-constraint-2-jR.ll (revision fc2b15987b417174ee6d899178af08c47e04575b)
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: not llc -mtriple=x86_64 %s -o %t 2>&1 | FileCheck %s --check-prefix=ERR
3; RUN: llc -mtriple=x86_64 -mattr=+egpr < %s | FileCheck %s
4; RUN: llc -mtriple=x86_64 -mattr=+egpr,+inline-asm-use-gpr32 < %s | FileCheck %s
5; RUN: not llc -mtriple=x86_64 -mattr=+inline-asm-use-gpr32 %s -o %t 2>&1 | FileCheck %s --check-prefix=ERR
6
7; ERR: error: inline assembly requires more registers than available
8
9define void @constraint_jR_test() nounwind {
10; CHECK-LABEL: constraint_jR_test:
11; CHECK:    addq %r16, %rax
12entry:
13  %reg = alloca i64, align 8
14  %0 = load i64, ptr %reg, align 8
15  call void asm sideeffect "add $0, %rax", "^jR,~{rax},~{rbx},~{rbp},~{rcx},~{rdx},~{rdi},~{rsi},~{r8},~{r9},~{r10},~{r11},~{r12},~{r13},~{r14},~{r15},~{dirflag},~{fpsr},~{flags}"(i64 %0)
16  ret void
17}
18