Debian Codegraph @

clang/test/CIR/CodeGen/inline-asm.c

raw
1 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-cir %s -o %t.cir
2 // RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
3 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o %t-cir.ll
4 // RUN: FileCheck --input-file=%t-cir.ll %s --check-prefix=LLVM
5
6 void f1() {
7 // CIR: cir.asm(x86_att,
8 // CIR: out = [],
9 // CIR: in = [],
10 // CIR: in_out = [],
11 // CIR: {"" "~{dirflag},~{fpsr},~{flags}"}) side_effects
12 // LLVM: call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
13 __asm__ volatile("" : : : );
14 }
15
16 void f2() {
17 // CIR: cir.asm(x86_att,
18 // CIR: out = [],
19 // CIR: in = [],
20 // CIR: in_out = [],
21 // CIR: {"nop" "~{dirflag},~{fpsr},~{flags}"}) side_effects
22 // LLVM: call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
23 __asm__ volatile("nop" : : : );
24 }