Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGen / LoongArch / inline-asm-gcc-regs-error.c
blobc5ecf0c929af8a4b11c11ba455ac74ffd64769e1
1 // RUN: not %clang_cc1 -triple loongarch32 -emit-llvm %s 2>&1 -o - | FileCheck %s
2 // RUN: not %clang_cc1 -triple loongarch64 -emit-llvm %s 2>&1 -o - | FileCheck %s
4 void test(void) {
5 // CHECK: :[[#@LINE+1]]:24: error: unknown register name '$r32' in asm
6 register int a0 asm ("$r32");
7 // CHECK: :[[#@LINE+1]]:26: error: unknown register name '$f32' in asm
8 register float a1 asm ("$f32");
9 // CHECK: :[[#@LINE+1]]:24: error: unknown register name '$foo' in asm
10 register int a2 asm ("$foo");
12 /// Names not prefixed with '$' are invalid.
14 // CHECK: :[[#@LINE+1]]:26: error: unknown register name 'f0' in asm
15 register float a5 asm ("f0");
16 // CHECK: :[[#@LINE+1]]:26: error: unknown register name 'fa0' in asm
17 register float a6 asm ("fa0");
18 // CHECK: :[[#@LINE+1]]:15: error: unknown register name 'fcc0' in asm
19 asm ("" ::: "fcc0");