brintos

brintos / llvm-project-archived public Read only

0
0
Text · 883 B · dca3e58 Raw
33 lines · c
1// RUN: %clang_cc1 -triple i686-linux-gnu -target-cpu i686 -emit-llvm %s -o - | FileCheck %s2 3typedef double V2LLi __attribute__((vector_size(16)));4typedef double V4LLi __attribute__((vector_size(32)));5 6// Make sure builtin forces a min-legal-width attribute7void foo(void) {8  V2LLi  tmp_V2LLi;9 10  tmp_V2LLi = __builtin_ia32_undef128();11}12 13// Make sure explicit attribute larger than builtin wins.14void goo(void) __attribute__((__min_vector_width__(256))) {15  V2LLi  tmp_V2LLi;16 17  tmp_V2LLi = __builtin_ia32_undef128();18}19 20// Make sure builtin larger than explicit attribute wins.21void hoo(void) __attribute__((__min_vector_width__(128))) {22  V4LLi  tmp_V4LLi;23 24  tmp_V4LLi = __builtin_ia32_undef256();25}26 27// CHECK: foo{{.*}} #028// CHECK: goo{{.*}} #129// CHECK: hoo{{.*}} #130 31// CHECK: #0 = {{.*}}"min-legal-vector-width"="128"32// CHECK: #1 = {{.*}}"min-legal-vector-width"="256"33