Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CodeGen / RISCV / riscv-inline-asm-clobber.c
blob8aa80386f205f8a1cda87f3d8d081c5e8beb206a
1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 3
2 // REQUIRES: riscv-registered-target
3 // RUN: %clang_cc1 -triple riscv32 -O2 -emit-llvm %s -o - \
4 // RUN: | FileCheck %s
5 // RUN: %clang_cc1 -triple riscv64 -O2 -emit-llvm %s -o - \
6 // RUN: | FileCheck %s
8 // Test RISC-V specific clobbered registers in inline assembly.
10 // CHECK-LABEL: define {{.*}} void @test_fflags
11 // CHECK: tail call void asm sideeffect "", "~{fflags}"()
12 void test_fflags(void) {
13 asm volatile ("" :::"fflags");
16 // CHECK-LABEL: define {{.*}} void @test_frm
17 // CHECK: tail call void asm sideeffect "", "~{frm}"()
18 void test_frm(void) {
19 asm volatile ("" :::"frm");
22 // CHECK-LABEL: define {{.*}} void @test_vtype
23 // CHECK: tail call void asm sideeffect "", "~{vtype}"()
24 void test_vtype(void) {
25 asm volatile ("" :::"vtype");
28 // CHECK-LABEL: define {{.*}} void @test_vl
29 // CHECK: tail call void asm sideeffect "", "~{vl}"()
30 void test_vl(void) {
31 asm volatile ("" :::"vl");
34 // CHECK-LABEL: define {{.*}} void @test_vxsat
35 // CHECK: tail call void asm sideeffect "", "~{vxsat}"()
36 void test_vxsat(void) {
37 asm volatile ("" :::"vxsat");
40 // CHECK-LABEL: define {{.*}} void @test_vxrm
41 // CHECK: tail call void asm sideeffect "", "~{vxrm}"()
42 void test_vxrm(void) {
43 asm volatile ("" :::"vxrm");