Home | History | Annotate | Download | only in LICM
      1 ; RUN: opt < %s -tbaa -licm -S | FileCheck %s
      2 ; PR9634
      3 
      4 @g_58 = common global i32 0, align 4
      5 @g_116 = common global i32* null, align 8
      6 
      7 define void @f() nounwind {
      8 
      9 ; CHECK: entry:
     10 ; CHECK: alloca [9 x i16]
     11 ; CHECK: load i32* @g_58
     12 ; CHECK: br label %for.body
     13 
     14 entry:
     15   %l_87.i = alloca [9 x i16], align 16
     16   br label %for.body
     17 
     18 for.body:                                         ; preds = %entry, %for.inc
     19   %inc12 = phi i32 [ 0, %entry ], [ %inc, %for.body ]
     20   store i32* @g_58, i32** @g_116, align 8, !tbaa !0
     21   %tmp2 = load i32** @g_116, align 8, !tbaa !0
     22   %tmp3 = load i32* %tmp2, !tbaa !4
     23   %or = or i32 %tmp3, 10
     24   store i32 %or, i32* %tmp2, !tbaa !4
     25   %inc = add nsw i32 %inc12, 1
     26   %cmp = icmp slt i32 %inc, 4
     27   br i1 %cmp, label %for.body, label %for.end
     28 
     29 for.end:                                          ; preds = %for.inc
     30   ret void
     31 }
     32 
     33 !0 = metadata !{metadata !"any pointer", metadata !1}
     34 !1 = metadata !{metadata !"omnipotent char", metadata !2}
     35 !2 = metadata !{metadata !"Simple C/C++ TBAA", null}
     36 !3 = metadata !{metadata !"short", metadata !1}
     37 !4 = metadata !{metadata !"int", metadata !1}
     38