[opaque pointer type] Add textual IR support for explicit type parameter to getelemen...
[oota-llvm.git] / test / Transforms / ScalarRepl / 2011-06-08-VectorExtractValue.ll
index 459688547fb47a33f1b108331aa596a1a25393f9..1f5a2d8da88790852d3e3eb6fe2ea38c7a2137da 100644 (file)
@@ -16,11 +16,11 @@ define void @main() uwtable ssp {
 entry:
   %ref.tmp2 = alloca %0, align 16
   %tmpcast = bitcast %0* %ref.tmp2 to %struct.Point_3*
-  %0 = getelementptr %0* %ref.tmp2, i64 0, i32 0
+  %0 = getelementptr %0, %0* %ref.tmp2, i64 0, i32 0
   store <2 x float> zeroinitializer, <2 x float>* %0, align 16
-  %1 = getelementptr inbounds %struct.Point_3* %tmpcast, i64 0, i32 0
-  %base.i.i.i = getelementptr inbounds %struct.PointC3* %1, i64 0, i32 0
-  %arrayidx.i.i.i.i = getelementptr inbounds %struct.array* %base.i.i.i, i64 0, i32 0, i64 0
+  %1 = getelementptr inbounds %struct.Point_3, %struct.Point_3* %tmpcast, i64 0, i32 0
+  %base.i.i.i = getelementptr inbounds %struct.PointC3, %struct.PointC3* %1, i64 0, i32 0
+  %arrayidx.i.i.i.i = getelementptr inbounds %struct.array, %struct.array* %base.i.i.i, i64 0, i32 0, i64 0
   %tmp5.i.i = load float* %arrayidx.i.i.i.i, align 4
   ret void
 }
@@ -33,7 +33,7 @@ define void @test1() uwtable ssp {
 entry:
   %ref.tmp2 = alloca {<2 x float>, float}, align 16
   %tmpcast = bitcast {<2 x float>, float}* %ref.tmp2 to float*
-  %0 = getelementptr {<2 x float>, float}* %ref.tmp2, i64 0, i32 0
+  %0 = getelementptr {<2 x float>, float}, {<2 x float>, float}* %ref.tmp2, i64 0, i32 0
   store <2 x float> zeroinitializer, <2 x float>* %0, align 16
   %tmp5.i.i = load float* %tmpcast, align 4
   ret void
@@ -50,8 +50,8 @@ define float @test2() uwtable ssp {
 entry:
   %ref.tmp2 = alloca {<2 x float>, float}, align 16
   %tmpcast = bitcast {<2 x float>, float}* %ref.tmp2 to float*
-  %tmpcast2 = getelementptr {<2 x float>, float}* %ref.tmp2, i64 0, i32 1
-  %0 = getelementptr {<2 x float>, float}* %ref.tmp2, i64 0, i32 0
+  %tmpcast2 = getelementptr {<2 x float>, float}, {<2 x float>, float}* %ref.tmp2, i64 0, i32 1
+  %0 = getelementptr {<2 x float>, float}, {<2 x float>, float}* %ref.tmp2, i64 0, i32 0
   store <2 x float> zeroinitializer, <2 x float>* %0, align 16
   store float 1.0, float* %tmpcast2, align 4
   %r1 = load float* %tmpcast, align 4
@@ -69,7 +69,7 @@ entry:
   %ai = alloca { <2 x float>, <2 x float> }, align 8
   store { <2 x float>, <2 x float> } {<2 x float> <float 0.0, float 1.0>, <2 x float> <float 2.0, float 3.0>}, { <2 x float>, <2 x float> }* %ai, align 8
   %tmpcast = bitcast { <2 x float>, <2 x float> }* %ai to [4 x float]*
-  %arrayidx = getelementptr inbounds [4 x float]* %tmpcast, i64 0, i64 3
+  %arrayidx = getelementptr inbounds [4 x float], [4 x float]* %tmpcast, i64 0, i64 3
   %f = load float* %arrayidx, align 4
   ret float %f
 }