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
89
910;; for (long int i = 0; i < 50; i++) {
1011;; A[i][i] = i;
1112;; *B++ = A[i + 10][i + 9];
1213
13- define void @couple0 (ptr %A , ptr % B , i32 %n ) nounwind uwtable ssp {
14+ define void @couple0 (ptr %B , i32 %n ) nounwind uwtable ssp {
1415; CHECK-LABEL: 'couple0'
1516; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx1, align 4 --> Dst: store i32 %conv, ptr %arrayidx1, align 4
1617; CHECK-NEXT: da analyze - none!
@@ -26,6 +27,7 @@ define void @couple0(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
2627; CHECK-NEXT: da analyze - none!
2728;
2829entry:
30+ %A = getelementptr inbounds [100 x [100 x i32 ]], ptr @A.global , i32 0 , i32 0
2931 br label %for.body
3032
3133for.body: ; preds = %entry, %for.body
@@ -495,16 +497,15 @@ for.end: ; preds = %for.body
495497
496498
497499;; for (long int i = 0; i <= 15; i++) {
498- ;; A[3*i - 18][18 - i] = i;
500+ ;; A[3*i + 18][18 - i] = i;
499501;; *B++ = A[i][i];
500502
501- define void @couple11 (ptr %A , ptr % B , i32 %n ) nounwind uwtable ssp {
503+ define void @couple11 (ptr %B , i32 %n ) nounwind uwtable ssp {
502504; CHECK-LABEL: 'couple11'
503505; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx2, align 4 --> Dst: store i32 %conv, ptr %arrayidx2, align 4
504506; CHECK-NEXT: da analyze - none!
505507; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx2, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
506- ; CHECK-NEXT: da analyze - flow [0|<] splitable!
507- ; CHECK-NEXT: da analyze - split level = 1, iteration = 9!
508+ ; CHECK-NEXT: da analyze - none!
508509; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx2, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
509510; CHECK-NEXT: da analyze - confused!
510511; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx4, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
@@ -515,6 +516,7 @@ define void @couple11(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
515516; CHECK-NEXT: da analyze - none!
516517;
517518entry:
519+ %A = getelementptr inbounds [100 x [100 x i32 ]], ptr @A.global , i32 0 , i32 0
518520 br label %for.body
519521
520522for.body: ; preds = %entry, %for.body
@@ -523,7 +525,7 @@ for.body: ; preds = %entry, %for.body
523525 %conv = trunc i64 %i.02 to i32
524526 %sub = sub nsw i64 18 , %i.02
525527 %mul = mul nsw i64 %i.02 , 3
526- %sub1 = add nsw i64 %mul , - 18
528+ %sub1 = add nsw i64 %mul , 18
527529 %arrayidx2 = getelementptr inbounds [100 x i32 ], ptr %A , i64 %sub1 , i64 %sub
528530 store i32 %conv , ptr %arrayidx2 , align 4
529531 %arrayidx4 = getelementptr inbounds [100 x i32 ], ptr %A , i64 %i.02 , i64 %i.02
@@ -540,16 +542,15 @@ for.end: ; preds = %for.body
540542
541543
542544;; for (long int i = 0; i <= 12; i++) {
543- ;; A[3*i - 18][22 - i] = i;
545+ ;; A[3*i + 18][22 - i] = i;
544546;; *B++ = A[i][i];
545547
546- define void @couple12 (ptr %A , ptr % B , i32 %n ) nounwind uwtable ssp {
548+ define void @couple12 (ptr %B , i32 %n ) nounwind uwtable ssp {
547549; CHECK-LABEL: 'couple12'
548550; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx2, align 4 --> Dst: store i32 %conv, ptr %arrayidx2, align 4
549551; CHECK-NEXT: da analyze - none!
550552; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx2, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
551- ; CHECK-NEXT: da analyze - flow [<] splitable!
552- ; CHECK-NEXT: da analyze - split level = 1, iteration = 11!
553+ ; CHECK-NEXT: da analyze - none!
553554; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx2, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
554555; CHECK-NEXT: da analyze - confused!
555556; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx4, align 4 --> Dst: %0 = load i32, ptr %arrayidx4, align 4
@@ -560,6 +561,7 @@ define void @couple12(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
560561; CHECK-NEXT: da analyze - none!
561562;
562563entry:
564+ %A = getelementptr inbounds [100 x [100 x i32 ]], ptr @A.global , i32 0 , i32 0
563565 br label %for.body
564566
565567for.body: ; preds = %entry, %for.body
@@ -568,7 +570,7 @@ for.body: ; preds = %entry, %for.body
568570 %conv = trunc i64 %i.02 to i32
569571 %sub = sub nsw i64 22 , %i.02
570572 %mul = mul nsw i64 %i.02 , 3
571- %sub1 = add nsw i64 %mul , - 18
573+ %sub1 = add nsw i64 %mul , 18
572574 %arrayidx2 = getelementptr inbounds [100 x i32 ], ptr %A , i64 %sub1 , i64 %sub
573575 store i32 %conv , ptr %arrayidx2 , align 4
574576 %arrayidx4 = getelementptr inbounds [100 x i32 ], ptr %A , i64 %i.02 , i64 %i.02
@@ -585,7 +587,7 @@ for.end: ; preds = %for.body
585587
586588
587589;; for (long int i = 0; i < 12; i++) {
588- ;; A[3*i - 18][22 - i] = i;
590+ ;; A[3*i + 18][22 - i] = i;
589591;; *B++ = A[i][i];
590592
591593define void @couple13 (ptr %A , ptr %B , i32 %n ) nounwind uwtable ssp {
@@ -612,7 +614,7 @@ for.body: ; preds = %entry, %for.body
612614 %conv = trunc i64 %i.02 to i32
613615 %sub = sub nsw i64 22 , %i.02
614616 %mul = mul nsw i64 %i.02 , 3
615- %sub1 = add nsw i64 %mul , - 18
617+ %sub1 = add nsw i64 %mul , 18
616618 %arrayidx2 = getelementptr inbounds [100 x i32 ], ptr %A , i64 %sub1 , i64 %sub
617619 store i32 %conv , ptr %arrayidx2 , align 4
618620 %arrayidx4 = getelementptr inbounds [100 x i32 ], ptr %A , i64 %i.02 , i64 %i.02
@@ -628,15 +630,15 @@ for.end: ; preds = %for.body
628630}
629631
630632;; for (long int i = 0; i < 100; i++) {
631- ;; A[3*i - 18][18 - i][i] = i;
633+ ;; A[3*i + 18][18 - i][i] = i;
632634;; *B++ = A[i][i][i];
633635
634636define void @couple14 (ptr %A , ptr %B , i32 %n ) nounwind uwtable ssp {
635637; CHECK-LABEL: 'couple14'
636638; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx3, align 4 --> Dst: store i32 %conv, ptr %arrayidx3, align 4
637639; CHECK-NEXT: da analyze - none!
638640; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx3, align 4 --> Dst: %0 = load i32, ptr %arrayidx6, align 4
639- ; CHECK-NEXT: da analyze - flow [0|<] !
641+ ; CHECK-NEXT: da analyze - none !
640642; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx3, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
641643; CHECK-NEXT: da analyze - confused!
642644; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx6, align 4 --> Dst: %0 = load i32, ptr %arrayidx6, align 4
@@ -655,7 +657,7 @@ for.body: ; preds = %entry, %for.body
655657 %conv = trunc i64 %i.02 to i32
656658 %sub = sub nsw i64 18 , %i.02
657659 %mul = mul nsw i64 %i.02 , 3
658- %sub1 = add nsw i64 %mul , - 18
660+ %sub1 = add nsw i64 %mul , 18
659661 %arrayidx3 = getelementptr inbounds [100 x [100 x i32 ]], ptr %A , i64 %sub1 , i64 %sub , i64 %i.02
660662 store i32 %conv , ptr %arrayidx3 , align 4
661663 %arrayidx6 = getelementptr inbounds [100 x [100 x i32 ]], ptr %A , i64 %i.02 , i64 %i.02 , i64 %i.02
@@ -672,7 +674,7 @@ for.end: ; preds = %for.body
672674
673675
674676;; for (long int i = 0; i < 100; i++) {
675- ;; A[3*i - 18][22 - i][i] = i;
677+ ;; A[3*i + 18][22 - i][i] = i;
676678;; *B++ = A[i][i][i];
677679
678680define void @couple15 (ptr %A , ptr %B , i32 %n ) nounwind uwtable ssp {
@@ -699,7 +701,7 @@ for.body: ; preds = %entry, %for.body
699701 %conv = trunc i64 %i.02 to i32
700702 %sub = sub nsw i64 22 , %i.02
701703 %mul = mul nsw i64 %i.02 , 3
702- %sub1 = add nsw i64 %mul , - 18
704+ %sub1 = add nsw i64 %mul , 18
703705 %arrayidx3 = getelementptr inbounds [100 x [100 x i32 ]], ptr %A , i64 %sub1 , i64 %sub , i64 %i.02
704706 store i32 %conv , ptr %arrayidx3 , align 4
705707 %arrayidx6 = getelementptr inbounds [100 x [100 x i32 ]], ptr %A , i64 %i.02 , i64 %i.02 , i64 %i.02
0 commit comments