File: aarch64-sve.c

package info (click to toggle)
llvm-toolchain-11 1%3A11.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 995,808 kB
  • sloc: cpp: 4,767,656; ansic: 760,916; asm: 477,436; python: 170,940; objc: 69,804; lisp: 29,914; sh: 23,855; f90: 18,173; pascal: 7,551; perl: 7,471; ml: 5,603; awk: 3,489; makefile: 2,573; xml: 915; cs: 573; fortran: 503; javascript: 452
file content (39 lines) | stat: -rw-r--r-- 1,200 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve \
// RUN:  -emit-llvm -o - %s 2>&1 | FileCheck %s -check-prefix=CHECK

// CHECK: @ptr = global <vscale x 16 x i8>* null, align 8
// CHECK: %s8 = alloca <vscale x 16 x i8>, align 16
// CHECK: %s16 = alloca <vscale x 8 x i16>, align 16
// CHECK: %s32 = alloca <vscale x 4 x i32>, align 16
// CHECK: %s64 = alloca <vscale x 2 x i64>, align 16
// CHECK: %u8 = alloca <vscale x 16 x i8>, align 16
// CHECK: %u16 = alloca <vscale x 8 x i16>, align 16
// CHECK: %u32 = alloca <vscale x 4 x i32>, align 16
// CHECK: %u64 = alloca <vscale x 2 x i64>, align 16
// CHECK: %f16 = alloca <vscale x 8 x half>, align 16
// CHECK: %f32 = alloca <vscale x 4 x float>, align 16
// CHECK: %f64 = alloca <vscale x 2 x double>, align 16
// CHECK: %bf16 = alloca <vscale x 8 x bfloat>, align 16
// CHECK: %b8 = alloca <vscale x 16 x i1>, align 2

__SVInt8_t *ptr;

void test_locals(void) {
  __SVInt8_t s8;
  __SVInt16_t s16;
  __SVInt32_t s32;
  __SVInt64_t s64;

  __SVUint8_t u8;
  __SVUint16_t u16;
  __SVUint32_t u32;
  __SVUint64_t u64;

  __SVFloat16_t f16;
  __SVFloat32_t f32;
  __SVFloat64_t f64;

  __SVBFloat16_t bf16;

  __SVBool_t b8;
}