| Tobias Grosser | ad61c17 | 2016-08-15 13:58:16 +0000 | [diff] [blame] | 1 | ; RUN: opt %loadPolly -polly-scops \ |
| Tobias Grosser | 75b9c7d | 2016-08-15 13:58:04 +0000 | [diff] [blame] | 2 | ; RUN: -polly-invariant-load-hoisting=true \ |
| 3 | ; RUN: -analyze -S < %s | FileCheck %s |
| Johannes Doerfert | b47cbe1 | 2016-04-08 10:27:40 +0000 | [diff] [blame] | 4 | ; |
| 5 | ; CHECK: Invariant Accesses: { |
| 6 | ; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0] |
| 7 | ; CHECK-NEXT: { Stmt_land_lhs_true563[] -> MemRef_0[809] }; |
| 8 | ; CHECK-NEXT: Execution Context: { : } |
| 9 | ; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0] |
| 10 | ; CHECK-NEXT: { Stmt_if_then570[] -> MemRef_fs[5] }; |
| 11 | ; CHECK-NEXT: Execution Context: { : } |
| 12 | ; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0] |
| 13 | ; CHECK-NEXT: { Stmt_if_then570[] -> MemRef_fs[7] }; |
| 14 | ; CHECK-NEXT: Execution Context: { : } |
| 15 | ; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0] |
| 16 | ; CHECK-NEXT: { Stmt_if_then570[] -> MemRef_8[813] }; |
| 17 | ; CHECK-NEXT: Execution Context: { : } |
| 18 | ; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0] |
| 19 | ; CHECK-NEXT: { Stmt_if_then570[] -> MemRef_3[813] }; |
| 20 | ; CHECK-NEXT: Execution Context: { : } |
| 21 | ; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0] |
| 22 | ; CHECK-NEXT: { Stmt_if_then570[] -> MemRef_5[813] }; |
| 23 | ; CHECK-NEXT: Execution Context: { : } |
| 24 | ; CHECK-NEXT: ReadAccess := [Reduction Type: NONE] [Scalar: 0] |
| 25 | ; CHECK-NEXT: { Stmt_if_then570[] -> MemRef_3[812] }; |
| 26 | ; CHECK-NEXT: Execution Context: { : } |
| 27 | ; CHECK-NEXT: } |
| 28 | ; |
| 29 | ; ModuleID = 'bugpoint-reduced-simplified.bc' |
| 30 | target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" |
| 31 | |
| 32 | %struct.frame_store = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, %struct.picture*, %struct.picture*, %struct.picture* } |
| 33 | %struct.picture = type { i32, i32, i32, i32, i32, i32, [6 x [33 x i64]], [6 x [33 x i64]], [6 x [33 x i64]], [6 x [33 x i64]], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i16**, i16*, i16*, i16**, i16**, i16***, i8*, i16***, i64***, i64***, i16****, i8**, i8**, %struct.picture*, %struct.picture*, %struct.picture*, i32, i32, i32, i32, i32, i32, i32 } |
| 34 | |
| 35 | ; Function Attrs: nounwind uwtable |
| 36 | define void @dpb_split_field(%struct.frame_store* %fs) #0 { |
| 37 | entry: |
| 38 | %frame = getelementptr inbounds %struct.frame_store, %struct.frame_store* %fs, i64 0, i32 10 |
| 39 | br label %for.cond538.preheader.lr.ph |
| 40 | |
| 41 | for.cond538.preheader.lr.ph: ; preds = %entry |
| 42 | %bottom_field578 = getelementptr inbounds %struct.frame_store, %struct.frame_store* %fs, i64 0, i32 12 |
| 43 | br label %for.cond538.preheader |
| 44 | |
| 45 | for.cond538.preheader: ; preds = %for.inc912, %for.cond538.preheader.lr.ph |
| 46 | %0 = phi %struct.picture* [ undef, %for.cond538.preheader.lr.ph ], [ %11, %for.inc912 ] |
| 47 | br i1 undef, label %land.lhs.true563, label %for.inc912 |
| 48 | |
| 49 | land.lhs.true563: ; preds = %for.cond538.preheader |
| 50 | %div552 = sdiv i32 0, 16 |
| 51 | %div554 = sdiv i32 0, 4 |
| 52 | %mul555 = mul i32 %div552, %div554 |
| 53 | %rem558 = srem i32 0, 2 |
| 54 | %tmp9 = add i32 %mul555, 0 |
| 55 | %tmp10 = shl i32 %tmp9, 1 |
| 56 | %add559 = add i32 %tmp10, %rem558 |
| 57 | %idxprom564 = sext i32 %add559 to i64 |
| 58 | %mb_field566 = getelementptr inbounds %struct.picture, %struct.picture* %0, i64 0, i32 31 |
| 59 | %1 = load i8*, i8** %mb_field566, align 8 |
| 60 | %arrayidx567 = getelementptr inbounds i8, i8* %1, i64 %idxprom564 |
| 61 | %2 = load i8, i8* %arrayidx567, align 1 |
| 62 | store i8 0, i8* %arrayidx567 |
| 63 | br i1 false, label %if.end908, label %if.then570 |
| 64 | |
| 65 | if.then570: ; preds = %land.lhs.true563 |
| 66 | %3 = load %struct.picture*, %struct.picture** %frame, align 8 |
| 67 | %mv = getelementptr inbounds %struct.picture, %struct.picture* %3, i64 0, i32 35 |
| 68 | %4 = load i16****, i16***** %mv, align 8 |
| 69 | %5 = load %struct.picture*, %struct.picture** %bottom_field578, align 8 |
| 70 | %mv612 = getelementptr inbounds %struct.picture, %struct.picture* %5, i64 0, i32 35 |
| 71 | %6 = load i16****, i16***** %mv612, align 8 |
| 72 | %arrayidx647 = getelementptr inbounds i16***, i16**** %4, i64 1 |
| 73 | %ref_id726 = getelementptr inbounds %struct.picture, %struct.picture* %3, i64 0, i32 34 |
| 74 | %7 = load i64***, i64**** %ref_id726, align 8 |
| 75 | %arrayidx746 = getelementptr inbounds i64**, i64*** %7, i64 5 |
| 76 | %8 = load %struct.picture*, %struct.picture** %frame, align 8 |
| 77 | %mv783 = getelementptr inbounds %struct.picture, %struct.picture* %8, i64 0, i32 35 |
| 78 | %9 = load i16****, i16***** %mv783, align 8 |
| 79 | %arrayidx804 = getelementptr inbounds i16***, i16**** %9, i64 1 |
| 80 | %10 = load i16***, i16**** %arrayidx804, align 8 |
| 81 | %arrayidx805 = getelementptr inbounds i16**, i16*** %10, i64 0 |
| 82 | store i16*** %10, i16**** %arrayidx804 |
| 83 | br label %if.end908 |
| 84 | |
| 85 | if.end908: ; preds = %if.then570, %land.lhs.true563 |
| 86 | br label %for.inc912 |
| 87 | |
| 88 | for.inc912: ; preds = %if.end908, %for.cond538.preheader |
| 89 | %11 = phi %struct.picture* [ %0, %for.cond538.preheader ], [ undef, %if.end908 ] |
| 90 | br i1 undef, label %for.cond538.preheader, label %for.cond1392.preheader |
| 91 | |
| 92 | for.cond1392.preheader: ; preds = %for.inc912 |
| 93 | ret void |
| 94 | } |