1; RUN: opt < %s -analyze -basicaa -da -da-delinearize=false | FileCheck %s 2; RUN: opt < %s -analyze -basicaa -da | FileCheck %s -check-prefix=DELIN 3 4target 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" 5target triple = "x86_64-apple-macosx10.6.0" 6 7 8;; for (long int i = 1; i <= 10; i++) 9;; for (long int j = 1; j <= 10; j++) { 10;; A[10*i + j] = 0; 11;; *B++ = A[10*i + j - 1]; 12 13define void @banerjee0(i64* %A, i64* %B, i64 %m, i64 %n) nounwind uwtable ssp { 14entry: 15 br label %for.cond1.preheader 16; CHECK: 'Dependence Analysis' for function 'banerjee0': 17; CHECK: da analyze - none! 18; CHECK: da analyze - flow [<= <>]! 19; CHECK: da analyze - confused! 20; CHECK: da analyze - none! 21; CHECK: da analyze - confused! 22; CHECK: da analyze - none! 23 24; DELIN: 'Dependence Analysis' for function 'banerjee0': 25; DELIN: da analyze - none! 26; DELIN: da analyze - flow [<= <>]! 27; DELIN: da analyze - confused! 28; DELIN: da analyze - none! 29; DELIN: da analyze - confused! 30; DELIN: da analyze - none! 31 32for.cond1.preheader: ; preds = %entry, %for.inc7 33 %B.addr.04 = phi i64* [ %B, %entry ], [ %scevgep, %for.inc7 ] 34 %i.03 = phi i64 [ 1, %entry ], [ %inc8, %for.inc7 ] 35 br label %for.body3 36 37for.body3: ; preds = %for.cond1.preheader, %for.body3 38 %j.02 = phi i64 [ 1, %for.cond1.preheader ], [ %inc, %for.body3 ] 39 %B.addr.11 = phi i64* [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ] 40 %mul = mul nsw i64 %i.03, 10 41 %add = add nsw i64 %mul, %j.02 42 %arrayidx = getelementptr inbounds i64, i64* %A, i64 %add 43 store i64 0, i64* %arrayidx, align 8 44 %mul4 = mul nsw i64 %i.03, 10 45 %add5 = add nsw i64 %mul4, %j.02 46 %sub = add nsw i64 %add5, -1 47 %arrayidx6 = getelementptr inbounds i64, i64* %A, i64 %sub 48 %0 = load i64, i64* %arrayidx6, align 8 49 %incdec.ptr = getelementptr inbounds i64, i64* %B.addr.11, i64 1 50 store i64 %0, i64* %B.addr.11, align 8 51 %inc = add nsw i64 %j.02, 1 52 %exitcond = icmp ne i64 %inc, 11 53 br i1 %exitcond, label %for.body3, label %for.inc7 54 55for.inc7: ; preds = %for.body3 56 %scevgep = getelementptr i64, i64* %B.addr.04, i64 10 57 %inc8 = add nsw i64 %i.03, 1 58 %exitcond5 = icmp ne i64 %inc8, 11 59 br i1 %exitcond5, label %for.cond1.preheader, label %for.end9 60 61for.end9: ; preds = %for.inc7 62 ret void 63} 64 65 66;; for (long int i = 1; i <= n; i++) 67;; for (long int j = 1; j <= m; j++) { 68;; A[10*i + j] = 0; 69;; *B++ = A[10*i + j - 1]; 70 71define void @banerjee1(i64* %A, i64* %B, i64 %m, i64 %n) nounwind uwtable ssp { 72entry: 73 %cmp4 = icmp sgt i64 %n, 0 74 br i1 %cmp4, label %for.cond1.preheader.preheader, label %for.end9 75 76; CHECK: 'Dependence Analysis' for function 'banerjee1': 77; CHECK: da analyze - output [* *]! 78; CHECK: da analyze - flow [* <>]! 79; CHECK: da analyze - confused! 80; CHECK: da analyze - input [* *]! 81; CHECK: da analyze - confused! 82; CHECK: da analyze - output [* *]! 83 84; DELIN: 'Dependence Analysis' for function 'banerjee1': 85; DELIN: da analyze - output [* *]! 86; DELIN: da analyze - flow [* <>]! 87; DELIN: da analyze - confused! 88; DELIN: da analyze - input [* *]! 89; DELIN: da analyze - confused! 90; DELIN: da analyze - output [* *]! 91 92for.cond1.preheader.preheader: ; preds = %entry 93 %0 = add i64 %n, 1 94 br label %for.cond1.preheader 95 96for.cond1.preheader: ; preds = %for.cond1.preheader.preheader, %for.inc7 97 %B.addr.06 = phi i64* [ %B.addr.1.lcssa, %for.inc7 ], [ %B, %for.cond1.preheader.preheader ] 98 %i.05 = phi i64 [ %inc8, %for.inc7 ], [ 1, %for.cond1.preheader.preheader ] 99 %1 = add i64 %m, 1 100 %cmp21 = icmp sgt i64 %m, 0 101 br i1 %cmp21, label %for.body3.preheader, label %for.inc7 102 103for.body3.preheader: ; preds = %for.cond1.preheader 104 br label %for.body3 105 106for.body3: ; preds = %for.body3.preheader, %for.body3 107 %j.03 = phi i64 [ %inc, %for.body3 ], [ 1, %for.body3.preheader ] 108 %B.addr.12 = phi i64* [ %incdec.ptr, %for.body3 ], [ %B.addr.06, %for.body3.preheader ] 109 %mul = mul nsw i64 %i.05, 10 110 %add = add nsw i64 %mul, %j.03 111 %arrayidx = getelementptr inbounds i64, i64* %A, i64 %add 112 store i64 0, i64* %arrayidx, align 8 113 %mul4 = mul nsw i64 %i.05, 10 114 %add5 = add nsw i64 %mul4, %j.03 115 %sub = add nsw i64 %add5, -1 116 %arrayidx6 = getelementptr inbounds i64, i64* %A, i64 %sub 117 %2 = load i64, i64* %arrayidx6, align 8 118 %incdec.ptr = getelementptr inbounds i64, i64* %B.addr.12, i64 1 119 store i64 %2, i64* %B.addr.12, align 8 120 %inc = add nsw i64 %j.03, 1 121 %exitcond = icmp eq i64 %inc, %1 122 br i1 %exitcond, label %for.inc7.loopexit, label %for.body3 123 124for.inc7.loopexit: ; preds = %for.body3 125 %scevgep = getelementptr i64, i64* %B.addr.06, i64 %m 126 br label %for.inc7 127 128for.inc7: ; preds = %for.inc7.loopexit, %for.cond1.preheader 129 %B.addr.1.lcssa = phi i64* [ %B.addr.06, %for.cond1.preheader ], [ %scevgep, %for.inc7.loopexit ] 130 %inc8 = add nsw i64 %i.05, 1 131 %exitcond7 = icmp eq i64 %inc8, %0 132 br i1 %exitcond7, label %for.end9.loopexit, label %for.cond1.preheader 133 134for.end9.loopexit: ; preds = %for.inc7 135 br label %for.end9 136 137for.end9: ; preds = %for.end9.loopexit, %entry 138 ret void 139} 140 141 142;; for (long int i = 0; i < 10; i++) 143;; for (long int j = 0; j < 10; j++) { 144;; A[10*i + j] = 0; 145;; *B++ = A[10*i + j + 100]; 146 147define void @banerjee2(i64* %A, i64* %B, i64 %m, i64 %n) nounwind uwtable ssp { 148entry: 149 br label %for.cond1.preheader 150 151; CHECK: 'Dependence Analysis' for function 'banerjee2': 152; CHECK: da analyze - none! 153; CHECK: da analyze - none! 154; CHECK: da analyze - confused! 155; CHECK: da analyze - none! 156; CHECK: da analyze - confused! 157; CHECK: da analyze - none! 158 159; DELIN: 'Dependence Analysis' for function 'banerjee2': 160; DELIN: da analyze - none! 161; DELIN: da analyze - none! 162; DELIN: da analyze - confused! 163; DELIN: da analyze - none! 164; DELIN: da analyze - confused! 165; DELIN: da analyze - none! 166 167for.cond1.preheader: ; preds = %entry, %for.inc8 168 %B.addr.04 = phi i64* [ %B, %entry ], [ %scevgep, %for.inc8 ] 169 %i.03 = phi i64 [ 0, %entry ], [ %inc9, %for.inc8 ] 170 br label %for.body3 171 172for.body3: ; preds = %for.cond1.preheader, %for.body3 173 %j.02 = phi i64 [ 0, %for.cond1.preheader ], [ %inc, %for.body3 ] 174 %B.addr.11 = phi i64* [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ] 175 %mul = mul nsw i64 %i.03, 10 176 %add = add nsw i64 %mul, %j.02 177 %arrayidx = getelementptr inbounds i64, i64* %A, i64 %add 178 store i64 0, i64* %arrayidx, align 8 179 %mul4 = mul nsw i64 %i.03, 10 180 %add5 = add nsw i64 %mul4, %j.02 181 %add6 = add nsw i64 %add5, 100 182 %arrayidx7 = getelementptr inbounds i64, i64* %A, i64 %add6 183 %0 = load i64, i64* %arrayidx7, align 8 184 %incdec.ptr = getelementptr inbounds i64, i64* %B.addr.11, i64 1 185 store i64 %0, i64* %B.addr.11, align 8 186 %inc = add nsw i64 %j.02, 1 187 %exitcond = icmp ne i64 %inc, 10 188 br i1 %exitcond, label %for.body3, label %for.inc8 189 190for.inc8: ; preds = %for.body3 191 %scevgep = getelementptr i64, i64* %B.addr.04, i64 10 192 %inc9 = add nsw i64 %i.03, 1 193 %exitcond5 = icmp ne i64 %inc9, 10 194 br i1 %exitcond5, label %for.cond1.preheader, label %for.end10 195 196for.end10: ; preds = %for.inc8 197 ret void 198} 199 200 201;; for (long int i = 0; i < 10; i++) 202;; for (long int j = 0; j < 10; j++) { 203;; A[10*i + j] = 0; 204;; *B++ = A[10*i + j + 99]; 205 206define void @banerjee3(i64* %A, i64* %B, i64 %m, i64 %n) nounwind uwtable ssp { 207entry: 208 br label %for.cond1.preheader 209 210; CHECK: 'Dependence Analysis' for function 'banerjee3': 211; CHECK: da analyze - none! 212; CHECK: da analyze - flow [> >]! 213; CHECK: da analyze - confused! 214; CHECK: da analyze - none! 215; CHECK: da analyze - confused! 216; CHECK: da analyze - none! 217 218; DELIN: 'Dependence Analysis' for function 'banerjee3': 219; DELIN: da analyze - none! 220; DELIN: da analyze - flow [> >]! 221; DELIN: da analyze - confused! 222; DELIN: da analyze - none! 223; DELIN: da analyze - confused! 224; DELIN: da analyze - none! 225 226for.cond1.preheader: ; preds = %entry, %for.inc8 227 %B.addr.04 = phi i64* [ %B, %entry ], [ %scevgep, %for.inc8 ] 228 %i.03 = phi i64 [ 0, %entry ], [ %inc9, %for.inc8 ] 229 br label %for.body3 230 231for.body3: ; preds = %for.cond1.preheader, %for.body3 232 %j.02 = phi i64 [ 0, %for.cond1.preheader ], [ %inc, %for.body3 ] 233 %B.addr.11 = phi i64* [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ] 234 %mul = mul nsw i64 %i.03, 10 235 %add = add nsw i64 %mul, %j.02 236 %arrayidx = getelementptr inbounds i64, i64* %A, i64 %add 237 store i64 0, i64* %arrayidx, align 8 238 %mul4 = mul nsw i64 %i.03, 10 239 %add5 = add nsw i64 %mul4, %j.02 240 %add6 = add nsw i64 %add5, 99 241 %arrayidx7 = getelementptr inbounds i64, i64* %A, i64 %add6 242 %0 = load i64, i64* %arrayidx7, align 8 243 %incdec.ptr = getelementptr inbounds i64, i64* %B.addr.11, i64 1 244 store i64 %0, i64* %B.addr.11, align 8 245 %inc = add nsw i64 %j.02, 1 246 %exitcond = icmp ne i64 %inc, 10 247 br i1 %exitcond, label %for.body3, label %for.inc8 248 249for.inc8: ; preds = %for.body3 250 %scevgep = getelementptr i64, i64* %B.addr.04, i64 10 251 %inc9 = add nsw i64 %i.03, 1 252 %exitcond5 = icmp ne i64 %inc9, 10 253 br i1 %exitcond5, label %for.cond1.preheader, label %for.end10 254 255for.end10: ; preds = %for.inc8 256 ret void 257} 258 259 260;; for (long int i = 0; i < 10; i++) 261;; for (long int j = 0; j < 10; j++) { 262;; A[10*i + j] = 0; 263;; *B++ = A[10*i + j - 100]; 264 265define void @banerjee4(i64* %A, i64* %B, i64 %m, i64 %n) nounwind uwtable ssp { 266entry: 267 br label %for.cond1.preheader 268 269; CHECK: 'Dependence Analysis' for function 'banerjee4': 270; CHECK: da analyze - none! 271; CHECK: da analyze - none! 272; CHECK: da analyze - confused! 273; CHECK: da analyze - none! 274; CHECK: da analyze - confused! 275; CHECK: da analyze - none! 276 277; DELIN: 'Dependence Analysis' for function 'banerjee4': 278; DELIN: da analyze - none! 279; DELIN: da analyze - none! 280; DELIN: da analyze - confused! 281; DELIN: da analyze - none! 282; DELIN: da analyze - confused! 283; DELIN: da analyze - none! 284 285for.cond1.preheader: ; preds = %entry, %for.inc7 286 %B.addr.04 = phi i64* [ %B, %entry ], [ %scevgep, %for.inc7 ] 287 %i.03 = phi i64 [ 0, %entry ], [ %inc8, %for.inc7 ] 288 br label %for.body3 289 290for.body3: ; preds = %for.cond1.preheader, %for.body3 291 %j.02 = phi i64 [ 0, %for.cond1.preheader ], [ %inc, %for.body3 ] 292 %B.addr.11 = phi i64* [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ] 293 %mul = mul nsw i64 %i.03, 10 294 %add = add nsw i64 %mul, %j.02 295 %arrayidx = getelementptr inbounds i64, i64* %A, i64 %add 296 store i64 0, i64* %arrayidx, align 8 297 %mul4 = mul nsw i64 %i.03, 10 298 %add5 = add nsw i64 %mul4, %j.02 299 %sub = add nsw i64 %add5, -100 300 %arrayidx6 = getelementptr inbounds i64, i64* %A, i64 %sub 301 %0 = load i64, i64* %arrayidx6, align 8 302 %incdec.ptr = getelementptr inbounds i64, i64* %B.addr.11, i64 1 303 store i64 %0, i64* %B.addr.11, align 8 304 %inc = add nsw i64 %j.02, 1 305 %exitcond = icmp ne i64 %inc, 10 306 br i1 %exitcond, label %for.body3, label %for.inc7 307 308for.inc7: ; preds = %for.body3 309 %scevgep = getelementptr i64, i64* %B.addr.04, i64 10 310 %inc8 = add nsw i64 %i.03, 1 311 %exitcond5 = icmp ne i64 %inc8, 10 312 br i1 %exitcond5, label %for.cond1.preheader, label %for.end9 313 314for.end9: ; preds = %for.inc7 315 ret void 316} 317 318 319;; for (long int i = 0; i < 10; i++) 320;; for (long int j = 0; j < 10; j++) { 321;; A[10*i + j] = 0; 322;; *B++ = A[10*i + j - 99]; 323 324define void @banerjee5(i64* %A, i64* %B, i64 %m, i64 %n) nounwind uwtable ssp { 325entry: 326 br label %for.cond1.preheader 327 328; CHECK: 'Dependence Analysis' for function 'banerjee5': 329; CHECK: da analyze - none! 330; CHECK: da analyze - flow [< <]! 331; CHECK: da analyze - confused! 332; CHECK: da analyze - none! 333; CHECK: da analyze - confused! 334; CHECK: da analyze - none! 335 336; DELIN: 'Dependence Analysis' for function 'banerjee5': 337; DELIN: da analyze - none! 338; DELIN: da analyze - flow [< <]! 339; DELIN: da analyze - confused! 340; DELIN: da analyze - none! 341; DELIN: da analyze - confused! 342; DELIN: da analyze - none! 343 344for.cond1.preheader: ; preds = %entry, %for.inc7 345 %B.addr.04 = phi i64* [ %B, %entry ], [ %scevgep, %for.inc7 ] 346 %i.03 = phi i64 [ 0, %entry ], [ %inc8, %for.inc7 ] 347 br label %for.body3 348 349for.body3: ; preds = %for.cond1.preheader, %for.body3 350 %j.02 = phi i64 [ 0, %for.cond1.preheader ], [ %inc, %for.body3 ] 351 %B.addr.11 = phi i64* [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ] 352 %mul = mul nsw i64 %i.03, 10 353 %add = add nsw i64 %mul, %j.02 354 %arrayidx = getelementptr inbounds i64, i64* %A, i64 %add 355 store i64 0, i64* %arrayidx, align 8 356 %mul4 = mul nsw i64 %i.03, 10 357 %add5 = add nsw i64 %mul4, %j.02 358 %sub = add nsw i64 %add5, -99 359 %arrayidx6 = getelementptr inbounds i64, i64* %A, i64 %sub 360 %0 = load i64, i64* %arrayidx6, align 8 361 %incdec.ptr = getelementptr inbounds i64, i64* %B.addr.11, i64 1 362 store i64 %0, i64* %B.addr.11, align 8 363 %inc = add nsw i64 %j.02, 1 364 %exitcond = icmp ne i64 %inc, 10 365 br i1 %exitcond, label %for.body3, label %for.inc7 366 367for.inc7: ; preds = %for.body3 368 %scevgep = getelementptr i64, i64* %B.addr.04, i64 10 369 %inc8 = add nsw i64 %i.03, 1 370 %exitcond5 = icmp ne i64 %inc8, 10 371 br i1 %exitcond5, label %for.cond1.preheader, label %for.end9 372 373for.end9: ; preds = %for.inc7 374 ret void 375} 376 377 378;; for (long int i = 0; i < 10; i++) 379;; for (long int j = 0; j < 10; j++) { 380;; A[10*i + j] = 0; 381;; *B++ = A[10*i + j + 9]; 382 383define void @banerjee6(i64* %A, i64* %B, i64 %m, i64 %n) nounwind uwtable ssp { 384entry: 385 br label %for.cond1.preheader 386 387; CHECK: 'Dependence Analysis' for function 'banerjee6': 388; CHECK: da analyze - none! 389; CHECK: da analyze - flow [=> <>]! 390; CHECK: da analyze - confused! 391; CHECK: da analyze - none! 392; CHECK: da analyze - confused! 393; CHECK: da analyze - none! 394 395; DELIN: 'Dependence Analysis' for function 'banerjee6': 396; DELIN: da analyze - none! 397; DELIN: da analyze - flow [=> <>]! 398; DELIN: da analyze - confused! 399; DELIN: da analyze - none! 400; DELIN: da analyze - confused! 401; DELIN: da analyze - none! 402 403for.cond1.preheader: ; preds = %entry, %for.inc8 404 %B.addr.04 = phi i64* [ %B, %entry ], [ %scevgep, %for.inc8 ] 405 %i.03 = phi i64 [ 0, %entry ], [ %inc9, %for.inc8 ] 406 br label %for.body3 407 408for.body3: ; preds = %for.cond1.preheader, %for.body3 409 %j.02 = phi i64 [ 0, %for.cond1.preheader ], [ %inc, %for.body3 ] 410 %B.addr.11 = phi i64* [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ] 411 %mul = mul nsw i64 %i.03, 10 412 %add = add nsw i64 %mul, %j.02 413 %arrayidx = getelementptr inbounds i64, i64* %A, i64 %add 414 store i64 0, i64* %arrayidx, align 8 415 %mul4 = mul nsw i64 %i.03, 10 416 %add5 = add nsw i64 %mul4, %j.02 417 %add6 = add nsw i64 %add5, 9 418 %arrayidx7 = getelementptr inbounds i64, i64* %A, i64 %add6 419 %0 = load i64, i64* %arrayidx7, align 8 420 %incdec.ptr = getelementptr inbounds i64, i64* %B.addr.11, i64 1 421 store i64 %0, i64* %B.addr.11, align 8 422 %inc = add nsw i64 %j.02, 1 423 %exitcond = icmp ne i64 %inc, 10 424 br i1 %exitcond, label %for.body3, label %for.inc8 425 426for.inc8: ; preds = %for.body3 427 %scevgep = getelementptr i64, i64* %B.addr.04, i64 10 428 %inc9 = add nsw i64 %i.03, 1 429 %exitcond5 = icmp ne i64 %inc9, 10 430 br i1 %exitcond5, label %for.cond1.preheader, label %for.end10 431 432for.end10: ; preds = %for.inc8 433 ret void 434} 435 436 437;; for (long int i = 0; i < 10; i++) 438;; for (long int j = 0; j < 10; j++) { 439;; A[10*i + j] = 0; 440;; *B++ = A[10*i + j + 10]; 441 442define void @banerjee7(i64* %A, i64* %B, i64 %m, i64 %n) nounwind uwtable ssp { 443entry: 444 br label %for.cond1.preheader 445 446; CHECK: 'Dependence Analysis' for function 'banerjee7': 447; CHECK: da analyze - none! 448; CHECK: da analyze - flow [> <=]! 449; CHECK: da analyze - confused! 450; CHECK: da analyze - none! 451; CHECK: da analyze - confused! 452; CHECK: da analyze - none! 453 454; DELIN: 'Dependence Analysis' for function 'banerjee7': 455; DELIN: da analyze - none! 456; DELIN: da analyze - flow [> <=]! 457; DELIN: da analyze - confused! 458; DELIN: da analyze - none! 459; DELIN: da analyze - confused! 460; DELIN: da analyze - none! 461 462for.cond1.preheader: ; preds = %entry, %for.inc8 463 %B.addr.04 = phi i64* [ %B, %entry ], [ %scevgep, %for.inc8 ] 464 %i.03 = phi i64 [ 0, %entry ], [ %inc9, %for.inc8 ] 465 br label %for.body3 466 467for.body3: ; preds = %for.cond1.preheader, %for.body3 468 %j.02 = phi i64 [ 0, %for.cond1.preheader ], [ %inc, %for.body3 ] 469 %B.addr.11 = phi i64* [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ] 470 %mul = mul nsw i64 %i.03, 10 471 %add = add nsw i64 %mul, %j.02 472 %arrayidx = getelementptr inbounds i64, i64* %A, i64 %add 473 store i64 0, i64* %arrayidx, align 8 474 %mul4 = mul nsw i64 %i.03, 10 475 %add5 = add nsw i64 %mul4, %j.02 476 %add6 = add nsw i64 %add5, 10 477 %arrayidx7 = getelementptr inbounds i64, i64* %A, i64 %add6 478 %0 = load i64, i64* %arrayidx7, align 8 479 %incdec.ptr = getelementptr inbounds i64, i64* %B.addr.11, i64 1 480 store i64 %0, i64* %B.addr.11, align 8 481 %inc = add nsw i64 %j.02, 1 482 %exitcond = icmp ne i64 %inc, 10 483 br i1 %exitcond, label %for.body3, label %for.inc8 484 485for.inc8: ; preds = %for.body3 486 %scevgep = getelementptr i64, i64* %B.addr.04, i64 10 487 %inc9 = add nsw i64 %i.03, 1 488 %exitcond5 = icmp ne i64 %inc9, 10 489 br i1 %exitcond5, label %for.cond1.preheader, label %for.end10 490 491for.end10: ; preds = %for.inc8 492 ret void 493} 494 495 496;; for (long int i = 0; i < 10; i++) 497;; for (long int j = 0; j < 10; j++) { 498;; A[10*i + j] = 0; 499;; *B++ = A[10*i + j + 11]; 500 501define void @banerjee8(i64* %A, i64* %B, i64 %m, i64 %n) nounwind uwtable ssp { 502entry: 503 br label %for.cond1.preheader 504 505; CHECK: 'Dependence Analysis' for function 'banerjee8': 506; CHECK: da analyze - none! 507; CHECK: da analyze - flow [> <>]! 508; CHECK: da analyze - confused! 509; CHECK: da analyze - none! 510; CHECK: da analyze - confused! 511; CHECK: da analyze - none! 512 513; DELIN: 'Dependence Analysis' for function 'banerjee8': 514; DELIN: da analyze - none! 515; DELIN: da analyze - flow [> <>]! 516; DELIN: da analyze - confused! 517; DELIN: da analyze - none! 518; DELIN: da analyze - confused! 519; DELIN: da analyze - none! 520 521for.cond1.preheader: ; preds = %entry, %for.inc8 522 %B.addr.04 = phi i64* [ %B, %entry ], [ %scevgep, %for.inc8 ] 523 %i.03 = phi i64 [ 0, %entry ], [ %inc9, %for.inc8 ] 524 br label %for.body3 525 526for.body3: ; preds = %for.cond1.preheader, %for.body3 527 %j.02 = phi i64 [ 0, %for.cond1.preheader ], [ %inc, %for.body3 ] 528 %B.addr.11 = phi i64* [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ] 529 %mul = mul nsw i64 %i.03, 10 530 %add = add nsw i64 %mul, %j.02 531 %arrayidx = getelementptr inbounds i64, i64* %A, i64 %add 532 store i64 0, i64* %arrayidx, align 8 533 %mul4 = mul nsw i64 %i.03, 10 534 %add5 = add nsw i64 %mul4, %j.02 535 %add6 = add nsw i64 %add5, 11 536 %arrayidx7 = getelementptr inbounds i64, i64* %A, i64 %add6 537 %0 = load i64, i64* %arrayidx7, align 8 538 %incdec.ptr = getelementptr inbounds i64, i64* %B.addr.11, i64 1 539 store i64 %0, i64* %B.addr.11, align 8 540 %inc = add nsw i64 %j.02, 1 541 %exitcond = icmp ne i64 %inc, 10 542 br i1 %exitcond, label %for.body3, label %for.inc8 543 544for.inc8: ; preds = %for.body3 545 %scevgep = getelementptr i64, i64* %B.addr.04, i64 10 546 %inc9 = add nsw i64 %i.03, 1 547 %exitcond5 = icmp ne i64 %inc9, 10 548 br i1 %exitcond5, label %for.cond1.preheader, label %for.end10 549 550for.end10: ; preds = %for.inc8 551 ret void 552} 553 554 555;; for (long int i = 0; i < 20; i++) 556;; for (long int j = 0; j < 20; j++) { 557;; A[30*i + 500*j] = 0; 558;; *B++ = A[i - 500*j + 11]; 559 560define void @banerjee9(i64* %A, i64* %B, i64 %m, i64 %n) nounwind uwtable ssp { 561entry: 562 br label %for.cond1.preheader 563 564; CHECK: 'Dependence Analysis' for function 'banerjee9': 565; CHECK: da analyze - output [* *]! 566; CHECK: da analyze - flow [<= =|<]! 567; CHECK: da analyze - confused! 568; CHECK: da analyze - none! 569; CHECK: da analyze - confused! 570; CHECK: da analyze - none! 571 572; DELIN: 'Dependence Analysis' for function 'banerjee9': 573; DELIN: da analyze - output [* *]! 574; DELIN: da analyze - flow [<= =|<]! 575; DELIN: da analyze - confused! 576; DELIN: da analyze - none! 577; DELIN: da analyze - confused! 578; DELIN: da analyze - none! 579 580for.cond1.preheader: ; preds = %entry, %for.inc8 581 %B.addr.04 = phi i64* [ %B, %entry ], [ %scevgep, %for.inc8 ] 582 %i.03 = phi i64 [ 0, %entry ], [ %inc9, %for.inc8 ] 583 br label %for.body3 584 585for.body3: ; preds = %for.cond1.preheader, %for.body3 586 %j.02 = phi i64 [ 0, %for.cond1.preheader ], [ %inc, %for.body3 ] 587 %B.addr.11 = phi i64* [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ] 588 %mul = mul nsw i64 %i.03, 30 589 %mul4 = mul nsw i64 %j.02, 500 590 %add = add nsw i64 %mul, %mul4 591 %arrayidx = getelementptr inbounds i64, i64* %A, i64 %add 592 store i64 0, i64* %arrayidx, align 8 593 %0 = mul i64 %j.02, -500 594 %sub = add i64 %i.03, %0 595 %add6 = add nsw i64 %sub, 11 596 %arrayidx7 = getelementptr inbounds i64, i64* %A, i64 %add6 597 %1 = load i64, i64* %arrayidx7, align 8 598 %incdec.ptr = getelementptr inbounds i64, i64* %B.addr.11, i64 1 599 store i64 %1, i64* %B.addr.11, align 8 600 %inc = add nsw i64 %j.02, 1 601 %exitcond = icmp ne i64 %inc, 20 602 br i1 %exitcond, label %for.body3, label %for.inc8 603 604for.inc8: ; preds = %for.body3 605 %scevgep = getelementptr i64, i64* %B.addr.04, i64 20 606 %inc9 = add nsw i64 %i.03, 1 607 %exitcond5 = icmp ne i64 %inc9, 20 608 br i1 %exitcond5, label %for.cond1.preheader, label %for.end10 609 610for.end10: ; preds = %for.inc8 611 ret void 612} 613 614 615;; for (long int i = 0; i < 20; i++) 616;; for (long int j = 0; j < 20; j++) { 617;; A[i + 500*j] = 0; 618;; *B++ = A[i - 500*j + 11]; 619 620define void @banerjee10(i64* %A, i64* %B, i64 %m, i64 %n) nounwind uwtable ssp { 621entry: 622 br label %for.cond1.preheader 623 624; CHECK: 'Dependence Analysis' for function 'banerjee10': 625; CHECK: da analyze - none! 626; CHECK: da analyze - flow [<> =]! 627; CHECK: da analyze - confused! 628; CHECK: da analyze - none! 629; CHECK: da analyze - confused! 630; CHECK: da analyze - none! 631 632; DELIN: 'Dependence Analysis' for function 'banerjee10': 633; DELIN: da analyze - none! 634; DELIN: da analyze - flow [<> =]! 635; DELIN: da analyze - confused! 636; DELIN: da analyze - none! 637; DELIN: da analyze - confused! 638; DELIN: da analyze - none! 639 640for.cond1.preheader: ; preds = %entry, %for.inc7 641 %B.addr.04 = phi i64* [ %B, %entry ], [ %scevgep, %for.inc7 ] 642 %i.03 = phi i64 [ 0, %entry ], [ %inc8, %for.inc7 ] 643 br label %for.body3 644 645for.body3: ; preds = %for.cond1.preheader, %for.body3 646 %j.02 = phi i64 [ 0, %for.cond1.preheader ], [ %inc, %for.body3 ] 647 %B.addr.11 = phi i64* [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ] 648 %mul = mul nsw i64 %j.02, 500 649 %add = add nsw i64 %i.03, %mul 650 %arrayidx = getelementptr inbounds i64, i64* %A, i64 %add 651 store i64 0, i64* %arrayidx, align 8 652 %0 = mul i64 %j.02, -500 653 %sub = add i64 %i.03, %0 654 %add5 = add nsw i64 %sub, 11 655 %arrayidx6 = getelementptr inbounds i64, i64* %A, i64 %add5 656 %1 = load i64, i64* %arrayidx6, align 8 657 %incdec.ptr = getelementptr inbounds i64, i64* %B.addr.11, i64 1 658 store i64 %1, i64* %B.addr.11, align 8 659 %inc = add nsw i64 %j.02, 1 660 %exitcond = icmp ne i64 %inc, 20 661 br i1 %exitcond, label %for.body3, label %for.inc7 662 663for.inc7: ; preds = %for.body3 664 %scevgep = getelementptr i64, i64* %B.addr.04, i64 20 665 %inc8 = add nsw i64 %i.03, 1 666 %exitcond5 = icmp ne i64 %inc8, 20 667 br i1 %exitcond5, label %for.cond1.preheader, label %for.end9 668 669for.end9: ; preds = %for.inc7 670 ret void 671} 672 673 674;; for (long int i = 0; i < 20; i++) 675;; for (long int j = 0; j < 20; j++) { 676;; A[300*i + j] = 0; 677;; *B++ = A[250*i - j + 11]; 678 679define void @banerjee11(i64* %A, i64* %B, i64 %m, i64 %n) nounwind uwtable ssp { 680entry: 681 br label %for.cond1.preheader 682 683; CHECK: 'Dependence Analysis' for function 'banerjee11': 684; CHECK: da analyze - none! 685; CHECK: da analyze - flow [<= <>]! 686; CHECK: da analyze - confused! 687; CHECK: da analyze - none! 688; CHECK: da analyze - confused! 689; CHECK: da analyze - none! 690 691; DELIN: 'Dependence Analysis' for function 'banerjee11': 692; DELIN: da analyze - none! 693; DELIN: da analyze - flow [<= <>]! 694; DELIN: da analyze - confused! 695; DELIN: da analyze - none! 696; DELIN: da analyze - confused! 697; DELIN: da analyze - none! 698 699for.cond1.preheader: ; preds = %entry, %for.inc7 700 %B.addr.04 = phi i64* [ %B, %entry ], [ %scevgep, %for.inc7 ] 701 %i.03 = phi i64 [ 0, %entry ], [ %inc8, %for.inc7 ] 702 br label %for.body3 703 704for.body3: ; preds = %for.cond1.preheader, %for.body3 705 %j.02 = phi i64 [ 0, %for.cond1.preheader ], [ %inc, %for.body3 ] 706 %B.addr.11 = phi i64* [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ] 707 %mul = mul nsw i64 %i.03, 300 708 %add = add nsw i64 %mul, %j.02 709 %arrayidx = getelementptr inbounds i64, i64* %A, i64 %add 710 store i64 0, i64* %arrayidx, align 8 711 %mul4 = mul nsw i64 %i.03, 250 712 %sub = sub nsw i64 %mul4, %j.02 713 %add5 = add nsw i64 %sub, 11 714 %arrayidx6 = getelementptr inbounds i64, i64* %A, i64 %add5 715 %0 = load i64, i64* %arrayidx6, align 8 716 %incdec.ptr = getelementptr inbounds i64, i64* %B.addr.11, i64 1 717 store i64 %0, i64* %B.addr.11, align 8 718 %inc = add nsw i64 %j.02, 1 719 %exitcond = icmp ne i64 %inc, 20 720 br i1 %exitcond, label %for.body3, label %for.inc7 721 722for.inc7: ; preds = %for.body3 723 %scevgep = getelementptr i64, i64* %B.addr.04, i64 20 724 %inc8 = add nsw i64 %i.03, 1 725 %exitcond5 = icmp ne i64 %inc8, 20 726 br i1 %exitcond5, label %for.cond1.preheader, label %for.end9 727 728for.end9: ; preds = %for.inc7 729 ret void 730} 731 732 733;; for (long int i = 0; i < 20; i++) 734;; for (long int j = 0; j < 20; j++) { 735;; A[100*i + j] = 0; 736;; *B++ = A[100*i - j + 11]; 737 738define void @banerjee12(i64* %A, i64* %B, i64 %m, i64 %n) nounwind uwtable ssp { 739entry: 740 br label %for.cond1.preheader 741 742; CHECK: 'Dependence Analysis' for function 'banerjee12': 743; CHECK: da analyze - none! 744; CHECK: da analyze - flow [= <>]! 745; CHECK: da analyze - confused! 746; CHECK: da analyze - none! 747; CHECK: da analyze - confused! 748; CHECK: da analyze - none! 749 750; DELIN: 'Dependence Analysis' for function 'banerjee12': 751; DELIN: da analyze - none! 752; DELIN: da analyze - flow [= <>]! 753; DELIN: da analyze - confused! 754; DELIN: da analyze - none! 755; DELIN: da analyze - confused! 756; DELIN: da analyze - none! 757 758for.cond1.preheader: ; preds = %entry, %for.inc7 759 %B.addr.04 = phi i64* [ %B, %entry ], [ %scevgep, %for.inc7 ] 760 %i.03 = phi i64 [ 0, %entry ], [ %inc8, %for.inc7 ] 761 br label %for.body3 762 763for.body3: ; preds = %for.cond1.preheader, %for.body3 764 %j.02 = phi i64 [ 0, %for.cond1.preheader ], [ %inc, %for.body3 ] 765 %B.addr.11 = phi i64* [ %B.addr.04, %for.cond1.preheader ], [ %incdec.ptr, %for.body3 ] 766 %mul = mul nsw i64 %i.03, 100 767 %add = add nsw i64 %mul, %j.02 768 %arrayidx = getelementptr inbounds i64, i64* %A, i64 %add 769 store i64 0, i64* %arrayidx, align 8 770 %mul4 = mul nsw i64 %i.03, 100 771 %sub = sub nsw i64 %mul4, %j.02 772 %add5 = add nsw i64 %sub, 11 773 %arrayidx6 = getelementptr inbounds i64, i64* %A, i64 %add5 774 %0 = load i64, i64* %arrayidx6, align 8 775 %incdec.ptr = getelementptr inbounds i64, i64* %B.addr.11, i64 1 776 store i64 %0, i64* %B.addr.11, align 8 777 %inc = add nsw i64 %j.02, 1 778 %exitcond = icmp ne i64 %inc, 20 779 br i1 %exitcond, label %for.body3, label %for.inc7 780 781for.inc7: ; preds = %for.body3 782 %scevgep = getelementptr i64, i64* %B.addr.04, i64 20 783 %inc8 = add nsw i64 %i.03, 1 784 %exitcond5 = icmp ne i64 %inc8, 20 785 br i1 %exitcond5, label %for.cond1.preheader, label %for.end9 786 787for.end9: ; preds = %for.inc7 788 ret void 789} 790