diff test/Analysis/BasicAA/struct-geps.ll @ 95:afa8332a0e37 LLVM3.8

LLVM 3.8
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Tue, 13 Oct 2015 17:48:58 +0900
parents 60c9769439b8
children 1172e4bd9c6f
line wrap: on
line diff
--- a/test/Analysis/BasicAA/struct-geps.ll	Wed Feb 18 14:56:07 2015 +0900
+++ b/test/Analysis/BasicAA/struct-geps.ll	Tue Oct 13 17:48:58 2015 +0900
@@ -27,9 +27,9 @@
 ; CHECK-DAG: MustAlias: i32* %y, i80* %y_10
 
 define void @test_simple(%struct* %st, i64 %i, i64 %j, i64 %k) {
-  %x = getelementptr %struct* %st, i64 %i, i32 0
-  %y = getelementptr %struct* %st, i64 %j, i32 1
-  %z = getelementptr %struct* %st, i64 %k, i32 2
+  %x = getelementptr %struct, %struct* %st, i64 %i, i32 0
+  %y = getelementptr %struct, %struct* %st, i64 %j, i32 1
+  %z = getelementptr %struct, %struct* %st, i64 %k, i32 2
   %y_12 = bitcast i32* %y to %struct*
   %y_10 = bitcast i32* %y to i80*
   %y_8 = bitcast i32* %y to i64*
@@ -59,9 +59,9 @@
 ; CHECK-DAG: MustAlias: i32* %y, i80* %y_10
 
 define void @test_in_array([1 x %struct]* %st, i64 %i, i64 %j, i64 %k, i64 %i1, i64 %j1, i64 %k1) {
-  %x = getelementptr [1 x %struct]* %st, i64 %i, i64 %i1, i32 0
-  %y = getelementptr [1 x %struct]* %st, i64 %j, i64 %j1, i32 1
-  %z = getelementptr [1 x %struct]* %st, i64 %k, i64 %k1, i32 2
+  %x = getelementptr [1 x %struct], [1 x %struct]* %st, i64 %i, i64 %i1, i32 0
+  %y = getelementptr [1 x %struct], [1 x %struct]* %st, i64 %j, i64 %j1, i32 1
+  %z = getelementptr [1 x %struct], [1 x %struct]* %st, i64 %k, i64 %k1, i32 2
   %y_12 = bitcast i32* %y to %struct*
   %y_10 = bitcast i32* %y to i80*
   %y_8 = bitcast i32* %y to i64*
@@ -91,9 +91,9 @@
 ; CHECK-DAG: MustAlias: i32* %y, i80* %y_10
 
 define void @test_in_3d_array([1 x [1 x [1 x %struct]]]* %st, i64 %i, i64 %j, i64 %k, i64 %i1, i64 %j1, i64 %k1, i64 %i2, i64 %j2, i64 %k2, i64 %i3, i64 %j3, i64 %k3) {
-  %x = getelementptr [1 x [1 x [1 x %struct]]]* %st, i64 %i, i64 %i1, i64 %i2, i64 %i3, i32 0
-  %y = getelementptr [1 x [1 x [1 x %struct]]]* %st, i64 %j, i64 %j1, i64 %j2, i64 %j3, i32 1
-  %z = getelementptr [1 x [1 x [1 x %struct]]]* %st, i64 %k, i64 %k1, i64 %k2, i64 %k3, i32 2
+  %x = getelementptr [1 x [1 x [1 x %struct]]], [1 x [1 x [1 x %struct]]]* %st, i64 %i, i64 %i1, i64 %i2, i64 %i3, i32 0
+  %y = getelementptr [1 x [1 x [1 x %struct]]], [1 x [1 x [1 x %struct]]]* %st, i64 %j, i64 %j1, i64 %j2, i64 %j3, i32 1
+  %z = getelementptr [1 x [1 x [1 x %struct]]], [1 x [1 x [1 x %struct]]]* %st, i64 %k, i64 %k1, i64 %k2, i64 %k3, i32 2
   %y_12 = bitcast i32* %y to %struct*
   %y_10 = bitcast i32* %y to i80*
   %y_8 = bitcast i32* %y to i64*
@@ -116,13 +116,13 @@
 ; CHECK-DAG: PartialAlias: i32* %y2, i32* %z
 
 define void @test_same_underlying_object_same_indices(%struct* %st, i64 %i, i64 %j, i64 %k) {
-  %st2 = getelementptr %struct* %st, i32 10
-  %x2 = getelementptr %struct* %st2, i64 %i, i32 0
-  %y2 = getelementptr %struct* %st2, i64 %j, i32 1
-  %z2 = getelementptr %struct* %st2, i64 %k, i32 2
-  %x = getelementptr %struct* %st, i64 %i, i32 0
-  %y = getelementptr %struct* %st, i64 %j, i32 1
-  %z = getelementptr %struct* %st, i64 %k, i32 2
+  %st2 = getelementptr %struct, %struct* %st, i32 10
+  %x2 = getelementptr %struct, %struct* %st2, i64 %i, i32 0
+  %y2 = getelementptr %struct, %struct* %st2, i64 %j, i32 1
+  %z2 = getelementptr %struct, %struct* %st2, i64 %k, i32 2
+  %x = getelementptr %struct, %struct* %st, i64 %i, i32 0
+  %y = getelementptr %struct, %struct* %st, i64 %j, i32 1
+  %z = getelementptr %struct, %struct* %st, i64 %k, i32 2
   ret void
 }
 
@@ -142,13 +142,13 @@
 ; CHECK-DAG: PartialAlias: i32* %y2, i32* %z
 
 define void @test_same_underlying_object_different_indices(%struct* %st, i64 %i1, i64 %j1, i64 %k1, i64 %i2, i64 %k2, i64 %j2) {
-  %st2 = getelementptr %struct* %st, i32 10
-  %x2 = getelementptr %struct* %st2, i64 %i2, i32 0
-  %y2 = getelementptr %struct* %st2, i64 %j2, i32 1
-  %z2 = getelementptr %struct* %st2, i64 %k2, i32 2
-  %x = getelementptr %struct* %st, i64 %i1, i32 0
-  %y = getelementptr %struct* %st, i64 %j1, i32 1
-  %z = getelementptr %struct* %st, i64 %k1, i32 2
+  %st2 = getelementptr %struct, %struct* %st, i32 10
+  %x2 = getelementptr %struct, %struct* %st2, i64 %i2, i32 0
+  %y2 = getelementptr %struct, %struct* %st2, i64 %j2, i32 1
+  %z2 = getelementptr %struct, %struct* %st2, i64 %k2, i32 2
+  %x = getelementptr %struct, %struct* %st, i64 %i1, i32 0
+  %y = getelementptr %struct, %struct* %st, i64 %j1, i32 1
+  %z = getelementptr %struct, %struct* %st, i64 %k1, i32 2
   ret void
 }
 
@@ -158,7 +158,7 @@
 ; CHECK-LABEL: test_struct_in_array
 ; CHECK-DAG: MustAlias: i32* %x, i32* %y
 define void @test_struct_in_array(%struct2* %st, i64 %i, i64 %j, i64 %k) {
-  %x = getelementptr %struct2* %st, i32 0, i32 1, i32 1, i32 0
-  %y = getelementptr %struct2* %st, i32 0, i32 0, i32 1, i32 1
+  %x = getelementptr %struct2, %struct2* %st, i32 0, i32 1, i32 1, i32 0
+  %y = getelementptr %struct2, %struct2* %st, i32 0, i32 0, i32 1, i32 1
   ret void
 }