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