[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / CodeGen / hexagon-inline-asm.c
blob31c27f95029b48b7f609cfd15956cc221b3b0582
1 // RUN: %clang_cc1 -triple hexagon-unknown-elf -target-feature +hvx -target-feature +hvx-length64b -emit-llvm -o - %s | FileCheck %s
3 typedef int v64 __attribute__((__vector_size__(64)))
4 __attribute__((aligned(64)));
6 int g;
8 void foo(v64 v0, v64 v1, v64 *p) {
9 int r;
10 v64 q0;
11 asm ("%0 = vgtw(%1.w,%2.w)" : "=q"(q0) : "v"(v0), "v"(v1));
12 // CHECK: call <16 x i32> asm "$0 = vgtw($1.w,$2.w)", "=q,v,v"(<16 x i32>{{.*}}, <16 x i32>{{.*}})
13 *p = q0;
15 asm ("%0 = memw(##%1)" : "=r"(r) : "s"(&g));
16 // CHECK: call i32 asm "$0 = memw(##$1)", "=r,s"(ptr @g)
19 void fred(unsigned *p, unsigned m, unsigned v) {
20 asm ("memw(%0++%1) = %2" : : "r"(p),"a"(m),"r"(v) : "memory");
21 // CHECK: call void asm sideeffect "memw($0++$1) = $2", "r,a,r,~{memory}"(ptr %{{.*}}, i32 %{{.*}}, i32 %{{.*}})