~ubuntu-branches/ubuntu/quantal/llvm-3.1/quantal

« back to all changes in this revision

Viewing changes to test/Transforms/LICM/2011-04-06-PromoteResultOfPromotion.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2012-03-29 19:09:51 UTC
  • Revision ID: package-import@ubuntu.com-20120329190951-aq83ivog4cg8bxun
Tags: upstream-3.1~svn153643
ImportĀ upstreamĀ versionĀ 3.1~svn153643

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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}