xref: /llvm-project/llvm/test/CodeGen/LoongArch/inline-asm-reg-names-error.ll (revision 9d4f7f44b64d87d1068859906f43b7ce03a7388b)
1; RUN: not llc --mtriple=loongarch32 -mattr=+d 2>&1 < %s | FileCheck %s
2; RUN: not llc --mtriple=loongarch64 -mattr=+d 2>&1 < %s | FileCheck %s
3
4define i32 @non_exit_r32(i32 %a) nounwind {
5; CHECK: error: couldn't allocate input reg for constraint '{$r32}'
6  %1 = tail call i32 asm "addi.w $0, $1, 1", "=r,{$r32}"(i32 %a)
7  ret i32 %1
8}
9
10define i32 @non_exit_foo(i32 %a) nounwind {
11; CHECK: error: couldn't allocate input reg for constraint '{$foo}'
12  %1 = tail call i32 asm "addi.w $0, $1, 1", "=r,{$foo}"(i32 %a)
13  ret i32 %1
14}
15