Allow implicit casts during arithmetic for OCUVector operations
Add codegen support and test for said casts.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@45443 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/ocu-vector.c b/test/CodeGen/ocu-vector.c
index 9e904f6..ee6e737 100644
--- a/test/CodeGen/ocu-vector.c
+++ b/test/CodeGen/ocu-vector.c
@@ -1,7 +1,6 @@
 // RUN: clang -emit-llvm %s
 
 typedef __attribute__(( ocu_vector_type(4) )) float float4;
-//typedef __attribute__(( ocu_vector_type(3) )) float float3;
 typedef __attribute__(( ocu_vector_type(2) )) float float2;
 
 
@@ -33,3 +32,16 @@
   float d = 4.0f;
   *out = ((float4) {a,b,c,d});
 }
+
+static void test5(float4 *out) {
+  float a;
+  float4 b;
+  
+  a = 1.0f;
+  b = a;
+  b = b * 5.0f;
+  b = 5.0f * b;
+  b *= a;
+  
+  *out = b;
+}