llvm.org GIT mirror llvm / 74ee2b3
new testcase for PR1435 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37304 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 12 years ago
1 changed file(s) with 56 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: llvm-as < %s | opt -licm | llvm-dis | grep {volatile store}
1 ; PR1435
2 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64"
3 target triple = "i686-apple-darwin8"
4
5 define void @Transpose(i32* %DataIn, i32* %DataOut) {
6 entry:
7 %buffer = alloca [64 x i32], align 16 ; <[64 x i32]*> [#uses=2]
8 %"alloca point" = bitcast i32 0 to i32 ; [#uses=0]
9 br label %bb6
10
11 bb: ; preds = %bb6
12 %tmp2 = volatile load i32* %DataIn ; [#uses=1]
13 %tmp3 = getelementptr [64 x i32]* %buffer, i32 0, i32 %i.0 ; [#uses=1]
14 store i32 %tmp2, i32* %tmp3
15 %tmp5 = add i32 %i.0, 1 ; [#uses=1]
16 br label %bb6
17
18 bb6: ; preds = %bb, %entry
19 %i.0 = phi i32 [ 0, %entry ], [ %tmp5, %bb ] ; [#uses=3]
20 %tmp8 = icmp sle i32 %i.0, 63 ; [#uses=1]
21 %tmp89 = zext i1 %tmp8 to i8 ; [#uses=1]
22 %toBool = icmp ne i8 %tmp89, 0 ; [#uses=1]
23 br i1 %toBool, label %bb, label %bb30
24
25 bb12: ; preds = %bb22
26 %tmp14 = mul i32 %j.1, 8 ; [#uses=1]
27 %tmp16 = add i32 %tmp14, %i.1 ; [#uses=1]
28 %tmp17 = getelementptr [64 x i32]* %buffer, i32 0, i32 %tmp16 ; [#uses=1]
29 %tmp18 = load i32* %tmp17 ; [#uses=1]
30 volatile store i32 %tmp18, i32* %DataOut
31 %tmp21 = add i32 %j.1, 1 ; [#uses=1]
32 br label %bb22
33
34 bb22: ; preds = %bb30, %bb12
35 %j.1 = phi i32 [ %tmp21, %bb12 ], [ 0, %bb30 ] ; [#uses=4]
36 %tmp24 = icmp sle i32 %j.1, 7 ; [#uses=1]
37 %tmp2425 = zext i1 %tmp24 to i8 ; [#uses=1]
38 %toBool26 = icmp ne i8 %tmp2425, 0 ; [#uses=1]
39 br i1 %toBool26, label %bb12, label %bb27
40
41 bb27: ; preds = %bb22
42 %tmp29 = add i32 %i.1, 1 ; [#uses=1]
43 br label %bb30
44
45 bb30: ; preds = %bb27, %bb6
46 %j.0 = phi i32 [ %j.1, %bb27 ], [ undef, %bb6 ] ; [#uses=0]
47 %i.1 = phi i32 [ %tmp29, %bb27 ], [ 0, %bb6 ] ; [#uses=3]
48 %tmp32 = icmp sle i32 %i.1, 7 ; [#uses=1]
49 %tmp3233 = zext i1 %tmp32 to i8 ; [#uses=1]
50 %toBool34 = icmp ne i8 %tmp3233, 0 ; [#uses=1]
51 br i1 %toBool34, label %bb22, label %return
52
53 return: ; preds = %bb30
54 ret void
55 }