"Fossies" - the Fresh Open Source Software Archive

Member "cfe-9.0.0.src/test/CodeGenCXX/x86_64-arguments-avx.cpp" (5 Jun 2019, 1182 Bytes) of package /linux/misc/cfe-9.0.0.src.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "x86_64-arguments-avx.cpp": 8.0.1_vs_9.0.0.

    1 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s -target-feature +avx | FileCheck %s
    2 
    3 namespace test1 {
    4 typedef double __m256d __attribute__((__vector_size__(32)));
    5 
    6 class PR22753 {
    7 public:
    8   __m256d data;
    9 };
   10 
   11 // CHECK: define <4 x double> @_ZN5test14testENS_7PR22753E(<4 x double>
   12 PR22753 test(PR22753 x) {
   13   return x;
   14 }
   15 }
   16 
   17 namespace test2 {
   18 typedef double __m128d __attribute__((__vector_size__(16)));
   19 typedef float __m128 __attribute__((__vector_size__(16)));
   20 typedef double __m256d __attribute__((__vector_size__(32)));
   21 typedef float __m256 __attribute__((__vector_size__(32)));
   22 
   23 union U1 {
   24   __m128  v1;
   25   __m128d v2;
   26 };
   27 
   28 union UU1 {
   29   union U1;
   30   __m128d v3;
   31 };
   32 
   33 // CHECK: define <2 x double> @_ZN5test27PR23082ENS_3UU1E(<2 x double>
   34 UU1 PR23082(UU1 x) {
   35   return x;
   36 }
   37 
   38 union U2 {
   39   __m256  v1;
   40   __m256d v2;
   41 };
   42 
   43 union UU2 {
   44   union U2;
   45   __m256d v3;
   46 };
   47 
   48 // CHECK: define <4 x double> @_ZN5test27PR23082ENS_3UU2E(<4 x double>
   49 UU2 PR23082(UU2 x) {
   50   return x;
   51 }
   52 }
   53 
   54 namespace test3 {
   55 union U {
   56   __attribute__((__vector_size__(32))) float f1;
   57   int f2;
   58 };
   59 // CHECK: define i32 @_ZN5test31fENS_1UE({{.*}}* byval({{.*}}) align 32
   60 int f(U u) { return u.f2; }
   61 }