implement rdar://10639962 by keeping track of increased alignment 
information even in subscripting operations.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147557 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/alignment.c b/test/CodeGen/alignment.c
index e1c9e9e..9384ec8 100644
--- a/test/CodeGen/alignment.c
+++ b/test/CodeGen/alignment.c
@@ -47,3 +47,13 @@
 // CHECK: ret void
 
 
+
+typedef float __attribute__((vector_size(16), aligned(64))) float4align64;
+
+// rdar://10639962 - Typedef alignment lost in p[]-style dereferencing
+void test4(float4align64 *p) {
+  p[0] = (float4align64){ 3.2f, 2.3f, 0.1f, 0.0f };
+}
+// CHECK: @test4(
+// CHECK: store <4 x float> {{.*}}, <4 x float>* %arrayidx, align 64
+