• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt < %s -loop-deletion -licm -loop-idiom -disable-output
2; Check no assertion when loop-idiom deletes the MemSet already analyzed by licm
3define void @set_array() {
4  br i1 false, label %bb3.preheader.lr.ph, label %bb9
5
6bb3.preheader.lr.ph:                              ; preds = %0
7  br label %bb3.preheader
8
9bb4:                                              ; preds = %bb4.lr.ph, %bb7
10  %j.3.06 = phi i8 [ %j.3.17, %bb4.lr.ph ], [ %_tmp13, %bb7 ]
11  br label %bb6
12
13bb6:                                              ; preds = %bb4, %bb6
14  %k.4.04 = phi i8 [ 0, %bb4 ], [ %_tmp9, %bb6 ]
15  %_tmp31 = sext i8 %j.3.06 to i64
16  %_tmp4 = mul i64 %_tmp31, 10
17  %_tmp5 = getelementptr i8, i8* undef, i64 %_tmp4
18  %_tmp7 = getelementptr i8, i8* %_tmp5, i8 %k.4.04
19  store i8 42, i8* %_tmp7
20  %_tmp9 = add i8 %k.4.04, 1
21  %_tmp11 = icmp slt i8 %_tmp9, 10
22  br i1 %_tmp11, label %bb6, label %bb7
23
24bb7:                                              ; preds = %bb6
25  %_tmp13 = add i8 %j.3.06, 1
26  %_tmp15 = icmp slt i8 %_tmp13, 2
27  br i1 %_tmp15, label %bb4, label %bb3.bb1.loopexit_crit_edge
28
29bb3.bb1.loopexit_crit_edge:                       ; preds = %bb7
30  %split = phi i8 [ %_tmp13, %bb7 ]
31  br label %bb1.loopexit
32
33bb1.loopexit:                                     ; preds = %bb3.bb1.loopexit_crit_edge, %bb3.preheader
34  %j.3.0.lcssa = phi i8 [ %split, %bb3.bb1.loopexit_crit_edge ], [ %j.3.17, %bb3.preheader ]
35  br i1 false, label %bb3.preheader, label %bb1.bb9_crit_edge
36
37bb3.preheader:                                    ; preds = %bb3.preheader.lr.ph, %bb1.loopexit
38  %j.3.17 = phi i8 [ undef, %bb3.preheader.lr.ph ], [ %j.3.0.lcssa, %bb1.loopexit ]
39  %_tmp155 = icmp slt i8 %j.3.17, 2
40  br i1 %_tmp155, label %bb4.lr.ph, label %bb1.loopexit
41
42bb4.lr.ph:                                        ; preds = %bb3.preheader
43  br label %bb4
44
45bb1.bb9_crit_edge:                                ; preds = %bb1.loopexit
46  br label %bb9
47
48bb9:                                              ; preds = %bb1.bb9_crit_edge, %0
49  ret void
50}
51
52