diff options
author | Pirama Arumuga Nainar <pirama@google.com> | 2015-04-10 22:08:18 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-04-10 22:08:18 +0000 |
commit | 13a7db5b9c4f5e543d037be68ec3428216bfd550 (patch) | |
tree | 1b2c9792582e12f5af0b1512e3094425f0dc0df9 /test/Analysis/BasicAA/featuretest.ll | |
parent | 0eb46f5d1e06a4284663d636a74b06adc3a161d7 (diff) | |
parent | 31195f0bdca6ee2a5e72d07edf13e1d81206d949 (diff) | |
download | external_llvm-13a7db5b9c4f5e543d037be68ec3428216bfd550.zip external_llvm-13a7db5b9c4f5e543d037be68ec3428216bfd550.tar.gz external_llvm-13a7db5b9c4f5e543d037be68ec3428216bfd550.tar.bz2 |
am 31195f0b: Merge "Update aosp/master llvm for rebase to r233350"
* commit '31195f0bdca6ee2a5e72d07edf13e1d81206d949':
Update aosp/master llvm for rebase to r233350
Diffstat (limited to 'test/Analysis/BasicAA/featuretest.ll')
-rw-r--r-- | test/Analysis/BasicAA/featuretest.ll | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/test/Analysis/BasicAA/featuretest.ll b/test/Analysis/BasicAA/featuretest.ll index 47d278f..c621d0e 100644 --- a/test/Analysis/BasicAA/featuretest.ll +++ b/test/Analysis/BasicAA/featuretest.ll @@ -18,13 +18,13 @@ define i32 @different_array_test(i64 %A, i64 %B) { call void @external(i32* %Array1) call void @external(i32* %Array2) - %pointer = getelementptr i32* %Array1, i64 %A - %val = load i32* %pointer + %pointer = getelementptr i32, i32* %Array1, i64 %A + %val = load i32, i32* %pointer - %pointer2 = getelementptr i32* %Array2, i64 %B + %pointer2 = getelementptr i32, i32* %Array2, i64 %B store i32 7, i32* %pointer2 - %REMOVE = load i32* %pointer ; redundant with above load + %REMOVE = load i32, i32* %pointer ; redundant with above load %retval = sub i32 %REMOVE, %val ret i32 %retval ; CHECK: @different_array_test @@ -38,12 +38,12 @@ define i32 @constant_array_index_test() { %Array = alloca i32, i32 100 call void @external(i32* %Array) - %P1 = getelementptr i32* %Array, i64 7 - %P2 = getelementptr i32* %Array, i64 6 + %P1 = getelementptr i32, i32* %Array, i64 7 + %P2 = getelementptr i32, i32* %Array, i64 6 - %A = load i32* %P1 + %A = load i32, i32* %P1 store i32 1, i32* %P2 ; Should not invalidate load - %BREMOVE = load i32* %P1 + %BREMOVE = load i32, i32* %P1 %Val = sub i32 %A, %BREMOVE ret i32 %Val ; CHECK: @constant_array_index_test @@ -53,10 +53,10 @@ define i32 @constant_array_index_test() { ; Test that if two pointers are spaced out by a constant getelementptr, that ; they cannot alias. define i32 @gep_distance_test(i32* %A) { - %REMOVEu = load i32* %A - %B = getelementptr i32* %A, i64 2 ; Cannot alias A + %REMOVEu = load i32, i32* %A + %B = getelementptr i32, i32* %A, i64 2 ; Cannot alias A store i32 7, i32* %B - %REMOVEv = load i32* %A + %REMOVEv = load i32, i32* %A %r = sub i32 %REMOVEu, %REMOVEv ret i32 %r ; CHECK: @gep_distance_test @@ -66,11 +66,11 @@ define i32 @gep_distance_test(i32* %A) { ; Test that if two pointers are spaced out by a constant offset, that they ; cannot alias, even if there is a variable offset between them... define i32 @gep_distance_test2({i32,i32}* %A, i64 %distance) { - %A1 = getelementptr {i32,i32}* %A, i64 0, i32 0 - %REMOVEu = load i32* %A1 - %B = getelementptr {i32,i32}* %A, i64 %distance, i32 1 + %A1 = getelementptr {i32,i32}, {i32,i32}* %A, i64 0, i32 0 + %REMOVEu = load i32, i32* %A1 + %B = getelementptr {i32,i32}, {i32,i32}* %A, i64 %distance, i32 1 store i32 7, i32* %B ; B cannot alias A, it's at least 4 bytes away - %REMOVEv = load i32* %A1 + %REMOVEv = load i32, i32* %A1 %r = sub i32 %REMOVEu, %REMOVEv ret i32 %r ; CHECK: @gep_distance_test2 @@ -80,11 +80,11 @@ define i32 @gep_distance_test2({i32,i32}* %A, i64 %distance) { ; Test that we can do funny pointer things and that distance calc will still ; work. define i32 @gep_distance_test3(i32 * %A) { - %X = load i32* %A + %X = load i32, i32* %A %B = bitcast i32* %A to i8* - %C = getelementptr i8* %B, i64 4 + %C = getelementptr i8, i8* %B, i64 4 store i8 42, i8* %C - %Y = load i32* %A + %Y = load i32, i32* %A %R = sub i32 %X, %Y ret i32 %R ; CHECK: @gep_distance_test3 @@ -96,9 +96,9 @@ define i32 @constexpr_test() { %X = alloca i32 call void @external(i32* %X) - %Y = load i32* %X - store i32 5, i32* getelementptr ({ i32 }* @Global, i64 0, i32 0) - %REMOVE = load i32* %X + %Y = load i32, i32* %X + store i32 5, i32* getelementptr ({ i32 }, { i32 }* @Global, i64 0, i32 0) + %REMOVE = load i32, i32* %X %retval = sub i32 %Y, %REMOVE ret i32 %retval ; CHECK: @constexpr_test @@ -112,13 +112,13 @@ define i32 @constexpr_test() { define i16 @zext_sext_confusion(i16* %row2col, i5 %j) nounwind{ entry: %sum5.cast = zext i5 %j to i64 ; <i64> [#uses=1] - %P1 = getelementptr i16* %row2col, i64 %sum5.cast - %row2col.load.1.2 = load i16* %P1, align 1 ; <i16> [#uses=1] + %P1 = getelementptr i16, i16* %row2col, i64 %sum5.cast + %row2col.load.1.2 = load i16, i16* %P1, align 1 ; <i16> [#uses=1] %sum13.cast31 = sext i5 %j to i6 ; <i6> [#uses=1] %sum13.cast = zext i6 %sum13.cast31 to i64 ; <i64> [#uses=1] - %P2 = getelementptr i16* %row2col, i64 %sum13.cast - %row2col.load.1.6 = load i16* %P2, align 1 ; <i16> [#uses=1] + %P2 = getelementptr i16, i16* %row2col, i64 %sum13.cast + %row2col.load.1.6 = load i16, i16* %P2, align 1 ; <i16> [#uses=1] %.ret = sub i16 %row2col.load.1.6, %row2col.load.1.2 ; <i16> [#uses=1] ret i16 %.ret |