10 changes: 5 additions & 5 deletions llvm/test/Analysis/BasicAA/cs-cs.ll
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ declare void @a_readonly_func(i8 *) noinline nounwind readonly

define <8 x i16> @test1(i8* %p, <8 x i16> %y) {
entry:
%q = getelementptr i8* %p, i64 16
%q = getelementptr i8, i8* %p, i64 16
%a = call <8 x i16> @llvm.arm.neon.vld1.v8i16(i8* %p, i32 16) nounwind
call void @llvm.arm.neon.vst1.v8i16(i8* %q, <8 x i16> %y, i32 16)
%b = call <8 x i16> @llvm.arm.neon.vld1.v8i16(i8* %p, i32 16) nounwind
Expand Down Expand Up @@ -70,7 +70,7 @@ define void @test2a(i8* noalias %P, i8* noalias %Q) nounwind ssp {

define void @test2b(i8* noalias %P, i8* noalias %Q) nounwind ssp {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i32 1, i1 false)
%R = getelementptr i8* %P, i64 12
%R = getelementptr i8, i8* %P, i64 12
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %R, i8* %Q, i64 12, i32 1, i1 false)
ret void

Expand All @@ -91,7 +91,7 @@ define void @test2b(i8* noalias %P, i8* noalias %Q) nounwind ssp {

define void @test2c(i8* noalias %P, i8* noalias %Q) nounwind ssp {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i32 1, i1 false)
%R = getelementptr i8* %P, i64 11
%R = getelementptr i8, i8* %P, i64 11
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %R, i8* %Q, i64 12, i32 1, i1 false)
ret void

Expand All @@ -112,7 +112,7 @@ define void @test2c(i8* noalias %P, i8* noalias %Q) nounwind ssp {

define void @test2d(i8* noalias %P, i8* noalias %Q) nounwind ssp {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i32 1, i1 false)
%R = getelementptr i8* %P, i64 -12
%R = getelementptr i8, i8* %P, i64 -12
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %R, i8* %Q, i64 12, i32 1, i1 false)
ret void

Expand All @@ -133,7 +133,7 @@ define void @test2d(i8* noalias %P, i8* noalias %Q) nounwind ssp {

define void @test2e(i8* noalias %P, i8* noalias %Q) nounwind ssp {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %P, i8* %Q, i64 12, i32 1, i1 false)
%R = getelementptr i8* %P, i64 -11
%R = getelementptr i8, i8* %P, i64 -11
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* %R, i8* %Q, i64 12, i32 1, i1 false)
ret void

Expand Down
20 changes: 10 additions & 10 deletions llvm/test/Analysis/BasicAA/featuretest.ll
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ 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
%pointer = getelementptr i32, i32* %Array1, i64 %A
%val = load 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
Expand All @@ -38,8 +38,8 @@ 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
store i32 1, i32* %P2 ; Should not invalidate load
Expand All @@ -54,7 +54,7 @@ define i32 @constant_array_index_test() {
; they cannot alias.
define i32 @gep_distance_test(i32* %A) {
%REMOVEu = load i32* %A
%B = getelementptr i32* %A, i64 2 ; Cannot alias A
%B = getelementptr i32, i32* %A, i64 2 ; Cannot alias A
store i32 7, i32* %B
%REMOVEv = load i32* %A
%r = sub i32 %REMOVEu, %REMOVEv
Expand All @@ -66,9 +66,9 @@ 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
%A1 = getelementptr {i32,i32}, {i32,i32}* %A, i64 0, i32 0
%REMOVEu = load i32* %A1
%B = getelementptr {i32,i32}* %A, i64 %distance, i32 1
%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
%r = sub i32 %REMOVEu, %REMOVEv
Expand All @@ -82,7 +82,7 @@ define i32 @gep_distance_test2({i32,i32}* %A, i64 %distance) {
define i32 @gep_distance_test3(i32 * %A) {
%X = load 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
%R = sub i32 %X, %Y
Expand Down Expand Up @@ -112,12 +112,12 @@ 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
%P1 = getelementptr i16, i16* %row2col, i64 %sum5.cast
%row2col.load.1.2 = load 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
%P2 = getelementptr i16, i16* %row2col, i64 %sum13.cast
%row2col.load.1.6 = load i16* %P2, align 1 ; <i16> [#uses=1]

%.ret = sub i16 %row2col.load.1.6, %row2col.load.1.2 ; <i16> [#uses=1]
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/Analysis/BasicAA/full-store-partial-alias.ll
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ define i32 @signbit(double %x) nounwind {
; CHECK: ret i32 0
entry:
%u = alloca %union.anon, align 8
%tmp9 = getelementptr inbounds %union.anon* %u, i64 0, i32 0
%tmp9 = getelementptr inbounds %union.anon, %union.anon* %u, i64 0, i32 0
store double %x, double* %tmp9, align 8, !tbaa !0
%tmp2 = load i32* bitcast (i64* @endianness_test to i32*), align 8, !tbaa !3
%idxprom = sext i32 %tmp2 to i64
%tmp4 = bitcast %union.anon* %u to [2 x i32]*
%arrayidx = getelementptr inbounds [2 x i32]* %tmp4, i64 0, i64 %idxprom
%arrayidx = getelementptr inbounds [2 x i32], [2 x i32]* %tmp4, i64 0, i64 %idxprom
%tmp5 = load i32* %arrayidx, align 4, !tbaa !3
%tmp5.lobit = lshr i32 %tmp5, 31
ret i32 %tmp5.lobit
Expand Down
60 changes: 30 additions & 30 deletions llvm/test/Analysis/BasicAA/gep-alias.ll
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ target datalayout = "e-p:32:32:32-p1:16:16:16-i1:8:8-i8:8:8-i16:16:16-i32:32:32-
define i32 @test1(i8 * %P) {
entry:
%Q = bitcast i8* %P to {i32, i32}*
%R = getelementptr {i32, i32}* %Q, i32 0, i32 1
%R = getelementptr {i32, i32}, {i32, i32}* %Q, i32 0, i32 1
%S = load i32* %R

%q = bitcast i8* %P to {i32, i32}*
%r = getelementptr {i32, i32}* %q, i32 0, i32 1
%r = getelementptr {i32, i32}, {i32, i32}* %q, i32 0, i32 1
%s = load i32* %r

%t = sub i32 %S, %s
Expand All @@ -22,10 +22,10 @@ entry:
define i32 @test2(i8 * %P) {
entry:
%Q = bitcast i8* %P to {i32, i32, i32}*
%R = getelementptr {i32, i32, i32}* %Q, i32 0, i32 1
%R = getelementptr {i32, i32, i32}, {i32, i32, i32}* %Q, i32 0, i32 1
%S = load i32* %R

%r = getelementptr {i32, i32, i32}* %Q, i32 0, i32 2
%r = getelementptr {i32, i32, i32}, {i32, i32, i32}* %Q, i32 0, i32 2
store i32 42, i32* %r

%s = load i32* %R
Expand All @@ -40,11 +40,11 @@ entry:
; This was a miscompilation.
define i32 @test3({float, {i32, i32, i32}}* %P) {
entry:
%P2 = getelementptr {float, {i32, i32, i32}}* %P, i32 0, i32 1
%R = getelementptr {i32, i32, i32}* %P2, i32 0, i32 1
%P2 = getelementptr {float, {i32, i32, i32}}, {float, {i32, i32, i32}}* %P, i32 0, i32 1
%R = getelementptr {i32, i32, i32}, {i32, i32, i32}* %P2, i32 0, i32 1
%S = load i32* %R

%r = getelementptr {i32, i32, i32}* %P2, i32 0, i32 2
%r = getelementptr {i32, i32, i32}, {i32, i32, i32}* %P2, i32 0, i32 2
store i32 42, i32* %r

%s = load i32* %R
Expand All @@ -62,9 +62,9 @@ entry:

define i32 @test4(%SmallPtrSet64* %P) {
entry:
%tmp2 = getelementptr inbounds %SmallPtrSet64* %P, i64 0, i32 0, i32 1
%tmp2 = getelementptr inbounds %SmallPtrSet64, %SmallPtrSet64* %P, i64 0, i32 0, i32 1
store i32 64, i32* %tmp2, align 8
%tmp3 = getelementptr inbounds %SmallPtrSet64* %P, i64 0, i32 0, i32 4, i64 64
%tmp3 = getelementptr inbounds %SmallPtrSet64, %SmallPtrSet64* %P, i64 0, i32 0, i32 4, i64 64
store i8* null, i8** %tmp3, align 8
%tmp4 = load i32* %tmp2, align 8
ret i32 %tmp4
Expand All @@ -74,9 +74,9 @@ entry:

; P[i] != p[i+1]
define i32 @test5(i32* %p, i64 %i) {
%pi = getelementptr i32* %p, i64 %i
%pi = getelementptr i32, i32* %p, i64 %i
%i.next = add i64 %i, 1
%pi.next = getelementptr i32* %p, i64 %i.next
%pi.next = getelementptr i32, i32* %p, i64 %i.next
%x = load i32* %pi
store i32 42, i32* %pi.next
%y = load i32* %pi
Expand All @@ -87,9 +87,9 @@ define i32 @test5(i32* %p, i64 %i) {
}

define i32 @test5_as1_smaller_size(i32 addrspace(1)* %p, i8 %i) {
%pi = getelementptr i32 addrspace(1)* %p, i8 %i
%pi = getelementptr i32, i32 addrspace(1)* %p, i8 %i
%i.next = add i8 %i, 1
%pi.next = getelementptr i32 addrspace(1)* %p, i8 %i.next
%pi.next = getelementptr i32, i32 addrspace(1)* %p, i8 %i.next
%x = load i32 addrspace(1)* %pi
store i32 42, i32 addrspace(1)* %pi.next
%y = load i32 addrspace(1)* %pi
Expand All @@ -101,9 +101,9 @@ define i32 @test5_as1_smaller_size(i32 addrspace(1)* %p, i8 %i) {
}

define i32 @test5_as1_same_size(i32 addrspace(1)* %p, i16 %i) {
%pi = getelementptr i32 addrspace(1)* %p, i16 %i
%pi = getelementptr i32, i32 addrspace(1)* %p, i16 %i
%i.next = add i16 %i, 1
%pi.next = getelementptr i32 addrspace(1)* %p, i16 %i.next
%pi.next = getelementptr i32, i32 addrspace(1)* %p, i16 %i.next
%x = load i32 addrspace(1)* %pi
store i32 42, i32 addrspace(1)* %pi.next
%y = load i32 addrspace(1)* %pi
Expand All @@ -116,9 +116,9 @@ define i32 @test5_as1_same_size(i32 addrspace(1)* %p, i16 %i) {
; P[i] != p[(i*4)|1]
define i32 @test6(i32* %p, i64 %i1) {
%i = shl i64 %i1, 2
%pi = getelementptr i32* %p, i64 %i
%pi = getelementptr i32, i32* %p, i64 %i
%i.next = or i64 %i, 1
%pi.next = getelementptr i32* %p, i64 %i.next
%pi.next = getelementptr i32, i32* %p, i64 %i.next
%x = load i32* %pi
store i32 42, i32* %pi.next
%y = load i32* %pi
Expand All @@ -130,9 +130,9 @@ define i32 @test6(i32* %p, i64 %i1) {

; P[1] != P[i*4]
define i32 @test7(i32* %p, i64 %i) {
%pi = getelementptr i32* %p, i64 1
%pi = getelementptr i32, i32* %p, i64 1
%i.next = shl i64 %i, 2
%pi.next = getelementptr i32* %p, i64 %i.next
%pi.next = getelementptr i32, i32* %p, i64 %i.next
%x = load i32* %pi
store i32 42, i32* %pi.next
%y = load i32* %pi
Expand All @@ -146,10 +146,10 @@ define i32 @test7(i32* %p, i64 %i) {
; PR1143
define i32 @test8(i32* %p, i16 %i) {
%i1 = zext i16 %i to i32
%pi = getelementptr i32* %p, i32 %i1
%pi = getelementptr i32, i32* %p, i32 %i1
%i.next = add i16 %i, 1
%i.next2 = zext i16 %i.next to i32
%pi.next = getelementptr i32* %p, i32 %i.next2
%pi.next = getelementptr i32, i32* %p, i32 %i.next2
%x = load i32* %pi
store i32 42, i32* %pi.next
%y = load i32* %pi
Expand All @@ -163,12 +163,12 @@ define i8 @test9([4 x i8] *%P, i32 %i, i32 %j) {
%i2 = shl i32 %i, 2
%i3 = add i32 %i2, 1
; P2 = P + 1 + 4*i
%P2 = getelementptr [4 x i8] *%P, i32 0, i32 %i3
%P2 = getelementptr [4 x i8], [4 x i8] *%P, i32 0, i32 %i3

%j2 = shl i32 %j, 2

; P4 = P + 4*j
%P4 = getelementptr [4 x i8]* %P, i32 0, i32 %j2
%P4 = getelementptr [4 x i8], [4 x i8]* %P, i32 0, i32 %j2

%x = load i8* %P2
store i8 42, i8* %P4
Expand All @@ -183,10 +183,10 @@ define i8 @test10([4 x i8] *%P, i32 %i) {
%i2 = shl i32 %i, 2
%i3 = add i32 %i2, 4
; P2 = P + 4 + 4*i
%P2 = getelementptr [4 x i8] *%P, i32 0, i32 %i3
%P2 = getelementptr [4 x i8], [4 x i8] *%P, i32 0, i32 %i3

; P4 = P + 4*i
%P4 = getelementptr [4 x i8]* %P, i32 0, i32 %i2
%P4 = getelementptr [4 x i8], [4 x i8]* %P, i32 0, i32 %i2

%x = load i8* %P2
store i8 42, i8* %P4
Expand All @@ -201,10 +201,10 @@ define i8 @test10([4 x i8] *%P, i32 %i) {
define float @test11(i32 %indvar, [4 x [2 x float]]* %q) nounwind ssp {
%tmp = mul i32 %indvar, -1
%dec = add i32 %tmp, 3
%scevgep = getelementptr [4 x [2 x float]]* %q, i32 0, i32 %dec
%scevgep = getelementptr [4 x [2 x float]], [4 x [2 x float]]* %q, i32 0, i32 %dec
%scevgep35 = bitcast [2 x float]* %scevgep to i64*
%arrayidx28 = getelementptr inbounds [4 x [2 x float]]* %q, i32 0, i32 0
%y29 = getelementptr inbounds [2 x float]* %arrayidx28, i32 0, i32 1
%arrayidx28 = getelementptr inbounds [4 x [2 x float]], [4 x [2 x float]]* %q, i32 0, i32 0
%y29 = getelementptr inbounds [2 x float], [2 x float]* %arrayidx28, i32 0, i32 1
store float 1.0, float* %y29, align 4
store i64 0, i64* %scevgep35, align 4
%tmp30 = load float* %y29, align 4
Expand All @@ -216,9 +216,9 @@ define float @test11(i32 %indvar, [4 x [2 x float]]* %q) nounwind ssp {
; (This was a miscompilation.)
define i32 @test12(i32 %x, i32 %y, i8* %p) nounwind {
%a = bitcast i8* %p to [13 x i8]*
%b = getelementptr [13 x i8]* %a, i32 %x
%b = getelementptr [13 x i8], [13 x i8]* %a, i32 %x
%c = bitcast [13 x i8]* %b to [15 x i8]*
%d = getelementptr [15 x i8]* %c, i32 %y, i32 8
%d = getelementptr [15 x i8], [15 x i8]* %c, i32 %y, i32 8
%castd = bitcast i8* %d to i32*
%castp = bitcast i8* %p to i32*
store i32 1, i32* %castp
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/Analysis/BasicAA/global-size.ll
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ define i16 @test1_as1(i32 addrspace(1)* %P) {
; CHECK-LABEL: @test2(
define i8 @test2(i32 %tmp79, i32 %w.2, i32 %indvar89) nounwind {
%tmp92 = add i32 %tmp79, %indvar89
%arrayidx412 = getelementptr [0 x i8]* @window, i32 0, i32 %tmp92
%arrayidx412 = getelementptr [0 x i8], [0 x i8]* @window, i32 0, i32 %tmp92
%tmp93 = add i32 %w.2, %indvar89
%arrayidx416 = getelementptr [0 x i8]* @window, i32 0, i32 %tmp93
%arrayidx416 = getelementptr [0 x i8], [0 x i8]* @window, i32 0, i32 %tmp93

%A = load i8* %arrayidx412, align 1
store i8 4, i8* %arrayidx416, align 1
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/Analysis/BasicAA/intrinsics.ll
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ entry:

; CHECK: define <8 x i16> @test1(i8* %p, <8 x i16> %y) {
; CHECK-NEXT: entry:
; CHECK-NEXT: %q = getelementptr i8* %p, i64 16
; CHECK-NEXT: %q = getelementptr i8, i8* %p, i64 16
; CHECK-NEXT: %a = call <8 x i16> @llvm.arm.neon.vld1.v8i16(i8* %p, i32 16) [[ATTR]]
; CHECK-NEXT: call void @llvm.arm.neon.vst1.v8i16(i8* %q, <8 x i16> %y, i32 16)
; CHECK-NEXT: %c = add <8 x i16> %a, %a
define <8 x i16> @test1(i8* %p, <8 x i16> %y) {
entry:
%q = getelementptr i8* %p, i64 16
%q = getelementptr i8, i8* %p, i64 16
%a = call <8 x i16> @llvm.arm.neon.vld1.v8i16(i8* %p, i32 16) nounwind
call void @llvm.arm.neon.vst1.v8i16(i8* %q, <8 x i16> %y, i32 16)
%b = call <8 x i16> @llvm.arm.neon.vld1.v8i16(i8* %p, i32 16) nounwind
Expand Down
10 changes: 5 additions & 5 deletions llvm/test/Analysis/BasicAA/modref.ll
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ define i8 @test1() {

define i8 @test2(i8* %P) {
; CHECK-LABEL: @test2
%P2 = getelementptr i8* %P, i32 127
%P2 = getelementptr i8, i8* %P, i32 127
store i8 1, i8* %P2 ;; Not dead across memset
call void @llvm.memset.p0i8.i8(i8* %P, i8 2, i8 127, i32 0, i1 false)
%A = load i8* %P2
Expand All @@ -46,7 +46,7 @@ define i8 @test2(i8* %P) {

define i8 @test2a(i8* %P) {
; CHECK-LABEL: @test2
%P2 = getelementptr i8* %P, i32 126
%P2 = getelementptr i8, i8* %P, i32 126

;; FIXME: DSE isn't zapping this dead store.
store i8 1, i8* %P2 ;; Dead, clobbered by memset.
Expand All @@ -64,7 +64,7 @@ define void @test3(i8* %P, i8 %X) {
; CHECK-NOT: %Y
%Y = add i8 %X, 1 ;; Dead, because the only use (the store) is dead.

%P2 = getelementptr i8* %P, i32 2
%P2 = getelementptr i8, i8* %P, i32 2
store i8 %Y, i8* %P2 ;; Not read by lifetime.end, should be removed.
; CHECK: store i8 2, i8* %P2
call void @llvm.lifetime.end(i64 1, i8* %P)
Expand All @@ -78,7 +78,7 @@ define void @test3a(i8* %P, i8 %X) {
; CHECK-LABEL: @test3a
%Y = add i8 %X, 1 ;; Dead, because the only use (the store) is dead.

%P2 = getelementptr i8* %P, i32 2
%P2 = getelementptr i8, i8* %P, i32 2
store i8 %Y, i8* %P2
; CHECK-NEXT: call void @llvm.lifetime.end
call void @llvm.lifetime.end(i64 10, i8* %P)
Expand Down Expand Up @@ -135,7 +135,7 @@ define i32 @test7() nounwind uwtable ssp {
entry:
%x = alloca i32, align 4
store i32 0, i32* %x, align 4
%add.ptr = getelementptr inbounds i32* %x, i64 1
%add.ptr = getelementptr inbounds i32, i32* %x, i64 1
call void @test7decl(i32* %add.ptr)
%tmp = load i32* %x, align 4
ret i32 %tmp
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/Analysis/BasicAA/must-and-partial.ll
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3
; CHECK: PartialAlias: i16* %bigbase0, i8* %phi
define i8 @test0(i8* %base, i1 %x) {
entry:
%baseplusone = getelementptr i8* %base, i64 1
%baseplusone = getelementptr i8, i8* %base, i64 1
br i1 %x, label %red, label %green
red:
br label %green
Expand All @@ -27,7 +27,7 @@ green:
; CHECK: PartialAlias: i16* %bigbase1, i8* %sel
define i8 @test1(i8* %base, i1 %x) {
entry:
%baseplusone = getelementptr i8* %base, i64 1
%baseplusone = getelementptr i8, i8* %base, i64 1
%sel = select i1 %x, i8* %baseplusone, i8* %base
store i8 0, i8* %sel

Expand Down
6 changes: 3 additions & 3 deletions llvm/test/Analysis/BasicAA/no-escape-call.ll
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ define i1 @foo(i32 %i) nounwind {
entry:
%arr = alloca [10 x i8*] ; <[10 x i8*]*> [#uses=1]
%tmp2 = call i8* @getPtr( ) nounwind ; <i8*> [#uses=2]
%tmp4 = getelementptr [10 x i8*]* %arr, i32 0, i32 %i ; <i8**> [#uses=2]
%tmp4 = getelementptr [10 x i8*], [10 x i8*]* %arr, i32 0, i32 %i ; <i8**> [#uses=2]
store i8* %tmp2, i8** %tmp4, align 4
%tmp10 = getelementptr i8* %tmp2, i32 10 ; <i8*> [#uses=1]
%tmp10 = getelementptr i8, i8* %tmp2, i32 10 ; <i8*> [#uses=1]
store i8 42, i8* %tmp10, align 1
%tmp14 = load i8** %tmp4, align 4 ; <i8*> [#uses=1]
%tmp16 = getelementptr i8* %tmp14, i32 10 ; <i8*> [#uses=1]
%tmp16 = getelementptr i8, i8* %tmp14, i32 10 ; <i8*> [#uses=1]
%tmp17 = load i8* %tmp16, align 1 ; <i8> [#uses=1]
%tmp19 = icmp eq i8 %tmp17, 42 ; <i1> [#uses=1]
ret i1 %tmp19
Expand Down
8 changes: 4 additions & 4 deletions llvm/test/Analysis/BasicAA/noalias-bugs.ll
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ target triple = "x86_64-unknown-linux-gnu"

define i64 @testcase(%nested * noalias %p1, %nested * noalias %p2,
i32 %a, i32 %b) {
%ptr = getelementptr inbounds %nested* %p1, i64 -1, i32 0
%ptr.64 = getelementptr inbounds %nested.i64* %ptr, i64 0, i32 0
%ptr2= getelementptr inbounds %nested* %p2, i64 0, i32 0
%ptr = getelementptr inbounds %nested, %nested* %p1, i64 -1, i32 0
%ptr.64 = getelementptr inbounds %nested.i64, %nested.i64* %ptr, i64 0, i32 0
%ptr2= getelementptr inbounds %nested, %nested* %p2, i64 0, i32 0
%cmp = icmp ult i32 %a, %b
%either_ptr = select i1 %cmp, %nested.i64* %ptr2, %nested.i64* %ptr
%either_ptr.64 = getelementptr inbounds %nested.i64* %either_ptr, i64 0, i32 0
%either_ptr.64 = getelementptr inbounds %nested.i64, %nested.i64* %either_ptr, i64 0, i32 0

; Because either_ptr.64 and ptr.64 can alias (we used to return noalias)
; elimination of the first store is not valid.
Expand Down
32 changes: 16 additions & 16 deletions llvm/test/Analysis/BasicAA/noalias-geps.ll
Original file line number Diff line number Diff line change
Expand Up @@ -5,52 +5,52 @@ target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f3
; Check that geps with equal base offsets of noalias base pointers stay noalias.
define i32 @test(i32* %p, i16 %i) {
; CHECK-LABEL: Function: test:
%pi = getelementptr i32* %p, i32 0
%pi.next = getelementptr i32* %p, i32 1
%pi = getelementptr i32, i32* %p, i32 0
%pi.next = getelementptr i32, i32* %p, i32 1
%b = icmp eq i16 %i, 0
br i1 %b, label %bb1, label %bb2

bb1:
%f = getelementptr i32* %pi, i32 1
%g = getelementptr i32* %pi.next, i32 1
%f = getelementptr i32, i32* %pi, i32 1
%g = getelementptr i32, i32* %pi.next, i32 1
br label %bb3
bb2:
%f2 = getelementptr i32* %pi, i32 1
%g2 = getelementptr i32* %pi.next, i32 1
%f2 = getelementptr i32, i32* %pi, i32 1
%g2 = getelementptr i32, i32* %pi.next, i32 1
br label %bb3

bb3:
%ptr_phi = phi i32* [ %f, %bb1 ], [ %f2, %bb2 ]
%ptr_phi2 = phi i32* [ %g, %bb1 ], [ %g2, %bb2 ]
; CHECK: NoAlias: i32* %f1, i32* %g1
%f1 = getelementptr i32* %ptr_phi , i32 1
%g1 = getelementptr i32* %ptr_phi2 , i32 1
%f1 = getelementptr i32, i32* %ptr_phi , i32 1
%g1 = getelementptr i32, i32* %ptr_phi2 , i32 1

ret i32 0
}

; Check that geps with equal indices of noalias base pointers stay noalias.
define i32 @test2([2 x i32]* %p, i32 %i) {
; CHECK-LABEL: Function: test2:
%pi = getelementptr [2 x i32]* %p, i32 0
%pi.next = getelementptr [2 x i32]* %p, i32 1
%pi = getelementptr [2 x i32], [2 x i32]* %p, i32 0
%pi.next = getelementptr [2 x i32], [2 x i32]* %p, i32 1
%b = icmp eq i32 %i, 0
br i1 %b, label %bb1, label %bb2

bb1:
%f = getelementptr [2 x i32]* %pi, i32 1
%g = getelementptr [2 x i32]* %pi.next, i32 1
%f = getelementptr [2 x i32], [2 x i32]* %pi, i32 1
%g = getelementptr [2 x i32], [2 x i32]* %pi.next, i32 1
br label %bb3
bb2:
%f2 = getelementptr [2 x i32]* %pi, i32 1
%g2 = getelementptr [2 x i32]* %pi.next, i32 1
%f2 = getelementptr [2 x i32], [2 x i32]* %pi, i32 1
%g2 = getelementptr [2 x i32], [2 x i32]* %pi.next, i32 1
br label %bb3
bb3:
%ptr_phi = phi [2 x i32]* [ %f, %bb1 ], [ %f2, %bb2 ]
%ptr_phi2 = phi [2 x i32]* [ %g, %bb1 ], [ %g2, %bb2 ]
; CHECK: NoAlias: i32* %f1, i32* %g1
%f1 = getelementptr [2 x i32]* %ptr_phi , i32 1, i32 %i
%g1 = getelementptr [2 x i32]* %ptr_phi2 , i32 1, i32 %i
%f1 = getelementptr [2 x i32], [2 x i32]* %ptr_phi , i32 1, i32 %i
%g1 = getelementptr [2 x i32], [2 x i32]* %ptr_phi2 , i32 1, i32 %i

ret i32 0
}
4 changes: 2 additions & 2 deletions llvm/test/Analysis/BasicAA/phi-aa.ll
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ codeRepl:
for.body:
%1 = load i32* %jj7, align 4
%idxprom4 = zext i32 %1 to i64
%arrayidx5 = getelementptr inbounds [100 x i32]* %oa5, i64 0, i64 %idxprom4
%arrayidx5 = getelementptr inbounds [100 x i32], [100 x i32]* %oa5, i64 0, i64 %idxprom4
%2 = load i32* %arrayidx5, align 4
%sub6 = sub i32 %2, 6
store i32 %sub6, i32* %arrayidx5, align 4
Expand All @@ -63,7 +63,7 @@ for.body:
store i32 %3, i32* %arrayidx5, align 4
%sub11 = add i32 %1, -1
%idxprom12 = zext i32 %sub11 to i64
%arrayidx13 = getelementptr inbounds [100 x i32]* %oa5, i64 0, i64 %idxprom12
%arrayidx13 = getelementptr inbounds [100 x i32], [100 x i32]* %oa5, i64 0, i64 %idxprom12
call void @inc(i32* %jj7)
br label %codeRepl

Expand Down
16 changes: 8 additions & 8 deletions llvm/test/Analysis/BasicAA/phi-spec-order.ll
Original file line number Diff line number Diff line change
Expand Up @@ -23,23 +23,23 @@ for.body4: ; preds = %for.body4, %for.con
%lsr.iv = phi i32 [ %lsr.iv.next, %for.body4 ], [ 16000, %for.cond2.preheader ]
%lsr.iv46 = bitcast [16000 x double]* %lsr.iv4 to <4 x double>*
%lsr.iv12 = bitcast [16000 x double]* %lsr.iv1 to <4 x double>*
%scevgep11 = getelementptr <4 x double>* %lsr.iv46, i64 -2
%scevgep11 = getelementptr <4 x double>, <4 x double>* %lsr.iv46, i64 -2
%i6 = load <4 x double>* %scevgep11, align 32
%add = fadd <4 x double> %i6, <double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00>
store <4 x double> %add, <4 x double>* %lsr.iv12, align 32
%scevgep10 = getelementptr <4 x double>* %lsr.iv46, i64 -1
%scevgep10 = getelementptr <4 x double>, <4 x double>* %lsr.iv46, i64 -1
%i7 = load <4 x double>* %scevgep10, align 32
%add.4 = fadd <4 x double> %i7, <double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00>
%scevgep9 = getelementptr <4 x double>* %lsr.iv12, i64 1
%scevgep9 = getelementptr <4 x double>, <4 x double>* %lsr.iv12, i64 1
store <4 x double> %add.4, <4 x double>* %scevgep9, align 32
%i8 = load <4 x double>* %lsr.iv46, align 32
%add.8 = fadd <4 x double> %i8, <double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00>
%scevgep8 = getelementptr <4 x double>* %lsr.iv12, i64 2
%scevgep8 = getelementptr <4 x double>, <4 x double>* %lsr.iv12, i64 2
store <4 x double> %add.8, <4 x double>* %scevgep8, align 32
%scevgep7 = getelementptr <4 x double>* %lsr.iv46, i64 1
%scevgep7 = getelementptr <4 x double>, <4 x double>* %lsr.iv46, i64 1
%i9 = load <4 x double>* %scevgep7, align 32
%add.12 = fadd <4 x double> %i9, <double 1.000000e+00, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00>
%scevgep3 = getelementptr <4 x double>* %lsr.iv12, i64 3
%scevgep3 = getelementptr <4 x double>, <4 x double>* %lsr.iv12, i64 3
store <4 x double> %add.12, <4 x double>* %scevgep3, align 32

; CHECK: NoAlias:{{[ \t]+}}<4 x double>* %scevgep11, <4 x double>* %scevgep7
Expand All @@ -50,9 +50,9 @@ for.body4: ; preds = %for.body4, %for.con
; CHECK: NoAlias:{{[ \t]+}}<4 x double>* %scevgep3, <4 x double>* %scevgep9

%lsr.iv.next = add i32 %lsr.iv, -16
%scevgep = getelementptr [16000 x double]* %lsr.iv1, i64 0, i64 16
%scevgep = getelementptr [16000 x double], [16000 x double]* %lsr.iv1, i64 0, i64 16
%i10 = bitcast double* %scevgep to [16000 x double]*
%scevgep5 = getelementptr [16000 x double]* %lsr.iv4, i64 0, i64 16
%scevgep5 = getelementptr [16000 x double], [16000 x double]* %lsr.iv4, i64 0, i64 16
%i11 = bitcast double* %scevgep5 to [16000 x double]*
%exitcond.15 = icmp eq i32 %lsr.iv.next, 0
br i1 %exitcond.15, label %for.end, label %for.body4
Expand Down
16 changes: 8 additions & 8 deletions llvm/test/Analysis/BasicAA/phi-speculation.ll
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ target datalayout =
; CHECK: NoAlias: i32* %ptr2_phi, i32* %ptr_phi
define i32 @test_noalias_1(i32* %ptr2, i32 %count, i32* %coeff) {
entry:
%ptr = getelementptr inbounds i32* %ptr2, i64 1
%ptr = getelementptr inbounds i32, i32* %ptr2, i64 1
br label %while.body

while.body:
Expand All @@ -24,8 +24,8 @@ while.body:
%mul = mul nsw i32 %1, %2
%add = add nsw i32 %mul, %result.09
%tobool = icmp eq i32 %dec, 0
%ptr_inc = getelementptr inbounds i32* %ptr_phi, i64 1
%ptr2_inc = getelementptr inbounds i32* %ptr2_phi, i64 1
%ptr_inc = getelementptr inbounds i32, i32* %ptr_phi, i64 1
%ptr2_inc = getelementptr inbounds i32, i32* %ptr2_phi, i64 1
br i1 %tobool, label %the_exit, label %while.body

the_exit:
Expand All @@ -37,7 +37,7 @@ the_exit:
; CHECK: NoAlias: i32* %ptr2_phi, i32* %ptr_phi
define i32 @test_noalias_2(i32* %ptr2, i32 %count, i32* %coeff) {
entry:
%ptr = getelementptr inbounds i32* %ptr2, i64 1
%ptr = getelementptr inbounds i32, i32* %ptr2, i64 1
br label %outer.while.header

outer.while.header:
Expand All @@ -59,13 +59,13 @@ while.body:
%mul = mul nsw i32 %1, %2
%add = add nsw i32 %mul, %result.09
%tobool = icmp eq i32 %dec, 0
%ptr_inc = getelementptr inbounds i32* %ptr_phi, i64 1
%ptr2_inc = getelementptr inbounds i32* %ptr2_phi, i64 1
%ptr_inc = getelementptr inbounds i32, i32* %ptr_phi, i64 1
%ptr2_inc = getelementptr inbounds i32, i32* %ptr2_phi, i64 1
br i1 %tobool, label %outer.while.backedge, label %while.body

outer.while.backedge:
%ptr_inc_outer = getelementptr inbounds i32* %ptr_phi, i64 1
%ptr2_inc_outer = getelementptr inbounds i32* %ptr2_phi, i64 1
%ptr_inc_outer = getelementptr inbounds i32, i32* %ptr_phi, i64 1
%ptr2_inc_outer = getelementptr inbounds i32, i32* %ptr2_phi, i64 1
%dec.outer = add nsw i32 %num.outer, -1
%br.cond = icmp eq i32 %dec.outer, 0
br i1 %br.cond, label %the_exit, label %outer.while.header
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/Analysis/BasicAA/pr18573.ll
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ declare <8 x float> @llvm.x86.avx2.gather.d.ps.256(<8 x float>, i8*, <8 x i32>,
define <8 x float> @foo1(i8* noalias readonly %arr.ptr, <8 x i32>* noalias readonly %vix.ptr, i8* noalias %t2.ptr) #1 {
allocas:
%vix = load <8 x i32>* %vix.ptr, align 4
%t1.ptr = getelementptr i8* %arr.ptr, i8 4
%t1.ptr = getelementptr i8, i8* %arr.ptr, i8 4

%v1 = tail call <8 x float> @llvm.x86.avx2.gather.d.ps.256(<8 x float> undef, i8* %arr.ptr, <8 x i32> %vix, <8 x float> <float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000>, i8 1) #2
store i8 1, i8* %t1.ptr, align 4
Expand All @@ -32,7 +32,7 @@ allocas:
define <8 x float> @foo2(i8* noalias readonly %arr.ptr, <8 x i32>* noalias readonly %vix.ptr, i8* noalias %t2.ptr) #1 {
allocas:
%vix = load <8 x i32>* %vix.ptr, align 4
%t1.ptr = getelementptr i8* %arr.ptr, i8 4
%t1.ptr = getelementptr i8, i8* %arr.ptr, i8 4

%v1 = tail call <8 x float> @llvm.x86.avx2.gather.d.ps.256(<8 x float> undef, i8* %arr.ptr, <8 x i32> %vix, <8 x float> <float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000>, i8 1) #2
store i8 1, i8* %t2.ptr, align 4
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/Analysis/BasicAA/store-promote.ll
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ define i32 @test2(i1 %c) {

Loop: ; preds = %Loop, %0
%AVal = load i32* @A ; <i32> [#uses=2]
%C0 = getelementptr [2 x i32]* @C, i64 0, i64 0 ; <i32*> [#uses=1]
%C0 = getelementptr [2 x i32], [2 x i32]* @C, i64 0, i64 0 ; <i32*> [#uses=1]
store i32 %AVal, i32* %C0
%BVal = load i32* @B ; <i32> [#uses=2]
%C1 = getelementptr [2 x i32]* @C, i64 0, i64 1 ; <i32*> [#uses=1]
%C1 = getelementptr [2 x i32], [2 x i32]* @C, i64 0, i64 1 ; <i32*> [#uses=1]
store i32 %BVal, i32* %C1
br i1 %c, label %Out, label %Loop

Expand Down
50 changes: 25 additions & 25 deletions llvm/test/Analysis/BasicAA/struct-geps.ll
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
; 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*
Expand Down Expand Up @@ -59,9 +59,9 @@ define void @test_simple(%struct* %st, i64 %i, i64 %j, i64 %k) {
; 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*
Expand Down Expand Up @@ -91,9 +91,9 @@ define void @test_in_array([1 x %struct]* %st, i64 %i, i64 %j, i64 %k, i64 %i1,
; 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*
Expand All @@ -116,13 +116,13 @@ define void @test_in_3d_array([1 x [1 x [1 x %struct]]]* %st, i64 %i, i64 %j, i6
; 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
}

Expand All @@ -142,13 +142,13 @@ define void @test_same_underlying_object_same_indices(%struct* %st, i64 %i, i64
; 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
}

Expand All @@ -158,7 +158,7 @@ define void @test_same_underlying_object_different_indices(%struct* %st, i64 %i1
; 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
}
4 changes: 2 additions & 2 deletions llvm/test/Analysis/BasicAA/underlying-value.ll
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ for.cond2: ; preds = %for.body5, %for.con
br i1 false, label %for.body5, label %for.cond

for.body5: ; preds = %for.cond2
%arrayidx = getelementptr inbounds [2 x i64]* undef, i32 0, i64 0
%arrayidx = getelementptr inbounds [2 x i64], [2 x i64]* undef, i32 0, i64 0
%tmp7 = load i64* %arrayidx, align 8
%arrayidx9 = getelementptr inbounds [2 x i64]* undef, i32 0, i64 undef
%arrayidx9 = getelementptr inbounds [2 x i64], [2 x i64]* undef, i32 0, i64 undef
%tmp10 = load i64* %arrayidx9, align 8
br label %for.cond2

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Analysis/BasicAA/unreachable-block.ll
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ bb:
%t = select i1 undef, i32* %t, i32* undef
%p = select i1 undef, i32* %p, i32* %p
%q = select i1 undef, i32* undef, i32* %p
%a = getelementptr i8* %a, i32 0
%a = getelementptr i8, i8* %a, i32 0
unreachable
}
60 changes: 30 additions & 30 deletions llvm/test/Analysis/BasicAA/zext.ll
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ target triple = "x86_64-unknown-linux-gnu"

define void @test_with_zext() {
%1 = tail call i8* @malloc(i64 120)
%a = getelementptr inbounds i8* %1, i64 8
%2 = getelementptr inbounds i8* %1, i64 16
%a = getelementptr inbounds i8, i8* %1, i64 8
%2 = getelementptr inbounds i8, i8* %1, i64 16
%3 = zext i32 3 to i64
%b = getelementptr inbounds i8* %2, i64 %3
%b = getelementptr inbounds i8, i8* %2, i64 %3
ret void
}

Expand All @@ -19,10 +19,10 @@ define void @test_with_zext() {

define void @test_with_lshr(i64 %i) {
%1 = tail call i8* @malloc(i64 120)
%a = getelementptr inbounds i8* %1, i64 8
%2 = getelementptr inbounds i8* %1, i64 16
%a = getelementptr inbounds i8, i8* %1, i64 8
%2 = getelementptr inbounds i8, i8* %1, i64 16
%3 = lshr i64 %i, 2
%b = getelementptr inbounds i8* %2, i64 %3
%b = getelementptr inbounds i8, i8* %2, i64 %3
ret void
}

Expand All @@ -34,10 +34,10 @@ define void @test_with_a_loop(i8* %mem) {

for.loop:
%i = phi i32 [ 0, %0 ], [ %i.plus1, %for.loop ]
%a = getelementptr inbounds i8* %mem, i64 8
%a.plus1 = getelementptr inbounds i8* %mem, i64 16
%a = getelementptr inbounds i8, i8* %mem, i64 8
%a.plus1 = getelementptr inbounds i8, i8* %mem, i64 16
%i.64 = zext i32 %i to i64
%b = getelementptr inbounds i8* %a.plus1, i64 %i.64
%b = getelementptr inbounds i8, i8* %a.plus1, i64 %i.64
%i.plus1 = add nuw nsw i32 %i, 1
%cmp = icmp eq i32 %i.plus1, 10
br i1 %cmp, label %for.loop.exit, label %for.loop
Expand All @@ -55,12 +55,12 @@ define void @test_with_varying_base_pointer_in_loop(i8* %mem.orig) {
for.loop:
%mem = phi i8* [ %mem.orig, %0 ], [ %mem.plus1, %for.loop ]
%i = phi i32 [ 0, %0 ], [ %i.plus1, %for.loop ]
%a = getelementptr inbounds i8* %mem, i64 8
%a.plus1 = getelementptr inbounds i8* %mem, i64 16
%a = getelementptr inbounds i8, i8* %mem, i64 8
%a.plus1 = getelementptr inbounds i8, i8* %mem, i64 16
%i.64 = zext i32 %i to i64
%b = getelementptr inbounds i8* %a.plus1, i64 %i.64
%b = getelementptr inbounds i8, i8* %a.plus1, i64 %i.64
%i.plus1 = add nuw nsw i32 %i, 1
%mem.plus1 = getelementptr inbounds i8* %mem, i64 8
%mem.plus1 = getelementptr inbounds i8, i8* %mem, i64 8
%cmp = icmp eq i32 %i.plus1, 10
br i1 %cmp, label %for.loop.exit, label %for.loop

Expand All @@ -74,10 +74,10 @@ for.loop.exit:
define void @test_sign_extension(i32 %p) {
%1 = tail call i8* @malloc(i64 120)
%p.64 = zext i32 %p to i64
%a = getelementptr inbounds i8* %1, i64 %p.64
%a = getelementptr inbounds i8, i8* %1, i64 %p.64
%p.minus1 = add i32 %p, -1
%p.minus1.64 = zext i32 %p.minus1 to i64
%b.i8 = getelementptr inbounds i8* %1, i64 %p.minus1.64
%b.i8 = getelementptr inbounds i8, i8* %1, i64 %p.minus1.64
%b.i64 = bitcast i8* %b.i8 to i64*
ret void
}
Expand All @@ -91,13 +91,13 @@ define void @test_fe_tools([8 x i32]* %values) {
for.loop:
%i = phi i32 [ 0, %reorder ], [ %i.next, %for.loop ]
%idxprom = zext i32 %i to i64
%b = getelementptr inbounds [8 x i32]* %values, i64 0, i64 %idxprom
%b = getelementptr inbounds [8 x i32], [8 x i32]* %values, i64 0, i64 %idxprom
%i.next = add nuw nsw i32 %i, 1
%1 = icmp eq i32 %i.next, 10
br i1 %1, label %for.loop.exit, label %for.loop

reorder:
%a = getelementptr inbounds [8 x i32]* %values, i64 0, i64 1
%a = getelementptr inbounds [8 x i32], [8 x i32]* %values, i64 0, i64 1
br label %for.loop

for.loop.exit:
Expand All @@ -123,13 +123,13 @@ define void @test_spec2006() {
; <label>:2 ; preds = %.lr.ph, %2
%i = phi i32 [ %d.val, %.lr.ph ], [ %i.plus1, %2 ]
%i.promoted = sext i32 %i to i64
%x = getelementptr inbounds [1 x [2 x i32*]]* %h, i64 0, i64 %d.promoted, i64 %i.promoted
%x = getelementptr inbounds [1 x [2 x i32*]], [1 x [2 x i32*]]* %h, i64 0, i64 %d.promoted, i64 %i.promoted
%i.plus1 = add nsw i32 %i, 1
%cmp = icmp slt i32 %i.plus1, 2
br i1 %cmp, label %2, label %3

; <label>:3 ; preds = %._crit_edge, %0
%y = getelementptr inbounds [1 x [2 x i32*]]* %h, i64 0, i64 0, i64 1
%y = getelementptr inbounds [1 x [2 x i32*]], [1 x [2 x i32*]]* %h, i64 0, i64 0, i64 1
ret void
}

Expand All @@ -138,8 +138,8 @@ define void @test_spec2006() {

define void @test_modulo_analysis_easy_case(i64 %i) {
%h = alloca [1 x [2 x i32*]], align 16
%x = getelementptr inbounds [1 x [2 x i32*]]* %h, i64 0, i64 %i, i64 0
%y = getelementptr inbounds [1 x [2 x i32*]]* %h, i64 0, i64 0, i64 1
%x = getelementptr inbounds [1 x [2 x i32*]], [1 x [2 x i32*]]* %h, i64 0, i64 %i, i64 0
%y = getelementptr inbounds [1 x [2 x i32*]], [1 x [2 x i32*]]* %h, i64 0, i64 0, i64 1
ret void
}

Expand All @@ -153,8 +153,8 @@ define void @test_modulo_analysis_in_loop() {
for.loop:
%i = phi i32 [ 0, %0 ], [ %i.plus1, %for.loop ]
%i.promoted = sext i32 %i to i64
%x = getelementptr inbounds [1 x [2 x i32*]]* %h, i64 0, i64 %i.promoted, i64 0
%y = getelementptr inbounds [1 x [2 x i32*]]* %h, i64 0, i64 0, i64 1
%x = getelementptr inbounds [1 x [2 x i32*]], [1 x [2 x i32*]]* %h, i64 0, i64 %i.promoted, i64 0
%y = getelementptr inbounds [1 x [2 x i32*]], [1 x [2 x i32*]]* %h, i64 0, i64 0, i64 1
%i.plus1 = add nsw i32 %i, 1
%cmp = icmp slt i32 %i.plus1, 2
br i1 %cmp, label %for.loop, label %for.loop.exit
Expand All @@ -175,8 +175,8 @@ define void @test_modulo_analysis_with_global() {
for.loop:
%i = phi i32 [ 0, %0 ], [ %i.plus1, %for.loop ]
%i.promoted = sext i32 %i to i64
%x = getelementptr inbounds [1 x [2 x i32*]]* %h, i64 0, i64 %i.promoted, i64 %b.promoted
%y = getelementptr inbounds [1 x [2 x i32*]]* %h, i64 0, i64 0, i64 1
%x = getelementptr inbounds [1 x [2 x i32*]], [1 x [2 x i32*]]* %h, i64 0, i64 %i.promoted, i64 %b.promoted
%y = getelementptr inbounds [1 x [2 x i32*]], [1 x [2 x i32*]]* %h, i64 0, i64 0, i64 1
%i.plus1 = add nsw i32 %i, 1
%cmp = icmp slt i32 %i.plus1, 2
br i1 %cmp, label %for.loop, label %for.loop.exit
Expand All @@ -188,10 +188,10 @@ for.loop.exit:
; CHECK-LABEL: test_const_eval
; CHECK: NoAlias: i8* %a, i8* %b
define void @test_const_eval(i8* %ptr, i64 %offset) {
%a = getelementptr inbounds i8* %ptr, i64 %offset
%a.dup = getelementptr inbounds i8* %ptr, i64 %offset
%a = getelementptr inbounds i8, i8* %ptr, i64 %offset
%a.dup = getelementptr inbounds i8, i8* %ptr, i64 %offset
%three = zext i32 3 to i64
%b = getelementptr inbounds i8* %a.dup, i64 %three
%b = getelementptr inbounds i8, i8* %a.dup, i64 %three
ret void
}

Expand All @@ -200,8 +200,8 @@ define void @test_const_eval(i8* %ptr, i64 %offset) {
define void @test_const_eval_scaled(i8* %ptr) {
%three = zext i32 3 to i64
%six = mul i64 %three, 2
%a = getelementptr inbounds i8* %ptr, i64 %six
%b = getelementptr inbounds i8* %ptr, i64 6
%a = getelementptr inbounds i8, i8* %ptr, i64 %six
%b = getelementptr inbounds i8, i8* %ptr, i64 6
ret void
}

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Analysis/BlockFrequencyInfo/basic.ll
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ entry:
body:
%iv = phi i32 [ 0, %entry ], [ %next, %body ]
%base = phi i32 [ 0, %entry ], [ %sum, %body ]
%arrayidx = getelementptr inbounds i32* %a, i32 %iv
%arrayidx = getelementptr inbounds i32, i32* %a, i32 %iv
%0 = load i32* %arrayidx
%sum = add nsw i32 %0, %base
%next = add i32 %iv, 1
Expand Down
6 changes: 3 additions & 3 deletions llvm/test/Analysis/BranchProbabilityInfo/basic.ll
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ entry:
body:
%iv = phi i32 [ 0, %entry ], [ %next, %body ]
%base = phi i32 [ 0, %entry ], [ %sum, %body ]
%arrayidx = getelementptr inbounds i32* %a, i32 %iv
%arrayidx = getelementptr inbounds i32, i32* %a, i32 %iv
%0 = load i32* %arrayidx
%sum = add nsw i32 %0, %base
%next = add i32 %iv, 1
Expand Down Expand Up @@ -153,7 +153,7 @@ define i32 @test_cold_call_sites(i32* %a) {
; CHECK: edge entry -> else probability is 64 / 68 = 94.1176% [HOT edge]

entry:
%gep1 = getelementptr i32* %a, i32 1
%gep1 = getelementptr i32, i32* %a, i32 1
%val1 = load i32* %gep1
%cond1 = icmp ugt i32 %val1, 1
br i1 %cond1, label %then, label %else
Expand All @@ -164,7 +164,7 @@ then:
br label %exit

else:
%gep2 = getelementptr i32* %a, i32 2
%gep2 = getelementptr i32, i32* %a, i32 2
%val2 = load i32* %gep2
%val3 = call i32 @regular_function(i32 %val2)
br label %exit
Expand Down
4 changes: 2 additions & 2 deletions llvm/test/Analysis/BranchProbabilityInfo/loop.ll
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,8 @@ entry:

for.body.lr.ph:
%cmp216 = icmp sgt i32 %b, 0
%arrayidx5 = getelementptr inbounds i32* %c, i64 1
%arrayidx9 = getelementptr inbounds i32* %c, i64 2
%arrayidx5 = getelementptr inbounds i32, i32* %c, i64 1
%arrayidx9 = getelementptr inbounds i32, i32* %c, i64 2
br label %for.body
; CHECK: edge for.body.lr.ph -> for.body probability is 16 / 16 = 100%

Expand Down
10 changes: 5 additions & 5 deletions llvm/test/Analysis/BranchProbabilityInfo/pr18705.ll
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,22 @@ while.body:
%d.addr.010 = phi i32* [ %d, %while.body.lr.ph ], [ %incdec.ptr4, %if.end ]
%c.addr.09 = phi i32* [ %c, %while.body.lr.ph ], [ %c.addr.1, %if.end ]
%indvars.iv.next = add nsw i64 %indvars.iv, -1
%arrayidx = getelementptr inbounds float* %f0, i64 %indvars.iv.next
%arrayidx = getelementptr inbounds float, float* %f0, i64 %indvars.iv.next
%1 = load float* %arrayidx, align 4
%arrayidx2 = getelementptr inbounds float* %f1, i64 %indvars.iv.next
%arrayidx2 = getelementptr inbounds float, float* %f1, i64 %indvars.iv.next
%2 = load float* %arrayidx2, align 4
%cmp = fcmp une float %1, %2
br i1 %cmp, label %if.then, label %if.else

if.then:
%incdec.ptr = getelementptr inbounds i32* %b.addr.011, i64 1
%incdec.ptr = getelementptr inbounds i32, i32* %b.addr.011, i64 1
%3 = load i32* %b.addr.011, align 4
%add = add nsw i32 %3, 12
store i32 %add, i32* %b.addr.011, align 4
br label %if.end

if.else:
%incdec.ptr3 = getelementptr inbounds i32* %c.addr.09, i64 1
%incdec.ptr3 = getelementptr inbounds i32, i32* %c.addr.09, i64 1
%4 = load i32* %c.addr.09, align 4
%sub = add nsw i32 %4, -13
store i32 %sub, i32* %c.addr.09, align 4
Expand All @@ -46,7 +46,7 @@ if.else:
if.end:
%c.addr.1 = phi i32* [ %c.addr.09, %if.then ], [ %incdec.ptr3, %if.else ]
%b.addr.1 = phi i32* [ %incdec.ptr, %if.then ], [ %b.addr.011, %if.else ]
%incdec.ptr4 = getelementptr inbounds i32* %d.addr.010, i64 1
%incdec.ptr4 = getelementptr inbounds i32, i32* %d.addr.010, i64 1
store i32 14, i32* %d.addr.010, align 4
%5 = trunc i64 %indvars.iv.next to i32
%tobool = icmp eq i32 %5, 0
Expand Down
8 changes: 4 additions & 4 deletions llvm/test/Analysis/CFLAliasAnalysis/const-expr-gep.ll
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
; CHECK-NOT: May:

define void @test() {
%D = getelementptr %T* @G, i64 0, i32 0
%E = getelementptr %T* @G, i64 0, i32 1, i64 5
%F = getelementptr i32* getelementptr (%T* @G, i64 0, i32 0), i64 0
%X = getelementptr [10 x i8]* getelementptr (%T* @G, i64 0, i32 1), i64 0, i64 5
%D = getelementptr %T, %T* @G, i64 0, i32 0
%E = getelementptr %T, %T* @G, i64 0, i32 1, i64 5
%F = getelementptr i32, i32* getelementptr (%T* @G, i64 0, i32 0), i64 0
%X = getelementptr [10 x i8], [10 x i8]* getelementptr (%T* @G, i64 0, i32 1), i64 0, i64 5

ret void
}
4 changes: 2 additions & 2 deletions llvm/test/Analysis/CFLAliasAnalysis/constant-over-index.ll
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@

define void @foo([3 x [3 x double]]* noalias %p) {
entry:
%p3 = getelementptr [3 x [3 x double]]* %p, i64 0, i64 0, i64 3
%p3 = getelementptr [3 x [3 x double]], [3 x [3 x double]]* %p, i64 0, i64 0, i64 3
br label %loop

loop:
%i = phi i64 [ 0, %entry ], [ %i.next, %loop ]

%p.0.i.0 = getelementptr [3 x [3 x double]]* %p, i64 0, i64 %i, i64 0
%p.0.i.0 = getelementptr [3 x [3 x double]], [3 x [3 x double]]* %p, i64 0, i64 %i, i64 0

store volatile double 0.0, double* %p3
store volatile double 0.1, double* %p.0.i.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ define i32 @signbit(double %x) nounwind {
; CHECK: ret i32 0
entry:
%u = alloca %union.anon, align 8
%tmp9 = getelementptr inbounds %union.anon* %u, i64 0, i32 0
%tmp9 = getelementptr inbounds %union.anon, %union.anon* %u, i64 0, i32 0
store double %x, double* %tmp9, align 8, !tbaa !0
%tmp2 = load i32* bitcast (i64* @endianness_test to i32*), align 8, !tbaa !3
%idxprom = sext i32 %tmp2 to i64
%tmp4 = bitcast %union.anon* %u to [2 x i32]*
%arrayidx = getelementptr inbounds [2 x i32]* %tmp4, i64 0, i64 %idxprom
%arrayidx = getelementptr inbounds [2 x i32], [2 x i32]* %tmp4, i64 0, i64 %idxprom
%tmp5 = load i32* %arrayidx, align 4, !tbaa !3
%tmp5.lobit = lshr i32 %tmp5, 31
ret i32 %tmp5.lobit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ define i32 @test(i32 %indvar) nounwind {
%tab = alloca i32, align 4
%tmp31 = mul i32 %indvar, -2
%tmp32 = add i32 %tmp31, 30
%t.5 = getelementptr i32* %tab, i32 %tmp32
%t.5 = getelementptr i32, i32* %tab, i32 %tmp32
%loada = load i32* %tab
store i32 0, i32* %t.5
%loadb = load i32* %tab
Expand Down
8 changes: 4 additions & 4 deletions llvm/test/Analysis/CFLAliasAnalysis/must-and-partial.ll
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3
define i8 @test0(i1 %x) {
entry:
%base = alloca i8, align 4
%baseplusone = getelementptr i8* %base, i64 1
%baseplusone = getelementptr i8, i8* %base, i64 1
br i1 %x, label %red, label %green
red:
br label %green
Expand All @@ -30,7 +30,7 @@ green:
define i8 @test1(i1 %x) {
entry:
%base = alloca i8, align 4
%baseplusone = getelementptr i8* %base, i64 1
%baseplusone = getelementptr i8, i8* %base, i64 1
%sel = select i1 %x, i8* %baseplusone, i8* %base
store i8 0, i8* %sel

Expand All @@ -45,9 +45,9 @@ entry:
; even if they are nocapture
; CHECK: MayAlias: double* %A, double* %Index
define void @testr2(double* nocapture readonly %A, double* nocapture readonly %Index) {
%arrayidx22 = getelementptr inbounds double* %Index, i64 2
%arrayidx22 = getelementptr inbounds double, double* %Index, i64 2
%1 = load double* %arrayidx22
%arrayidx25 = getelementptr inbounds double* %A, i64 2
%arrayidx25 = getelementptr inbounds double, double* %A, i64 2
%2 = load double* %arrayidx25
%mul26 = fmul double %1, %2
ret void
Expand Down
10 changes: 5 additions & 5 deletions llvm/test/Analysis/CFLAliasAnalysis/simple.ll
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
; CHECK-NOT: May:

define void @test(%T* %P) {
%A = getelementptr %T* %P, i64 0
%B = getelementptr %T* %P, i64 0, i32 0
%C = getelementptr %T* %P, i64 0, i32 1
%D = getelementptr %T* %P, i64 0, i32 1, i64 0
%E = getelementptr %T* %P, i64 0, i32 1, i64 5
%A = getelementptr %T, %T* %P, i64 0
%B = getelementptr %T, %T* %P, i64 0, i32 0
%C = getelementptr %T, %T* %P, i64 0, i32 1
%D = getelementptr %T, %T* %P, i64 0, i32 1, i64 0
%E = getelementptr %T, %T* %P, i64 0, i32 1, i64 5
ret void
}
48 changes: 24 additions & 24 deletions llvm/test/Analysis/CostModel/ARM/gep.ll
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,37 @@ target triple = "thumbv7-apple-ios6.0.0"
define void @test_geps() {
; Cost of scalar integer geps should be one. We can't always expect it to be
; folded into the instruction addressing mode.
;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds i8*
%a0 = getelementptr inbounds i8* undef, i32 0
;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds i16*
%a1 = getelementptr inbounds i16* undef, i32 0
;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds i32*
%a2 = getelementptr inbounds i32* undef, i32 0
;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds i8, i8*
%a0 = getelementptr inbounds i8, i8* undef, i32 0
;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds i16, i16*
%a1 = getelementptr inbounds i16, i16* undef, i32 0
;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds i32, i32*
%a2 = getelementptr inbounds i32, i32* undef, i32 0

;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds i64*
%a3 = getelementptr inbounds i64* undef, i32 0
;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds i64, i64*
%a3 = getelementptr inbounds i64, i64* undef, i32 0

; Cost of scalar floating point geps should be one. We cannot fold the address
; computation.
;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds float*
%a4 = getelementptr inbounds float* undef, i32 0
;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds double*
%a5 = getelementptr inbounds double* undef, i32 0
;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds float, float*
%a4 = getelementptr inbounds float, float* undef, i32 0
;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds double, double*
%a5 = getelementptr inbounds double, double* undef, i32 0


; Cost of vector geps should be one. We cannot fold the address computation.
;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds <4 x i8>*
%a7 = getelementptr inbounds <4 x i8>* undef, i32 0
;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds <4 x i16>*
%a8 = getelementptr inbounds <4 x i16>* undef, i32 0
;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds <4 x i32>*
%a9 = getelementptr inbounds <4 x i32>* undef, i32 0
;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds <4 x i64>*
%a10 = getelementptr inbounds <4 x i64>* undef, i32 0
;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds <4 x float>*
%a11 = getelementptr inbounds <4 x float>* undef, i32 0
;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds <4 x double>*
%a12 = getelementptr inbounds <4 x double>* undef, i32 0
;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds <4 x i8>, <4 x i8>*
%a7 = getelementptr inbounds <4 x i8>, <4 x i8>* undef, i32 0
;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds <4 x i16>, <4 x i16>*
%a8 = getelementptr inbounds <4 x i16>, <4 x i16>* undef, i32 0
;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds <4 x i32>, <4 x i32>*
%a9 = getelementptr inbounds <4 x i32>, <4 x i32>* undef, i32 0
;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds <4 x i64>, <4 x i64>*
%a10 = getelementptr inbounds <4 x i64>, <4 x i64>* undef, i32 0
;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds <4 x float>, <4 x float>*
%a11 = getelementptr inbounds <4 x float>, <4 x float>* undef, i32 0
;CHECK: cost of 1 for instruction: {{.*}} getelementptr inbounds <4 x double>, <4 x double>*
%a12 = getelementptr inbounds <4 x double>, <4 x double>* undef, i32 0


ret void
Expand Down
48 changes: 24 additions & 24 deletions llvm/test/Analysis/CostModel/X86/gep.ll
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,33 @@ target triple = "x86_64-apple-macosx10.8.0"
define void @test_geps() {
; Cost of should be zero. We expect it to be folded into
; the instruction addressing mode.
;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds i8*
%a0 = getelementptr inbounds i8* undef, i32 0
;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds i16*
%a1 = getelementptr inbounds i16* undef, i32 0
;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds i32*
%a2 = getelementptr inbounds i32* undef, i32 0
;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds i64*
%a3 = getelementptr inbounds i64* undef, i32 0
;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds i8, i8*
%a0 = getelementptr inbounds i8, i8* undef, i32 0
;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds i16, i16*
%a1 = getelementptr inbounds i16, i16* undef, i32 0
;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds i32, i32*
%a2 = getelementptr inbounds i32, i32* undef, i32 0
;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds i64, i64*
%a3 = getelementptr inbounds i64, i64* undef, i32 0

;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds float*
%a4 = getelementptr inbounds float* undef, i32 0
;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds double*
%a5 = getelementptr inbounds double* undef, i32 0
;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds float, float*
%a4 = getelementptr inbounds float, float* undef, i32 0
;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds double, double*
%a5 = getelementptr inbounds double, double* undef, i32 0

; Vector geps should also have zero cost.
;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds <4 x i8>*
%a7 = getelementptr inbounds <4 x i8>* undef, i32 0
;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds <4 x i16>*
%a8 = getelementptr inbounds <4 x i16>* undef, i32 0
;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds <4 x i32>*
%a9 = getelementptr inbounds <4 x i32>* undef, i32 0
;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds <4 x i64>*
%a10 = getelementptr inbounds <4 x i64>* undef, i32 0
;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds <4 x float>*
%a11 = getelementptr inbounds <4 x float>* undef, i32 0
;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds <4 x double>*
%a12 = getelementptr inbounds <4 x double>* undef, i32 0
;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds <4 x i8>, <4 x i8>*
%a7 = getelementptr inbounds <4 x i8>, <4 x i8>* undef, i32 0
;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds <4 x i16>, <4 x i16>*
%a8 = getelementptr inbounds <4 x i16>, <4 x i16>* undef, i32 0
;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds <4 x i32>, <4 x i32>*
%a9 = getelementptr inbounds <4 x i32>, <4 x i32>* undef, i32 0
;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds <4 x i64>, <4 x i64>*
%a10 = getelementptr inbounds <4 x i64>, <4 x i64>* undef, i32 0
;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds <4 x float>, <4 x float>*
%a11 = getelementptr inbounds <4 x float>, <4 x float>* undef, i32 0
;CHECK: cost of 0 for instruction: {{.*}} getelementptr inbounds <4 x double>, <4 x double>*
%a12 = getelementptr inbounds <4 x double>, <4 x double>* undef, i32 0


ret void
Expand Down
6 changes: 3 additions & 3 deletions llvm/test/Analysis/CostModel/X86/intrinsic-cost.ll
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ vector.ph:

vector.body: ; preds = %vector.body, %vector.ph
%index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
%0 = getelementptr inbounds float* %f, i64 %index
%0 = getelementptr inbounds float, float* %f, i64 %index
%1 = bitcast float* %0 to <4 x float>*
%wide.load = load <4 x float>* %1, align 4
%2 = call <4 x float> @llvm.ceil.v4f32(<4 x float> %wide.load)
Expand Down Expand Up @@ -37,7 +37,7 @@ vector.ph:

vector.body: ; preds = %vector.body, %vector.ph
%index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
%0 = getelementptr inbounds float* %f, i64 %index
%0 = getelementptr inbounds float, float* %f, i64 %index
%1 = bitcast float* %0 to <4 x float>*
%wide.load = load <4 x float>* %1, align 4
%2 = call <4 x float> @llvm.nearbyint.v4f32(<4 x float> %wide.load)
Expand Down Expand Up @@ -65,7 +65,7 @@ vector.ph:

vector.body: ; preds = %vector.body, %vector.ph
%index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
%0 = getelementptr inbounds float* %f, i64 %index
%0 = getelementptr inbounds float, float* %f, i64 %index
%1 = bitcast float* %0 to <4 x float>*
%wide.load = load <4 x float>* %1, align 4
%2 = call <4 x float> @llvm.fmuladd.v4f32(<4 x float> %wide.load, <4 x float> %b, <4 x float> %c)
Expand Down
6 changes: 3 additions & 3 deletions llvm/test/Analysis/CostModel/X86/loop_v2.ll
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ vector.ph:
vector.body: ; preds = %vector.body, %vector.ph
%index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
%vec.phi = phi <2 x i32> [ zeroinitializer, %vector.ph ], [ %12, %vector.body ]
%0 = getelementptr inbounds i32* %A, i64 %index
%0 = getelementptr inbounds i32, i32* %A, i64 %index
%1 = bitcast i32* %0 to <2 x i32>*
%2 = load <2 x i32>* %1, align 4
%3 = sext <2 x i32> %2 to <2 x i64>
;CHECK: cost of 1 {{.*}} extract
%4 = extractelement <2 x i64> %3, i32 0
%5 = getelementptr inbounds i32* %A, i64 %4
%5 = getelementptr inbounds i32, i32* %A, i64 %4
;CHECK: cost of 1 {{.*}} extract
%6 = extractelement <2 x i64> %3, i32 1
%7 = getelementptr inbounds i32* %A, i64 %6
%7 = getelementptr inbounds i32, i32* %A, i64 %6
%8 = load i32* %5, align 4
;CHECK: cost of 1 {{.*}} insert
%9 = insertelement <2 x i32> undef, i32 %8, i32 0
Expand Down
8 changes: 4 additions & 4 deletions llvm/test/Analysis/CostModel/X86/vectorized-loop.ll
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ for.body.lr.ph: ; preds = %entry
vector.body: ; preds = %for.body.lr.ph, %vector.body
%index = phi i64 [ %index.next, %vector.body ], [ %0, %for.body.lr.ph ]
%3 = add i64 %index, 2
%4 = getelementptr inbounds i32* %B, i64 %3
%4 = getelementptr inbounds i32, i32* %B, i64 %3
;CHECK: cost of 0 {{.*}} bitcast
%5 = bitcast i32* %4 to <8 x i32>*
;CHECK: cost of 2 {{.*}} load
%6 = load <8 x i32>* %5, align 4
;CHECK: cost of 4 {{.*}} mul
%7 = mul nsw <8 x i32> %6, <i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5, i32 5>
%8 = getelementptr inbounds i32* %A, i64 %index
%8 = getelementptr inbounds i32, i32* %A, i64 %index
%9 = bitcast i32* %8 to <8 x i32>*
;CHECK: cost of 2 {{.*}} load
%10 = load <8 x i32>* %9, align 4
Expand All @@ -52,12 +52,12 @@ middle.block: ; preds = %vector.body, %for.b
for.body: ; preds = %middle.block, %for.body
%indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ %end.idx.rnd.down, %middle.block ]
%13 = add nsw i64 %indvars.iv, 2
%arrayidx = getelementptr inbounds i32* %B, i64 %13
%arrayidx = getelementptr inbounds i32, i32* %B, i64 %13
;CHECK: cost of 1 {{.*}} load
%14 = load i32* %arrayidx, align 4
;CHECK: cost of 1 {{.*}} mul
%mul = mul nsw i32 %14, 5
%arrayidx2 = getelementptr inbounds i32* %A, i64 %indvars.iv
%arrayidx2 = getelementptr inbounds i32, i32* %A, i64 %indvars.iv
;CHECK: cost of 1 {{.*}} load
%15 = load i32* %arrayidx2, align 4
%add3 = add nsw i32 %15, %mul
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Analysis/Delinearization/a.ll
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ for.k: ; preds = %for.k, %for.j
%mul.us.us = mul nsw i64 %k.029.us.us, 5
%arrayidx.sum.us.us = add i64 %mul.us.us, 7
%arrayidx10.sum.us.us = add i64 %arrayidx.sum.us.us, %tmp27.us.us
%arrayidx11.us.us = getelementptr inbounds i32* %A, i64 %arrayidx10.sum.us.us
%arrayidx11.us.us = getelementptr inbounds i32, i32* %A, i64 %arrayidx10.sum.us.us
store i32 1, i32* %arrayidx11.us.us, align 4
%inc.us.us = add nsw i64 %k.029.us.us, 1
%exitcond = icmp eq i64 %inc.us.us, %o
Expand Down
18 changes: 9 additions & 9 deletions llvm/test/Analysis/Delinearization/gcd_multiply_expr.ll
Original file line number Diff line number Diff line change
Expand Up @@ -64,56 +64,56 @@ for.body4.i.preheader:
for.body4.i:
%8 = phi i32 [ %inc.7.i, %for.body4.i ], [ %.pr.i, %for.body4.i.preheader ]
%arrayidx.sum1 = add i32 %add.i, %8
%arrayidx.i = getelementptr inbounds i8* %3, i32 %arrayidx.sum1
%arrayidx.i = getelementptr inbounds i8, i8* %3, i32 %arrayidx.sum1
%9 = load i8* %arrayidx.i, align 1
%conv.i = sext i8 %9 to i32
store i32 %conv.i, i32* @c, align 4
%inc.i = add nsw i32 %8, 1
store i32 %inc.i, i32* @b, align 4
%arrayidx.sum2 = add i32 %add.i, %inc.i
%arrayidx.1.i = getelementptr inbounds i8* %3, i32 %arrayidx.sum2
%arrayidx.1.i = getelementptr inbounds i8, i8* %3, i32 %arrayidx.sum2
%10 = load i8* %arrayidx.1.i, align 1
%conv.1.i = sext i8 %10 to i32
store i32 %conv.1.i, i32* @c, align 4
%inc.1.i = add nsw i32 %8, 2
store i32 %inc.1.i, i32* @b, align 4
%arrayidx.sum3 = add i32 %add.i, %inc.1.i
%arrayidx.2.i = getelementptr inbounds i8* %3, i32 %arrayidx.sum3
%arrayidx.2.i = getelementptr inbounds i8, i8* %3, i32 %arrayidx.sum3
%11 = load i8* %arrayidx.2.i, align 1
%conv.2.i = sext i8 %11 to i32
store i32 %conv.2.i, i32* @c, align 4
%inc.2.i = add nsw i32 %8, 3
store i32 %inc.2.i, i32* @b, align 4
%arrayidx.sum4 = add i32 %add.i, %inc.2.i
%arrayidx.3.i = getelementptr inbounds i8* %3, i32 %arrayidx.sum4
%arrayidx.3.i = getelementptr inbounds i8, i8* %3, i32 %arrayidx.sum4
%12 = load i8* %arrayidx.3.i, align 1
%conv.3.i = sext i8 %12 to i32
store i32 %conv.3.i, i32* @c, align 4
%inc.3.i = add nsw i32 %8, 4
store i32 %inc.3.i, i32* @b, align 4
%arrayidx.sum5 = add i32 %add.i, %inc.3.i
%arrayidx.4.i = getelementptr inbounds i8* %3, i32 %arrayidx.sum5
%arrayidx.4.i = getelementptr inbounds i8, i8* %3, i32 %arrayidx.sum5
%13 = load i8* %arrayidx.4.i, align 1
%conv.4.i = sext i8 %13 to i32
store i32 %conv.4.i, i32* @c, align 4
%inc.4.i = add nsw i32 %8, 5
store i32 %inc.4.i, i32* @b, align 4
%arrayidx.sum6 = add i32 %add.i, %inc.4.i
%arrayidx.5.i = getelementptr inbounds i8* %3, i32 %arrayidx.sum6
%arrayidx.5.i = getelementptr inbounds i8, i8* %3, i32 %arrayidx.sum6
%14 = load i8* %arrayidx.5.i, align 1
%conv.5.i = sext i8 %14 to i32
store i32 %conv.5.i, i32* @c, align 4
%inc.5.i = add nsw i32 %8, 6
store i32 %inc.5.i, i32* @b, align 4
%arrayidx.sum7 = add i32 %add.i, %inc.5.i
%arrayidx.6.i = getelementptr inbounds i8* %3, i32 %arrayidx.sum7
%arrayidx.6.i = getelementptr inbounds i8, i8* %3, i32 %arrayidx.sum7
%15 = load i8* %arrayidx.6.i, align 1
%conv.6.i = sext i8 %15 to i32
store i32 %conv.6.i, i32* @c, align 4
%inc.6.i = add nsw i32 %8, 7
store i32 %inc.6.i, i32* @b, align 4
%arrayidx.sum8 = add i32 %add.i, %inc.6.i
%arrayidx.7.i = getelementptr inbounds i8* %3, i32 %arrayidx.sum8
%arrayidx.7.i = getelementptr inbounds i8, i8* %3, i32 %arrayidx.sum8
%16 = load i8* %arrayidx.7.i, align 1
%conv.7.i = sext i8 %16 to i32
store i32 %conv.7.i, i32* @c, align 4
Expand All @@ -135,7 +135,7 @@ for.body4.ur.i.preheader:
for.body4.ur.i:
%20 = phi i32 [ %inc.ur.i, %for.body4.ur.i ], [ %.ph, %for.body4.ur.i.preheader ]
%arrayidx.sum = add i32 %add.i, %20
%arrayidx.ur.i = getelementptr inbounds i8* %3, i32 %arrayidx.sum
%arrayidx.ur.i = getelementptr inbounds i8, i8* %3, i32 %arrayidx.sum
%21 = load i8* %arrayidx.ur.i, align 1
%conv.ur.i = sext i8 %21 to i32
store i32 %conv.ur.i, i32* @c, align 4
Expand Down
14 changes: 7 additions & 7 deletions llvm/test/Analysis/Delinearization/himeno_1.ll
Original file line number Diff line number Diff line change
Expand Up @@ -35,23 +35,23 @@

define void @jacobi(i32 %nn, %struct.Mat* nocapture %a, %struct.Mat* nocapture %p) nounwind uwtable {
entry:
%p.rows.ptr = getelementptr inbounds %struct.Mat* %p, i64 0, i32 2
%p.rows.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %p, i64 0, i32 2
%p.rows = load i32* %p.rows.ptr
%p.rows.sub = add i32 %p.rows, -1
%p.rows.sext = sext i32 %p.rows.sub to i64
%p.cols.ptr = getelementptr inbounds %struct.Mat* %p, i64 0, i32 3
%p.cols.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %p, i64 0, i32 3
%p.cols = load i32* %p.cols.ptr
%p.cols.sub = add i32 %p.cols, -1
%p.cols.sext = sext i32 %p.cols.sub to i64
%p.deps.ptr = getelementptr inbounds %struct.Mat* %p, i64 0, i32 4
%p.deps.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %p, i64 0, i32 4
%p.deps = load i32* %p.deps.ptr
%p.deps.sub = add i32 %p.deps, -1
%p.deps.sext = sext i32 %p.deps.sub to i64
%a.cols.ptr = getelementptr inbounds %struct.Mat* %a, i64 0, i32 3
%a.cols.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %a, i64 0, i32 3
%a.cols = load i32* %a.cols.ptr
%a.deps.ptr = getelementptr inbounds %struct.Mat* %a, i64 0, i32 4
%a.deps.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %a, i64 0, i32 4
%a.deps = load i32* %a.deps.ptr
%a.base.ptr = getelementptr inbounds %struct.Mat* %a, i64 0, i32 0
%a.base.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %a, i64 0, i32 0
%a.base = load float** %a.base.ptr, align 8
br label %for.i

Expand All @@ -71,7 +71,7 @@ for.k: ; preds = %for.k, %for.j
%tmp2 = add i64 %tmp1, %j
%tmp3 = mul i64 %tmp2, %a.deps.sext
%tmp4 = add nsw i64 %k, %tmp3
%arrayidx = getelementptr inbounds float* %a.base, i64 %tmp4
%arrayidx = getelementptr inbounds float, float* %a.base, i64 %tmp4
store float 1.000000e+00, float* %arrayidx
%k.inc = add nsw i64 %k, 1
%k.exitcond = icmp eq i64 %k.inc, %p.deps.sext
Expand Down
14 changes: 7 additions & 7 deletions llvm/test/Analysis/Delinearization/himeno_2.ll
Original file line number Diff line number Diff line change
Expand Up @@ -35,25 +35,25 @@

define void @jacobi(i32 %nn, %struct.Mat* nocapture %a, %struct.Mat* nocapture %p) nounwind uwtable {
entry:
%p.rows.ptr = getelementptr inbounds %struct.Mat* %p, i64 0, i32 2
%p.rows.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %p, i64 0, i32 2
%p.rows = load i32* %p.rows.ptr
%p.rows.sub = add i32 %p.rows, -1
%p.rows.sext = sext i32 %p.rows.sub to i64
%p.cols.ptr = getelementptr inbounds %struct.Mat* %p, i64 0, i32 3
%p.cols.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %p, i64 0, i32 3
%p.cols = load i32* %p.cols.ptr
%p.cols.sub = add i32 %p.cols, -1
%p.cols.sext = sext i32 %p.cols.sub to i64
%p.deps.ptr = getelementptr inbounds %struct.Mat* %p, i64 0, i32 4
%p.deps.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %p, i64 0, i32 4
%p.deps = load i32* %p.deps.ptr
%p.deps.sub = add i32 %p.deps, -1
%p.deps.sext = sext i32 %p.deps.sub to i64
%a.cols.ptr = getelementptr inbounds %struct.Mat* %a, i64 0, i32 3
%a.cols.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %a, i64 0, i32 3
%a.cols = load i32* %a.cols.ptr
%a.cols.sext = sext i32 %a.cols to i64
%a.deps.ptr = getelementptr inbounds %struct.Mat* %a, i64 0, i32 4
%a.deps.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %a, i64 0, i32 4
%a.deps = load i32* %a.deps.ptr
%a.deps.sext = sext i32 %a.deps to i64
%a.base.ptr = getelementptr inbounds %struct.Mat* %a, i64 0, i32 0
%a.base.ptr = getelementptr inbounds %struct.Mat, %struct.Mat* %a, i64 0, i32 0
%a.base = load float** %a.base.ptr, align 8
br label %for.i

Expand All @@ -71,7 +71,7 @@ for.k: ; preds = %for.k, %for.j
%tmp2 = add i64 %tmp1, %j
%tmp3 = mul i64 %tmp2, %a.deps.sext
%tmp4 = add nsw i64 %k, %tmp3
%arrayidx = getelementptr inbounds float* %a.base, i64 %tmp4
%arrayidx = getelementptr inbounds float, float* %a.base, i64 %tmp4
store float 1.000000e+00, float* %arrayidx
%k.inc = add nsw i64 %k, 1
%k.exitcond = icmp eq i64 %k.inc, %p.deps.sext
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ for.j:
%j = phi i64 [ 0, %for.i ], [ %j.inc, %for.j ]
%prodj = mul i64 %j, 2
%vlaarrayidx.sum = add i64 %prodj, %tmp
%arrayidx = getelementptr inbounds double* %A, i64 %vlaarrayidx.sum
%arrayidx = getelementptr inbounds double, double* %A, i64 %vlaarrayidx.sum
store double 1.0, double* %arrayidx
%j.inc = add nsw i64 %j, 1
%j.exitcond = icmp eq i64 %j.inc, %m
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ for.k:
%subscript2 = mul i64 %subscript1, %o
%offset2 = add nsw i64 %k, 7
%subscript = add i64 %subscript2, %offset2
%idx = getelementptr inbounds double* %A, i64 %subscript
%idx = getelementptr inbounds double, double* %A, i64 %subscript
store double 1.0, double* %idx
br label %for.k.inc

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ for.body6.us.us: ; preds = %for.body6.us.us, %f
%k.019.us.us = phi i64 [ 0, %for.body6.lr.ph.us.us ], [ %inc.us.us, %for.body6.us.us ]
%arrayidx.sum.us.us = add i64 %k.019.us.us, 7
%arrayidx9.sum.us.us = add i64 %arrayidx.sum.us.us, %tmp17.us.us
%arrayidx10.us.us = getelementptr inbounds double* %A, i64 %arrayidx9.sum.us.us
%arrayidx10.us.us = getelementptr inbounds double, double* %A, i64 %arrayidx9.sum.us.us
store double 1.000000e+00, double* %arrayidx10.us.us, align 8
%inc.us.us = add nsw i64 %k.019.us.us, 1
%exitcond = icmp eq i64 %inc.us.us, %o
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ for.k:
%subscript2 = mul i64 %subscript1, %o
%offset2 = add nsw i64 %k, %r
%subscript = add i64 %subscript2, %offset2
%idx = getelementptr inbounds double* %A, i64 %subscript
%idx = getelementptr inbounds double, double* %A, i64 %subscript
store double 1.0, double* %idx
br label %for.k.inc

Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Analysis/Delinearization/multidim_only_ivs_2d.ll
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ for.i:
for.j:
%j = phi i64 [ 0, %for.i ], [ %j.inc, %for.j ]
%vlaarrayidx.sum = add i64 %j, %tmp
%arrayidx = getelementptr inbounds double* %A, i64 %vlaarrayidx.sum
%arrayidx = getelementptr inbounds double, double* %A, i64 %vlaarrayidx.sum
%val = load double* %arrayidx
store double %val, double* %arrayidx
%j.inc = add nsw i64 %j, 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ for.body9.lr.ph.us.us: ; preds = %for.cond7.preheader
for.body9.us.us: ; preds = %for.body9.us.us, %for.body9.lr.ph.us.us
%j.021.us.us = phi i64 [ 0, %for.body9.lr.ph.us.us ], [ %inc.us.us, %for.body9.us.us ]
%arrayidx.sum.us.us = add i64 %j.021.us.us, %0
%arrayidx10.us.us = getelementptr inbounds double* %vla.us, i64 %arrayidx.sum.us.us
%arrayidx10.us.us = getelementptr inbounds double, double* %vla.us, i64 %arrayidx.sum.us.us
store double 1.000000e+00, double* %arrayidx10.us.us, align 8
%inc.us.us = add nsw i64 %j.021.us.us, 1
%exitcond50 = icmp eq i64 %inc.us.us, %indvars.iv48
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Analysis/Delinearization/multidim_only_ivs_3d.ll
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ for.k:
%subscript1 = add i64 %j, %subscript0
%subscript2 = mul i64 %subscript1, %o
%subscript = add i64 %subscript2, %k
%idx = getelementptr inbounds double* %A, i64 %subscript
%idx = getelementptr inbounds double, double* %A, i64 %subscript
store double 1.0, double* %idx
br label %for.k.inc

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ for.k:
%tmp.us.us = add i64 %j, %tmp
%tmp17.us.us = mul i64 %tmp.us.us, %n_zext
%subscript = add i64 %tmp17.us.us, %k
%idx = getelementptr inbounds double* %A, i64 %subscript
%idx = getelementptr inbounds double, double* %A, i64 %subscript
store double 1.0, double* %idx
br label %for.k.inc

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ for.j:
%j = phi i64 [ 0, %for.i ], [ %j.inc, %for.j ]
%tmp = mul nsw i64 %i, %m
%vlaarrayidx.sum = add i64 %j, %tmp
%arrayidx = getelementptr inbounds double* %A, i64 %vlaarrayidx.sum
%arrayidx = getelementptr inbounds double, double* %A, i64 %vlaarrayidx.sum
store double 1.0, double* %arrayidx
%tmp1 = mul nsw i64 %j, %n
%vlaarrayidx.sum1 = add i64 %i, %tmp1
%arrayidx1 = getelementptr inbounds double* %A, i64 %vlaarrayidx.sum1
%arrayidx1 = getelementptr inbounds double, double* %A, i64 %vlaarrayidx.sum1
store double 1.0, double* %arrayidx1
%j.inc = add nsw i64 %j, 1
%j.exitcond = icmp eq i64 %j.inc, %m
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/Analysis/Delinearization/undef.ll
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ for.body60:
%tmp5 = add i64 %iy.067, %0
%tmp6 = mul i64 %tmp5, undef
%arrayidx69.sum = add i64 undef, %tmp6
%arrayidx70 = getelementptr inbounds double* %Ey, i64 %arrayidx69.sum
%arrayidx70 = getelementptr inbounds double, double* %Ey, i64 %arrayidx69.sum
%1 = load double* %arrayidx70, align 8
%inc = add nsw i64 %ix.062, 1
br i1 false, label %for.body60, label %for.end
Expand Down
104 changes: 52 additions & 52 deletions llvm/test/Analysis/DependenceAnalysis/Banerjee.ll

Large diffs are not rendered by default.

96 changes: 48 additions & 48 deletions llvm/test/Analysis/DependenceAnalysis/Coupled.ll
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi i32* [ %B, %entry ], [ %incdec.ptr, %for.body ]
%conv = trunc i64 %i.02 to i32
%arrayidx1 = getelementptr inbounds [100 x i32]* %A, i64 %i.02, i64 %i.02
%arrayidx1 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
store i32 %conv, i32* %arrayidx1, align 4
%add = add nsw i64 %i.02, 9
%add2 = add nsw i64 %i.02, 10
%arrayidx4 = getelementptr inbounds [100 x i32]* %A, i64 %add2, i64 %add
%arrayidx4 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %add2, i64 %add
%0 = load i32* %arrayidx4, align 4
%incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
%incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
store i32 %0, i32* %B.addr.01, align 4
%inc = add nsw i64 %i.02, 1
%exitcond = icmp ne i64 %inc, 50
Expand Down Expand Up @@ -60,13 +60,13 @@ for.body: ; preds = %entry, %for.body
%i.02 = phi i64 [ 0, %entry ], [ %inc, %for.body ]
%B.addr.01 = phi i32* [ %B, %entry ], [ %incdec.ptr, %for.body ]
%conv = trunc i64 %i.02 to i32
%arrayidx1 = getelementptr inbounds [100 x i32]* %A, i64 %i.02, i64 %i.02
%arrayidx1 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
store i32 %conv, i32* %arrayidx1, align 4
%add = add nsw i64 %i.02, 9
%add2 = add nsw i64 %i.02, 9
%arrayidx4 = getelementptr inbounds [100 x i32]* %A, i64 %add2, i64 %add
%arrayidx4 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %add2, i64 %add
%0 = load i32* %arrayidx4, align 4
%incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
%incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
store i32 %0, i32* %B.addr.01, align 4
%inc = add nsw i64 %i.02, 1
%exitcond = icmp ne i64 %inc, 50
Expand Down Expand Up @@ -100,11 +100,11 @@ for.body: ; preds = %entry, %for.body
%sub = add nsw i64 %mul, -6
%mul1 = mul nsw i64 %i.02, 3
%sub2 = add nsw i64 %mul1, -6
%arrayidx3 = getelementptr inbounds [100 x i32]* %A, i64 %sub2, i64 %sub
%arrayidx3 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %sub2, i64 %sub
store i32 %conv, i32* %arrayidx3, align 4
%arrayidx5 = getelementptr inbounds [100 x i32]* %A, i64 %i.02, i64 %i.02
%arrayidx5 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
%0 = load i32* %arrayidx5, align 4
%incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
%incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
store i32 %0, i32* %B.addr.01, align 4
%inc = add nsw i64 %i.02, 1
%exitcond = icmp ne i64 %inc, 50
Expand Down Expand Up @@ -138,11 +138,11 @@ for.body: ; preds = %entry, %for.body
%sub = add nsw i64 %mul, -5
%mul1 = mul nsw i64 %i.02, 3
%sub2 = add nsw i64 %mul1, -6
%arrayidx3 = getelementptr inbounds [100 x i32]* %A, i64 %sub2, i64 %sub
%arrayidx3 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %sub2, i64 %sub
store i32 %conv, i32* %arrayidx3, align 4
%arrayidx5 = getelementptr inbounds [100 x i32]* %A, i64 %i.02, i64 %i.02
%arrayidx5 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
%0 = load i32* %arrayidx5, align 4
%incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
%incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
store i32 %0, i32* %B.addr.01, align 4
%inc = add nsw i64 %i.02, 1
%exitcond = icmp ne i64 %inc, 50
Expand Down Expand Up @@ -177,11 +177,11 @@ for.body: ; preds = %entry, %for.body
%sub = sub nsw i64 %mul, %conv1
%mul2 = mul nsw i64 %i.02, 3
%sub3 = add nsw i64 %mul2, -6
%arrayidx4 = getelementptr inbounds [100 x i32]* %A, i64 %sub3, i64 %sub
%arrayidx4 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %sub3, i64 %sub
store i32 %conv, i32* %arrayidx4, align 4
%arrayidx6 = getelementptr inbounds [100 x i32]* %A, i64 %i.02, i64 %i.02
%arrayidx6 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
%0 = load i32* %arrayidx6, align 4
%incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
%incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
store i32 %0, i32* %B.addr.01, align 4
%inc = add nsw i64 %i.02, 1
%exitcond = icmp ne i64 %inc, 50
Expand Down Expand Up @@ -218,11 +218,11 @@ for.body: ; preds = %entry, %for.body
%conv3 = sext i32 %n to i64
%sub4 = sub nsw i64 %mul2, %conv3
%add = add nsw i64 %sub4, 1
%arrayidx5 = getelementptr inbounds [100 x i32]* %A, i64 %add, i64 %sub
%arrayidx5 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %add, i64 %sub
store i32 %conv, i32* %arrayidx5, align 4
%arrayidx7 = getelementptr inbounds [100 x i32]* %A, i64 %i.02, i64 %i.02
%arrayidx7 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
%0 = load i32* %arrayidx7, align 4
%incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
%incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
store i32 %0, i32* %B.addr.01, align 4
%inc = add nsw i64 %i.02, 1
%exitcond = icmp ne i64 %inc, 50
Expand Down Expand Up @@ -254,11 +254,11 @@ for.body: ; preds = %entry, %for.body
%conv = trunc i64 %i.02 to i32
%mul = mul nsw i64 %i.02, 3
%sub = add nsw i64 %mul, -6
%arrayidx1 = getelementptr inbounds [100 x i32]* %A, i64 %i.02, i64 %sub
%arrayidx1 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %sub
store i32 %conv, i32* %arrayidx1, align 4
%arrayidx3 = getelementptr inbounds [100 x i32]* %A, i64 %i.02, i64 %i.02
%arrayidx3 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
%0 = load i32* %arrayidx3, align 4
%incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
%incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
store i32 %0, i32* %B.addr.01, align 4
%inc = add nsw i64 %i.02, 1
%exitcond = icmp ne i64 %inc, 50
Expand Down Expand Up @@ -290,11 +290,11 @@ for.body: ; preds = %entry, %for.body
%conv = trunc i64 %i.02 to i32
%mul = mul nsw i64 %i.02, 3
%sub = add nsw i64 %mul, -5
%arrayidx1 = getelementptr inbounds [100 x i32]* %A, i64 %i.02, i64 %sub
%arrayidx1 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %sub
store i32 %conv, i32* %arrayidx1, align 4
%arrayidx3 = getelementptr inbounds [100 x i32]* %A, i64 %i.02, i64 %i.02
%arrayidx3 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
%0 = load i32* %arrayidx3, align 4
%incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
%incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
store i32 %0, i32* %B.addr.01, align 4
%inc = add nsw i64 %i.02, 1
%exitcond = icmp ne i64 %inc, 50
Expand Down Expand Up @@ -327,11 +327,11 @@ for.body: ; preds = %entry, %for.body
%sub = sub nsw i64 3, %i.02
%mul = mul nsw i64 %i.02, 3
%sub1 = add nsw i64 %mul, -18
%arrayidx2 = getelementptr inbounds [100 x i32]* %A, i64 %sub1, i64 %sub
%arrayidx2 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %sub1, i64 %sub
store i32 %conv, i32* %arrayidx2, align 4
%arrayidx4 = getelementptr inbounds [100 x i32]* %A, i64 %i.02, i64 %i.02
%arrayidx4 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
%0 = load i32* %arrayidx4, align 4
%incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
%incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
store i32 %0, i32* %B.addr.01, align 4
%inc = add nsw i64 %i.02, 1
%exitcond = icmp ne i64 %inc, 16
Expand Down Expand Up @@ -364,11 +364,11 @@ for.body: ; preds = %entry, %for.body
%sub = sub nsw i64 2, %i.02
%mul = mul nsw i64 %i.02, 3
%sub1 = add nsw i64 %mul, -18
%arrayidx2 = getelementptr inbounds [100 x i32]* %A, i64 %sub1, i64 %sub
%arrayidx2 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %sub1, i64 %sub
store i32 %conv, i32* %arrayidx2, align 4
%arrayidx4 = getelementptr inbounds [100 x i32]* %A, i64 %i.02, i64 %i.02
%arrayidx4 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
%0 = load i32* %arrayidx4, align 4
%incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
%incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
store i32 %0, i32* %B.addr.01, align 4
%inc = add nsw i64 %i.02, 1
%exitcond = icmp ne i64 %inc, 16
Expand Down Expand Up @@ -402,11 +402,11 @@ for.body: ; preds = %entry, %for.body
%sub = sub nsw i64 6, %i.02
%mul = mul nsw i64 %i.02, 3
%sub1 = add nsw i64 %mul, -18
%arrayidx2 = getelementptr inbounds [100 x i32]* %A, i64 %sub1, i64 %sub
%arrayidx2 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %sub1, i64 %sub
store i32 %conv, i32* %arrayidx2, align 4
%arrayidx4 = getelementptr inbounds [100 x i32]* %A, i64 %i.02, i64 %i.02
%arrayidx4 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
%0 = load i32* %arrayidx4, align 4
%incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
%incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
store i32 %0, i32* %B.addr.01, align 4
%inc = add nsw i64 %i.02, 1
%exitcond = icmp ne i64 %inc, 16
Expand Down Expand Up @@ -440,11 +440,11 @@ for.body: ; preds = %entry, %for.body
%sub = sub nsw i64 18, %i.02
%mul = mul nsw i64 %i.02, 3
%sub1 = add nsw i64 %mul, -18
%arrayidx2 = getelementptr inbounds [100 x i32]* %A, i64 %sub1, i64 %sub
%arrayidx2 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %sub1, i64 %sub
store i32 %conv, i32* %arrayidx2, align 4
%arrayidx4 = getelementptr inbounds [100 x i32]* %A, i64 %i.02, i64 %i.02
%arrayidx4 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
%0 = load i32* %arrayidx4, align 4
%incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
%incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
store i32 %0, i32* %B.addr.01, align 4
%inc = add nsw i64 %i.02, 1
%exitcond = icmp ne i64 %inc, 16
Expand Down Expand Up @@ -478,11 +478,11 @@ for.body: ; preds = %entry, %for.body
%sub = sub nsw i64 22, %i.02
%mul = mul nsw i64 %i.02, 3
%sub1 = add nsw i64 %mul, -18
%arrayidx2 = getelementptr inbounds [100 x i32]* %A, i64 %sub1, i64 %sub
%arrayidx2 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %sub1, i64 %sub
store i32 %conv, i32* %arrayidx2, align 4
%arrayidx4 = getelementptr inbounds [100 x i32]* %A, i64 %i.02, i64 %i.02
%arrayidx4 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
%0 = load i32* %arrayidx4, align 4
%incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
%incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
store i32 %0, i32* %B.addr.01, align 4
%inc = add nsw i64 %i.02, 1
%exitcond = icmp ne i64 %inc, 13
Expand Down Expand Up @@ -515,11 +515,11 @@ for.body: ; preds = %entry, %for.body
%sub = sub nsw i64 22, %i.02
%mul = mul nsw i64 %i.02, 3
%sub1 = add nsw i64 %mul, -18
%arrayidx2 = getelementptr inbounds [100 x i32]* %A, i64 %sub1, i64 %sub
%arrayidx2 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %sub1, i64 %sub
store i32 %conv, i32* %arrayidx2, align 4
%arrayidx4 = getelementptr inbounds [100 x i32]* %A, i64 %i.02, i64 %i.02
%arrayidx4 = getelementptr inbounds [100 x i32], [100 x i32]* %A, i64 %i.02, i64 %i.02
%0 = load i32* %arrayidx4, align 4
%incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
%incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
store i32 %0, i32* %B.addr.01, align 4
%inc = add nsw i64 %i.02, 1
%exitcond = icmp ne i64 %inc, 12
Expand Down Expand Up @@ -552,11 +552,11 @@ for.body: ; preds = %entry, %for.body
%sub = sub nsw i64 18, %i.02
%mul = mul nsw i64 %i.02, 3
%sub1 = add nsw i64 %mul, -18
%arrayidx3 = getelementptr inbounds [100 x [100 x i32]]* %A, i64 %sub1, i64 %sub, i64 %i.02
%arrayidx3 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %A, i64 %sub1, i64 %sub, i64 %i.02
store i32 %conv, i32* %arrayidx3, align 4
%arrayidx6 = getelementptr inbounds [100 x [100 x i32]]* %A, i64 %i.02, i64 %i.02, i64 %i.02
%arrayidx6 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %A, i64 %i.02, i64 %i.02, i64 %i.02
%0 = load i32* %arrayidx6, align 4
%incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
%incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
store i32 %0, i32* %B.addr.01, align 4
%inc = add nsw i64 %i.02, 1
%exitcond = icmp ne i64 %inc, 100
Expand Down Expand Up @@ -589,11 +589,11 @@ for.body: ; preds = %entry, %for.body
%sub = sub nsw i64 22, %i.02
%mul = mul nsw i64 %i.02, 3
%sub1 = add nsw i64 %mul, -18
%arrayidx3 = getelementptr inbounds [100 x [100 x i32]]* %A, i64 %sub1, i64 %sub, i64 %i.02
%arrayidx3 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %A, i64 %sub1, i64 %sub, i64 %i.02
store i32 %conv, i32* %arrayidx3, align 4
%arrayidx6 = getelementptr inbounds [100 x [100 x i32]]* %A, i64 %i.02, i64 %i.02, i64 %i.02
%arrayidx6 = getelementptr inbounds [100 x [100 x i32]], [100 x [100 x i32]]* %A, i64 %i.02, i64 %i.02, i64 %i.02
%0 = load i32* %arrayidx6, align 4
%incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
%incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
store i32 %0, i32* %B.addr.01, align 4
%inc = add nsw i64 %i.02, 1
%exitcond = icmp ne i64 %inc, 100
Expand Down
86 changes: 43 additions & 43 deletions llvm/test/Analysis/DependenceAnalysis/ExactRDIV.ll
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ for.body: ; preds = %entry, %for.body
%conv = trunc i64 %i.03 to i32
%mul = shl nsw i64 %i.03, 2
%add = add nsw i64 %mul, 10
%arrayidx = getelementptr inbounds i32* %A, i64 %add
%arrayidx = getelementptr inbounds i32, i32* %A, i64 %add
store i32 %conv, i32* %arrayidx, align 4
%inc = add nsw i64 %i.03, 1
%exitcond5 = icmp ne i64 %inc, 10
Expand All @@ -40,9 +40,9 @@ for.body4: ; preds = %for.body4.preheader
%B.addr.01 = phi i32* [ %incdec.ptr, %for.body4 ], [ %B, %for.body4.preheader ]
%mul5 = shl nsw i64 %j.02, 1
%add64 = or i64 %mul5, 1
%arrayidx7 = getelementptr inbounds i32* %A, i64 %add64
%arrayidx7 = getelementptr inbounds i32, i32* %A, i64 %add64
%0 = load i32* %arrayidx7, align 4
%incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
%incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
store i32 %0, i32* %B.addr.01, align 4
%inc9 = add nsw i64 %j.02, 1
%exitcond = icmp ne i64 %inc9, 10
Expand Down Expand Up @@ -74,7 +74,7 @@ for.body: ; preds = %entry, %for.body
%conv = trunc i64 %i.03 to i32
%mul = mul nsw i64 %i.03, 11
%sub = add nsw i64 %mul, -45
%arrayidx = getelementptr inbounds i32* %A, i64 %sub
%arrayidx = getelementptr inbounds i32, i32* %A, i64 %sub
store i32 %conv, i32* %arrayidx, align 4
%inc = add nsw i64 %i.03, 1
%exitcond4 = icmp ne i64 %inc, 5
Expand All @@ -86,9 +86,9 @@ for.body4.preheader: ; preds = %for.body
for.body4: ; preds = %for.body4.preheader, %for.body4
%j.02 = phi i64 [ %inc7, %for.body4 ], [ 0, %for.body4.preheader ]
%B.addr.01 = phi i32* [ %incdec.ptr, %for.body4 ], [ %B, %for.body4.preheader ]
%arrayidx5 = getelementptr inbounds i32* %A, i64 %j.02
%arrayidx5 = getelementptr inbounds i32, i32* %A, i64 %j.02
%0 = load i32* %arrayidx5, align 4
%incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
%incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
store i32 %0, i32* %B.addr.01, align 4
%inc7 = add nsw i64 %j.02, 1
%exitcond = icmp ne i64 %inc7, 10
Expand Down Expand Up @@ -120,7 +120,7 @@ for.body: ; preds = %entry, %for.body
%conv = trunc i64 %i.03 to i32
%mul = mul nsw i64 %i.03, 11
%sub = add nsw i64 %mul, -45
%arrayidx = getelementptr inbounds i32* %A, i64 %sub
%arrayidx = getelementptr inbounds i32, i32* %A, i64 %sub
store i32 %conv, i32* %arrayidx, align 4
%inc = add nsw i64 %i.03, 1
%exitcond4 = icmp ne i64 %inc, 6
Expand All @@ -132,9 +132,9 @@ for.body4.preheader: ; preds = %for.body
for.body4: ; preds = %for.body4.preheader, %for.body4
%j.02 = phi i64 [ %inc7, %for.body4 ], [ 0, %for.body4.preheader ]
%B.addr.01 = phi i32* [ %incdec.ptr, %for.body4 ], [ %B, %for.body4.preheader ]
%arrayidx5 = getelementptr inbounds i32* %A, i64 %j.02
%arrayidx5 = getelementptr inbounds i32, i32* %A, i64 %j.02
%0 = load i32* %arrayidx5, align 4
%incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
%incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
store i32 %0, i32* %B.addr.01, align 4
%inc7 = add nsw i64 %j.02, 1
%exitcond = icmp ne i64 %inc7, 10
Expand Down Expand Up @@ -166,7 +166,7 @@ for.body: ; preds = %entry, %for.body
%conv = trunc i64 %i.03 to i32
%mul = mul nsw i64 %i.03, 11
%sub = add nsw i64 %mul, -45
%arrayidx = getelementptr inbounds i32* %A, i64 %sub
%arrayidx = getelementptr inbounds i32, i32* %A, i64 %sub
store i32 %conv, i32* %arrayidx, align 4
%inc = add nsw i64 %i.03, 1
%exitcond4 = icmp ne i64 %inc, 5
Expand All @@ -178,9 +178,9 @@ for.body4.preheader: ; preds = %for.body
for.body4: ; preds = %for.body4.preheader, %for.body4
%j.02 = phi i64 [ %inc7, %for.body4 ], [ 0, %for.body4.preheader ]
%B.addr.01 = phi i32* [ %incdec.ptr, %for.body4 ], [ %B, %for.body4.preheader ]
%arrayidx5 = getelementptr inbounds i32* %A, i64 %j.02
%arrayidx5 = getelementptr inbounds i32, i32* %A, i64 %j.02
%0 = load i32* %arrayidx5, align 4
%incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
%incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
store i32 %0, i32* %B.addr.01, align 4
%inc7 = add nsw i64 %j.02, 1
%exitcond = icmp ne i64 %inc7, 11
Expand Down Expand Up @@ -212,7 +212,7 @@ for.body: ; preds = %entry, %for.body
%conv = trunc i64 %i.03 to i32
%mul = mul nsw i64 %i.03, 11
%sub = add nsw i64 %mul, -45
%arrayidx = getelementptr inbounds i32* %A, i64 %sub
%arrayidx = getelementptr inbounds i32, i32* %A, i64 %sub
store i32 %conv, i32* %arrayidx, align 4
%inc = add nsw i64 %i.03, 1
%exitcond4 = icmp ne i64 %inc, 6
Expand All @@ -224,9 +224,9 @@ for.body4.preheader: ; preds = %for.body
for.body4: ; preds = %for.body4.preheader, %for.body4
%j.02 = phi i64 [ %inc7, %for.body4 ], [ 0, %for.body4.preheader ]
%B.addr.01 = phi i32* [ %incdec.ptr, %for.body4 ], [ %B, %for.body4.preheader ]
%arrayidx5 = getelementptr inbounds i32* %A, i64 %j.02
%arrayidx5 = getelementptr inbounds i32, i32* %A, i64 %j.02
%0 = load i32* %arrayidx5, align 4
%incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
%incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
store i32 %0, i32* %B.addr.01, align 4
%inc7 = add nsw i64 %j.02, 1
%exitcond = icmp ne i64 %inc7, 11
Expand Down Expand Up @@ -258,7 +258,7 @@ for.body: ; preds = %entry, %for.body
%conv = trunc i64 %i.03 to i32
%mul = mul nsw i64 %i.03, -11
%add = add nsw i64 %mul, 45
%arrayidx = getelementptr inbounds i32* %A, i64 %add
%arrayidx = getelementptr inbounds i32, i32* %A, i64 %add
store i32 %conv, i32* %arrayidx, align 4
%inc = add nsw i64 %i.03, 1
%exitcond4 = icmp ne i64 %inc, 5
Expand All @@ -271,9 +271,9 @@ for.body4: ; preds = %for.body4.preheader
%j.02 = phi i64 [ %inc7, %for.body4 ], [ 0, %for.body4.preheader ]
%B.addr.01 = phi i32* [ %incdec.ptr, %for.body4 ], [ %B, %for.body4.preheader ]
%sub = sub nsw i64 0, %j.02
%arrayidx5 = getelementptr inbounds i32* %A, i64 %sub
%arrayidx5 = getelementptr inbounds i32, i32* %A, i64 %sub
%0 = load i32* %arrayidx5, align 4
%incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
%incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
store i32 %0, i32* %B.addr.01, align 4
%inc7 = add nsw i64 %j.02, 1
%exitcond = icmp ne i64 %inc7, 10
Expand Down Expand Up @@ -305,7 +305,7 @@ for.body: ; preds = %entry, %for.body
%conv = trunc i64 %i.03 to i32
%mul = mul nsw i64 %i.03, -11
%add = add nsw i64 %mul, 45
%arrayidx = getelementptr inbounds i32* %A, i64 %add
%arrayidx = getelementptr inbounds i32, i32* %A, i64 %add
store i32 %conv, i32* %arrayidx, align 4
%inc = add nsw i64 %i.03, 1
%exitcond4 = icmp ne i64 %inc, 6
Expand All @@ -318,9 +318,9 @@ for.body4: ; preds = %for.body4.preheader
%j.02 = phi i64 [ %inc7, %for.body4 ], [ 0, %for.body4.preheader ]
%B.addr.01 = phi i32* [ %incdec.ptr, %for.body4 ], [ %B, %for.body4.preheader ]
%sub = sub nsw i64 0, %j.02
%arrayidx5 = getelementptr inbounds i32* %A, i64 %sub
%arrayidx5 = getelementptr inbounds i32, i32* %A, i64 %sub
%0 = load i32* %arrayidx5, align 4
%incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
%incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
store i32 %0, i32* %B.addr.01, align 4
%inc7 = add nsw i64 %j.02, 1
%exitcond = icmp ne i64 %inc7, 10
Expand Down Expand Up @@ -352,7 +352,7 @@ for.body: ; preds = %entry, %for.body
%conv = trunc i64 %i.03 to i32
%mul = mul nsw i64 %i.03, -11
%add = add nsw i64 %mul, 45
%arrayidx = getelementptr inbounds i32* %A, i64 %add
%arrayidx = getelementptr inbounds i32, i32* %A, i64 %add
store i32 %conv, i32* %arrayidx, align 4
%inc = add nsw i64 %i.03, 1
%exitcond4 = icmp ne i64 %inc, 5
Expand All @@ -365,9 +365,9 @@ for.body4: ; preds = %for.body4.preheader
%j.02 = phi i64 [ %inc7, %for.body4 ], [ 0, %for.body4.preheader ]
%B.addr.01 = phi i32* [ %incdec.ptr, %for.body4 ], [ %B, %for.body4.preheader ]
%sub = sub nsw i64 0, %j.02
%arrayidx5 = getelementptr inbounds i32* %A, i64 %sub
%arrayidx5 = getelementptr inbounds i32, i32* %A, i64 %sub
%0 = load i32* %arrayidx5, align 4
%incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
%incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
store i32 %0, i32* %B.addr.01, align 4
%inc7 = add nsw i64 %j.02, 1
%exitcond = icmp ne i64 %inc7, 11
Expand Down Expand Up @@ -399,7 +399,7 @@ for.body: ; preds = %entry, %for.body
%conv = trunc i64 %i.03 to i32
%mul = mul nsw i64 %i.03, -11
%add = add nsw i64 %mul, 45
%arrayidx = getelementptr inbounds i32* %A, i64 %add
%arrayidx = getelementptr inbounds i32, i32* %A, i64 %add
store i32 %conv, i32* %arrayidx, align 4
%inc = add nsw i64 %i.03, 1
%exitcond4 = icmp ne i64 %inc, 6
Expand All @@ -412,9 +412,9 @@ for.body4: ; preds = %for.body4.preheader
%j.02 = phi i64 [ %inc7, %for.body4 ], [ 0, %for.body4.preheader ]
%B.addr.01 = phi i32* [ %incdec.ptr, %for.body4 ], [ %B, %for.body4.preheader ]
%sub = sub nsw i64 0, %j.02
%arrayidx5 = getelementptr inbounds i32* %A, i64 %sub
%arrayidx5 = getelementptr inbounds i32, i32* %A, i64 %sub
%0 = load i32* %arrayidx5, align 4
%incdec.ptr = getelementptr inbounds i32* %B.addr.01, i64 1
%incdec.ptr = getelementptr inbounds i32, i32* %B.addr.01, i64 1
store i32 %0, i32* %B.addr.01, align 4
%inc7 = add nsw i64 %j.02, 1
%exitcond = icmp ne i64 %inc7, 11
Expand Down Expand Up @@ -452,18 +452,18 @@ for.body3: ; preds = %for.cond1.preheader
%conv = trunc i64 %i.03 to i32
%mul = mul nsw i64 %i.03, 11
%sub = sub nsw i64 %mul, %j.02
%arrayidx = getelementptr inbounds i32* %A, i64 %sub
%arrayidx = getelementptr inbounds i32, i32* %A, i64 %sub
store i32 %conv, i32* %arrayidx, align 4
%arrayidx4 = getelementptr inbounds i32* %A, i64 45
%arrayidx4 = getelementptr inbounds i32, i32* %A, i64 45
%0 = load i32* %arrayidx4, align 4
%incdec.ptr = getelementptr inbounds i32* %B.addr.11, i64 1
%incdec.ptr = getelementptr inbounds i32, i32* %B.addr.11, i64 1
store i32 %0, i32* %B.addr.11, align 4
%inc = add nsw i64 %j.02, 1
%exitcond = icmp ne i64 %inc, 10
br i1 %exitcond, label %for.body3, label %for.inc5

for.inc5: ; preds = %for.body3
%scevgep = getelementptr i32* %B.addr.04, i64 10
%scevgep = getelementptr i32, i32* %B.addr.04, i64 10
%inc6 = add nsw i64 %i.03, 1
%exitcond5 = icmp ne i64 %inc6, 5
br i1 %exitcond5, label %for.cond1.preheader, label %for.end7
Expand Down Expand Up @@ -501,18 +501,18 @@ for.body3: ; preds = %for.cond1.preheader
%conv = trunc i64 %i.03 to i32
%mul = mul nsw i64 %i.03, 11
%sub = sub nsw i64 %mul, %j.02
%arrayidx = getelementptr inbounds i32* %A, i64 %sub
%arrayidx = getelementptr inbounds i32, i32* %A, i64 %sub
store i32 %conv, i32* %arrayidx, align 4
%arrayidx4 = getelementptr inbounds i32* %A, i64 45
%arrayidx4 = getelementptr inbounds i32, i32* %A, i64 45
%0 = load i32* %arrayidx4, align 4
%incdec.ptr = getelementptr inbounds i32* %B.addr.11, i64 1
%incdec.ptr = getelementptr inbounds i32, i32* %B.addr.11, i64 1
store i32 %0, i32* %B.addr.11, align 4
%inc = add nsw i64 %j.02, 1
%exitcond = icmp ne i64 %inc, 10
br i1 %exitcond, label %for.body3, label %for.inc5

for.inc5: ; preds = %for.body3
%scevgep = getelementptr i32* %B.addr.04, i64 10
%scevgep = getelementptr i32, i32* %B.addr.04, i64 10
%inc6 = add nsw i64 %i.03, 1
%exitcond5 = icmp ne i64 %inc6, 6
br i1 %exitcond5, label %for.cond1.preheader, label %for.end7
Expand Down Expand Up @@ -549,18 +549,18 @@ for.body3: ; preds = %for.cond1.preheader
%conv = trunc i64 %i.03 to i32
%mul = mul nsw i64 %i.03, 11
%sub = sub nsw i64 %mul, %j.02
%arrayidx = getelementptr inbounds i32* %A, i64 %sub
%arrayidx = getelementptr inbounds i32, i32* %A, i64 %sub
store i32 %conv, i32* %arrayidx, align 4
%arrayidx4 = getelementptr inbounds i32* %A, i64 45
%arrayidx4 = getelementptr inbounds i32, i32* %A, i64 45
%0 = load i32* %arrayidx4, align 4
%incdec.ptr = getelementptr inbounds i32* %B.addr.11, i64 1
%incdec.ptr = getelementptr inbounds i32, i32* %B.addr.11, i64 1
store i32 %0, i32* %B.addr.11, align 4
%inc = add nsw i64 %j.02, 1
%exitcond = icmp ne i64 %inc, 11
br i1 %exitcond, label %for.body3, label %for.inc5

for.inc5: ; preds = %for.body3
%scevgep = getelementptr i32* %B.addr.04, i64 11
%scevgep = getelementptr i32, i32* %B.addr.04, i64 11
%inc6 = add nsw i64 %i.03, 1
%exitcond5 = icmp ne i64 %inc6, 5
br i1 %exitcond5, label %for.cond1.preheader, label %for.end7
Expand Down Expand Up @@ -597,18 +597,18 @@ for.body3: ; preds = %for.cond1.preheader
%conv = trunc i64 %i.03 to i32
%mul = mul nsw i64 %i.03, 11
%sub = sub nsw i64 %mul, %j.02
%arrayidx = getelementptr inbounds i32* %A, i64 %sub
%arrayidx = getelementptr inbounds i32, i32* %A, i64 %sub
store i32 %conv, i32* %arrayidx, align 4
%arrayidx4 = getelementptr inbounds i32* %A, i64 45
%arrayidx4 = getelementptr inbounds i32, i32* %A, i64 45
%0 = load i32* %arrayidx4, align 4
%incdec.ptr = getelementptr inbounds i32* %B.addr.11, i64 1
%incdec.ptr = getelementptr inbounds i32, i32* %B.addr.11, i64 1
store i32 %0, i32* %B.addr.11, align 4
%inc = add nsw i64 %j.02, 1
%exitcond = icmp ne i64 %inc, 11
br i1 %exitcond, label %for.body3, label %for.inc5

for.inc5: ; preds = %for.body3
%scevgep = getelementptr i32* %B.addr.04, i64 11
%scevgep = getelementptr i32, i32* %B.addr.04, i64 11
%inc6 = add nsw i64 %i.03, 1
%exitcond5 = icmp ne i64 %inc6, 6
br i1 %exitcond5, label %for.cond1.preheader, label %for.end7
Expand Down
Loading