File: aix-altivec.c

package info (click to toggle)
llvm-toolchain-15 1%3A15.0.6-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,554,644 kB
  • sloc: cpp: 5,922,452; ansic: 1,012,136; asm: 674,362; python: 191,568; objc: 73,855; f90: 42,327; lisp: 31,913; pascal: 11,973; javascript: 10,144; sh: 9,421; perl: 7,447; ml: 5,527; awk: 3,523; makefile: 2,520; xml: 885; cs: 573; fortran: 567
file content (44 lines) | stat: -rw-r--r-- 2,135 bytes parent folder | download
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
40
41
42
43
44
// REQUIRES: powerpc-registered-target
// RUN: %clang_cc1 -no-opaque-pointers -triple powerpc64-unknown-aix -target-feature +altivec -target-cpu pwr8 -emit-llvm %s -o - | FileCheck %s
// RUN: %clang_cc1 -no-opaque-pointers -triple powerpc-unknown-aix -target-feature +altivec -target-cpu pwr8 -emit-llvm %s -o - | FileCheck %s
vector float foo1(vector float x) { return x; }
// CHECK:  define <4 x float> @foo1(<4 x float> noundef %x) [[ATTR:#[0-9]+]] {
// CHECK:  entry:
// CHECK:    %x.addr = alloca <4 x float>, align 16
// CHECK:    store <4 x float> %x, <4 x float>* %x.addr, align 16
// CHECK:    %0 = load <4 x float>, <4 x float>* %x.addr, align 16
// CHECK:    ret <4 x float> %0
// CHECK:  }
vector double foo2(vector double x) { return x; }
// CHECK:  define <2 x double> @foo2(<2 x double> noundef %x) [[ATTR]] {
// CHECK:  entry:
// CHECK:    %x.addr = alloca <2 x double>, align 16
// CHECK:    store <2 x double> %x, <2 x double>* %x.addr, align 16
// CHECK:    %0 = load <2 x double>, <2 x double>* %x.addr, align 16
// CHECK:    ret <2 x double> %0
// CHECK:  }
vector int foo3(vector int x) { return x; }
// CHECK:  define <4 x i32> @foo3(<4 x i32> noundef %x) [[ATTR]] {
// CHECK:  entry:
// CHECK:    %x.addr = alloca <4 x i32>, align 16
// CHECK:    store <4 x i32> %x, <4 x i32>* %x.addr, align 16
// CHECK:    %0 = load <4 x i32>, <4 x i32>* %x.addr, align 16
// CHECK:    ret <4 x i32> %0
// CHECK:  }
vector short int foo4(vector short int x) { return x; }
// CHECK:  define <8 x i16> @foo4(<8 x i16> noundef %x) [[ATTR]] {
// CHECK:  entry:
// CHECK:    %x.addr = alloca <8 x i16>, align 16
// CHECK:    store <8 x i16> %x, <8 x i16>* %x.addr, align 16
// CHECK:    %0 = load <8 x i16>, <8 x i16>* %x.addr, align 16
// CHECK:    ret <8 x i16> %0
// CHECK:  }
vector char foo5(vector char x) { return x; }
// CHECK:  define <16 x i8> @foo5(<16 x i8> noundef %x) [[ATTR]] {
// CHECK:  entry:
// CHECK:    %x.addr = alloca <16 x i8>, align 16
// CHECK:    store <16 x i8> %x, <16 x i8>* %x.addr, align 16
// CHECK:    %0 = load <16 x i8>, <16 x i8>* %x.addr, align 16
// CHECK:    ret <16 x i8> %0
// CHECK:  }