brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.2 KiB · c0b607e Raw
80 lines · c
1// RUN: %clang_cc1 -w -triple x86_64-apple-darwin10 \2// RUN:  -emit-llvm -o - %s | FileCheck %s --check-prefix=ALL --check-prefix=SSE3// RUN: %clang_cc1 -w -triple   i386-apple-darwin10 \4// RUN:  -emit-llvm -o - %s | FileCheck %s --check-prefix=ALL --check-prefix=SSE5// RUN: %clang_cc1 -w -triple x86_64-apple-darwin10 -target-feature +avx \6// RUN:  -emit-llvm -o - %s | FileCheck %s --check-prefix=ALL --check-prefix=AVX7// RUN: %clang_cc1 -w -triple   i386-apple-darwin10 -target-feature +avx \8// RUN:  -emit-llvm -o - %s | FileCheck %s --check-prefix=ALL --check-prefix=AVX9// RUN: %clang_cc1 -w -triple x86_64-apple-darwin10 -target-feature +avx512f \10// RUN:  -emit-llvm -o - %s | FileCheck %s --check-prefix=ALL --check-prefix=AVX51211// RUN: %clang_cc1 -w -triple   i386-apple-darwin10 -target-feature +avx512f \12// RUN:  -emit-llvm -o - %s | FileCheck %s --check-prefix=ALL --check-prefix=AVX51213 14// At or below target max alignment with no aligned attribute should align based15// on the size of vector.16double __attribute__((vector_size(16))) v1;17// SSE: @v1 {{.*}}, align 1618// AVX: @v1 {{.*}}, align 1619// AVX512: @v1 {{.*}}, align 1620double __attribute__((vector_size(32))) v2;21// SSE: @v2 {{.*}}, align 1622// AVX: @v2 {{.*}}, align 3223// AVX512: @v2 {{.*}}, align 3224typedef __attribute__((__ext_vector_type__(16))) _Bool v2b_type;25v2b_type v2b;26// ALL: @v2b {{.*}}, align 227 28// Alignment above target max alignment with no aligned attribute should align29// based on the target max.30double __attribute__((vector_size(64))) v3;31// SSE: @v3 {{.*}}, align 1632// AVX: @v3 {{.*}}, align 3233// AVX512: @v3 {{.*}}, align 6434double __attribute__((vector_size(1024))) v4;35// SSE: @v4 {{.*}}, align 1636// AVX: @v4 {{.*}}, align 3237// AVX512: @v4 {{.*}}, align 6438typedef __attribute__((__ext_vector_type__(8192))) _Bool v4b_type;39v4b_type v4b;40// SSE: @v4b {{.*}}, align 1641// AVX: @v4b {{.*}}, align 3242// AVX512: @v4b {{.*}}, align 6443 44// Aliged attribute should always override.45double __attribute__((vector_size(16), aligned(16))) v5;46// ALL: @v5 {{.*}}, align 1647double __attribute__((vector_size(16), aligned(64))) v6;48// ALL: @v6 {{.*}}, align 6449double __attribute__((vector_size(32), aligned(16))) v7;50// ALL: @v7 {{.*}}, align 1651double __attribute__((vector_size(32), aligned(64))) v8;52// ALL: @v8 {{.*}}, align 6453typedef __attribute__((ext_vector_type(256), aligned(128))) _Bool v8b_type;54v8b_type v8b;55// ALL: @v8b {{.*}}, align 12856 57// Check non-power of 2 widths.58double __attribute__((vector_size(24))) v9;59// SSE: @v9 {{.*}}, align 1660// AVX: @v9 {{.*}}, align 3261// AVX512: @v9 {{.*}}, align 3262double __attribute__((vector_size(40))) v10;63// SSE: @v10 {{.*}}, align 1664// AVX: @v10 {{.*}}, align 3265// AVX512: @v10 {{.*}}, align 6466typedef __attribute__((ext_vector_type(248))) _Bool v10b_type;67v10b_type v10b;68// SSE: @v10b {{.*}}, align 1669// AVX: @v10b {{.*}}, align 3270// AVX512: @v10b {{.*}}, align 3271 72// Check non-power of 2 widths with aligned attribute.73double __attribute__((vector_size(24), aligned(64))) v11;74// ALL: @v11 {{.*}}, align 6475double __attribute__((vector_size(80), aligned(16))) v12;76// ALL: @v12 {{.*}}, align 1677typedef __attribute__((ext_vector_type(248), aligned(4))) _Bool v12b_type;78v12b_type v12b;79// ALL: @v12b {{.*}}, align 480