[llvm] 38ce770 - [X86][test] Add test to check ah is not allocatable for register class gr8_norex2

Shengchen Kan via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 8 22:29:38 PST 2024


Author: Shengchen Kan
Date: 2024-01-09T14:28:38+08:00
New Revision: 38ce770ef13131dce92a76ff80e6d5caba2d8422

URL: https://github.com/llvm/llvm-project/commit/38ce770ef13131dce92a76ff80e6d5caba2d8422
DIFF: https://github.com/llvm/llvm-project/commit/38ce770ef13131dce92a76ff80e6d5caba2d8422.diff

LOG: [X86][test] Add test to check ah is not allocatable for register class gr8_norex2

This test should be added after #73529

Added: 
    llvm/test/CodeGen/X86/apx/gr8_norex2.ll

Modified: 
    

Removed: 
    


################################################################################
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 00000000000000..afa62f72abbe0e
--- /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
+}
+


        


More information about the llvm-commits mailing list