1 // RUN: %clang_cc1 -triple i686-linux-gnu -target-cpu i686 -emit-llvm %s -o - | FileCheck %s 2 3 typedef signed long long V2LLi __attribute__((vector_size(16))); 4 typedef signed long long V4LLi __attribute__((vector_size(32))); 5 6 V2LLi ret_128(); 7 V4LLi ret_256(); 8 void arg_128(V2LLi); 9 void arg_256(V4LLi); 10 11 // Make sure return type forces a min-legal-width foo(void)12V2LLi foo(void) { 13 return (V2LLi){ 0, 0 }; 14 } 15 goo(void)16V4LLi goo(void) { 17 return (V4LLi){ 0, 0 }; 18 } 19 20 // Make sure return type of called function forces a min-legal-width hoo(void)21void hoo(void) { 22 V2LLi tmp_V2LLi; 23 tmp_V2LLi = ret_128(); 24 } 25 joo(void)26void joo(void) { 27 V4LLi tmp_V4LLi; 28 tmp_V4LLi = ret_256(); 29 } 30 31 // Make sure arg type of called function forces a min-legal-width koo(void)32void koo(void) { 33 V2LLi tmp_V2LLi; 34 arg_128(tmp_V2LLi); 35 } 36 loo(void)37void loo(void) { 38 V4LLi tmp_V4LLi; 39 arg_256(tmp_V4LLi); 40 } 41 42 // Make sure arg type of our function forces a min-legal-width moo(V2LLi x)43void moo(V2LLi x) { 44 45 } 46 noo(V4LLi x)47void noo(V4LLi x) { 48 49 } 50 51 // CHECK: {{.*}}@foo{{.*}} #0 52 // CHECK: {{.*}}@goo{{.*}} #1 53 // CHECK: {{.*}}@hoo{{.*}} #0 54 // CHECK: {{.*}}@joo{{.*}} #1 55 // CHECK: {{.*}}@koo{{.*}} #0 56 // CHECK: {{.*}}@loo{{.*}} #1 57 // CHECK: {{.*}}@moo{{.*}} #0 58 // CHECK: {{.*}}@noo{{.*}} #1 59 60 // CHECK: #0 = {{.*}}"min-legal-vector-width"="128" 61 // CHECK: #1 = {{.*}}"min-legal-vector-width"="256" 62