55target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
66target triple = "x86_64-apple-macosx10.6.0"
77
8- @A.global = global [100 x [100 x i32 ]] zeroinitializer
98
109;; for (long int i = 0; i < 50; i++) {
1110;; A[i][i] = i;
1211;; *B++ = A[i + 10][i + 9];
1312
14- define void @couple0 (ptr %B , i32 %n ) nounwind uwtable ssp {
13+ define void @couple0 (ptr %A , ptr % B , i32 %n ) nounwind uwtable ssp {
1514; CHECK-LABEL: 'couple0'
1615; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx1, align 4 --> Dst: store i32 %conv, ptr %arrayidx1, align 4
1716; CHECK-NEXT: da analyze - none!
@@ -27,7 +26,6 @@ define void @couple0(ptr %B, i32 %n) nounwind uwtable ssp {
2726; CHECK-NEXT: da analyze - none!
2827;
2928entry:
30- %A = getelementptr inbounds [100 x [100 x i32 ]], ptr @A.global , i32 0 , i32 0
3129 br label %for.body
3230
3331for.body: ; preds = %entry, %for.body
@@ -497,15 +495,16 @@ for.end: ; preds = %for.body
497495
498496
499497;; for (long int i = 0; i <= 15; i++) {
500- ;; A[3*i + 18][18 - i] = i;
498+ ;; A[3*i - 18][18 - i] = i;
501499;; *B++ = A[i][i];
502500
503- define void @couple11 (ptr %B , i32 %n ) nounwind uwtable ssp {
501+ define void @couple11 (ptr %A , ptr % B , i32 %n ) nounwind uwtable ssp {
504502; CHECK-LABEL: 'couple11'
505503; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx2, align 4 --> Dst: store i32 %conv, ptr %arrayidx2, align 4
506504; CHECK-NEXT: da analyze - none!
507505; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx2, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
508- ; CHECK-NEXT: da analyze - none!
506+ ; CHECK-NEXT: da analyze - flow [0|<] splitable!
507+ ; CHECK-NEXT: da analyze - split level = 1, iteration = 9!
509508; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx2, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
510509; CHECK-NEXT: da analyze - confused!
511510; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx4, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
@@ -516,7 +515,6 @@ define void @couple11(ptr %B, i32 %n) nounwind uwtable ssp {
516515; CHECK-NEXT: da analyze - none!
517516;
518517entry:
519- %A = getelementptr inbounds [100 x [100 x i32 ]], ptr @A.global , i32 0 , i32 0
520518 br label %for.body
521519
522520for.body: ; preds = %entry, %for.body
@@ -525,7 +523,7 @@ for.body: ; preds = %entry, %for.body
525523 %conv = trunc i64 %i.02 to i32
526524 %sub = sub nsw i64 18 , %i.02
527525 %mul = mul nsw i64 %i.02 , 3
528- %sub1 = add nsw i64 %mul , 18
526+ %sub1 = add nsw i64 %mul , - 18
529527 %arrayidx2 = getelementptr inbounds [100 x i32 ], ptr %A , i64 %sub1 , i64 %sub
530528 store i32 %conv , ptr %arrayidx2 , align 4
531529 %arrayidx4 = getelementptr inbounds [100 x i32 ], ptr %A , i64 %i.02 , i64 %i.02
@@ -542,15 +540,16 @@ for.end: ; preds = %for.body
542540
543541
544542;; for (long int i = 0; i <= 12; i++) {
545- ;; A[3*i + 18][22 - i] = i;
543+ ;; A[3*i - 18][22 - i] = i;
546544;; *B++ = A[i][i];
547545
548- define void @couple12 (ptr %B , i32 %n ) nounwind uwtable ssp {
546+ define void @couple12 (ptr %A , ptr % B , i32 %n ) nounwind uwtable ssp {
549547; CHECK-LABEL: 'couple12'
550548; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx2, align 4 --> Dst: store i32 %conv, ptr %arrayidx2, align 4
551549; CHECK-NEXT: da analyze - none!
552550; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx2, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
553- ; CHECK-NEXT: da analyze - none!
551+ ; CHECK-NEXT: da analyze - flow [<] splitable!
552+ ; CHECK-NEXT: da analyze - split level = 1, iteration = 11!
554553; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx2, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
555554; CHECK-NEXT: da analyze - confused!
556555; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx4, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
@@ -561,7 +560,6 @@ define void @couple12(ptr %B, i32 %n) nounwind uwtable ssp {
561560; CHECK-NEXT: da analyze - none!
562561;
563562entry:
564- %A = getelementptr inbounds [100 x [100 x i32 ]], ptr @A.global , i32 0 , i32 0
565563 br label %for.body
566564
567565for.body: ; preds = %entry, %for.body
@@ -570,7 +568,7 @@ for.body: ; preds = %entry, %for.body
570568 %conv = trunc i64 %i.02 to i32
571569 %sub = sub nsw i64 22 , %i.02
572570 %mul = mul nsw i64 %i.02 , 3
573- %sub1 = add nsw i64 %mul , 18
571+ %sub1 = add nsw i64 %mul , - 18
574572 %arrayidx2 = getelementptr inbounds [100 x i32 ], ptr %A , i64 %sub1 , i64 %sub
575573 store i32 %conv , ptr %arrayidx2 , align 4
576574 %arrayidx4 = getelementptr inbounds [100 x i32 ], ptr %A , i64 %i.02 , i64 %i.02
@@ -587,7 +585,7 @@ for.end: ; preds = %for.body
587585
588586
589587;; for (long int i = 0; i < 12; i++) {
590- ;; A[3*i + 18][22 - i] = i;
588+ ;; A[3*i - 18][22 - i] = i;
591589;; *B++ = A[i][i];
592590
593591define void @couple13 (ptr %A , ptr %B , i32 %n ) nounwind uwtable ssp {
@@ -614,7 +612,7 @@ for.body: ; preds = %entry, %for.body
614612 %conv = trunc i64 %i.02 to i32
615613 %sub = sub nsw i64 22 , %i.02
616614 %mul = mul nsw i64 %i.02 , 3
617- %sub1 = add nsw i64 %mul , 18
615+ %sub1 = add nsw i64 %mul , - 18
618616 %arrayidx2 = getelementptr inbounds [100 x i32 ], ptr %A , i64 %sub1 , i64 %sub
619617 store i32 %conv , ptr %arrayidx2 , align 4
620618 %arrayidx4 = getelementptr inbounds [100 x i32 ], ptr %A , i64 %i.02 , i64 %i.02
@@ -630,15 +628,15 @@ for.end: ; preds = %for.body
630628}
631629
632630;; for (long int i = 0; i < 100; i++) {
633- ;; A[3*i + 18][18 - i][i] = i;
631+ ;; A[3*i - 18][18 - i][i] = i;
634632;; *B++ = A[i][i][i];
635633
636634define void @couple14 (ptr %A , ptr %B , i32 %n ) nounwind uwtable ssp {
637635; CHECK-LABEL: 'couple14'
638636; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx3, align 4 --> Dst: store i32 %conv, ptr %arrayidx3, align 4
639637; CHECK-NEXT: da analyze - none!
640638; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx3, align 4 --> Dst: %0 = load i32, ptr %arrayidx6, align 4
641- ; CHECK-NEXT: da analyze - none !
639+ ; CHECK-NEXT: da analyze - flow [0|<] !
642640; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx3, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
643641; CHECK-NEXT: da analyze - confused!
644642; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx6, align 4 --> Dst: %0 = load i32, ptr %arrayidx6, align 4
@@ -657,7 +655,7 @@ for.body: ; preds = %entry, %for.body
657655 %conv = trunc i64 %i.02 to i32
658656 %sub = sub nsw i64 18 , %i.02
659657 %mul = mul nsw i64 %i.02 , 3
660- %sub1 = add nsw i64 %mul , 18
658+ %sub1 = add nsw i64 %mul , - 18
661659 %arrayidx3 = getelementptr inbounds [100 x [100 x i32 ]], ptr %A , i64 %sub1 , i64 %sub , i64 %i.02
662660 store i32 %conv , ptr %arrayidx3 , align 4
663661 %arrayidx6 = getelementptr inbounds [100 x [100 x i32 ]], ptr %A , i64 %i.02 , i64 %i.02 , i64 %i.02
@@ -674,7 +672,7 @@ for.end: ; preds = %for.body
674672
675673
676674;; for (long int i = 0; i < 100; i++) {
677- ;; A[3*i + 18][22 - i][i] = i;
675+ ;; A[3*i - 18][22 - i][i] = i;
678676;; *B++ = A[i][i][i];
679677
680678define void @couple15 (ptr %A , ptr %B , i32 %n ) nounwind uwtable ssp {
@@ -701,7 +699,7 @@ for.body: ; preds = %entry, %for.body
701699 %conv = trunc i64 %i.02 to i32
702700 %sub = sub nsw i64 22 , %i.02
703701 %mul = mul nsw i64 %i.02 , 3
704- %sub1 = add nsw i64 %mul , 18
702+ %sub1 = add nsw i64 %mul , - 18
705703 %arrayidx3 = getelementptr inbounds [100 x [100 x i32 ]], ptr %A , i64 %sub1 , i64 %sub , i64 %i.02
706704 store i32 %conv , ptr %arrayidx3 , align 4
707705 %arrayidx6 = getelementptr inbounds [100 x [100 x i32 ]], ptr %A , i64 %i.02 , i64 %i.02 , i64 %i.02
0 commit comments