aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShengchen Kan <shengchen.kan@intel.com>2024-01-09 14:24:28 +0800
committerShengchen Kan <shengchen.kan@intel.com>2024-01-09 14:28:38 +0800
commit38ce770ef13131dce92a76ff80e6d5caba2d8422 (patch)
tree3da2f83c7d466622dff01e142603f3190d782a07
parent0c24c175f262b1043752c67798cd83f79188e9d2 (diff)
downloadllvm-38ce770ef13131dce92a76ff80e6d5caba2d8422.zip
llvm-38ce770ef13131dce92a76ff80e6d5caba2d8422.tar.gz
llvm-38ce770ef13131dce92a76ff80e6d5caba2d8422.tar.bz2
[X86][test] Add test to check ah is not allocatable for register class gr8_norex2
This test should be added after #73529
-rw-r--r--llvm/test/CodeGen/X86/apx/gr8_norex2.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/apx/gr8_norex2.ll b/llvm/test/CodeGen/X86/apx/gr8_norex2.ll
new file mode 100644
index 0000000..afa62f7
--- /dev/null
+++ b/llvm/test/CodeGen/X86/apx/gr8_norex2.ll
@@ -0,0 +1,9 @@
+; Check ah is not allocatable for register class gr8_norex2
+; RUN: not llc < %s -mtriple=x86_64-unknown-unknown 2>&1 | FileCheck %s
+
+define void @gr8_norex2() {
+; CHECK: error: inline assembly requires more registers than available
+ %1 = tail call i8 asm sideeffect "movb %r14b, $0", "=r,~{al},~{rbx},~{rcx},~{rdx},~{rdi},~{rsi},~{rbp},~{rsp},~{r8},~{r9},~{r10},~{r11},~{r12},~{r13},~{r14},~{r15},~{dirflag},~{fpsr},~{flags}"()
+ ret void
+}
+