OLD | NEW |
1 ; Simple tests on dump flags for pnacl-bcanalyzer. | 1 ; Simple tests on dump flags for pnacl-bcanalyzer. |
2 | 2 |
3 @bytes = internal global [4 x i8] c"abcd" | 3 @bytes = internal global [4 x i8] c"abcd" |
4 | 4 |
5 @ptr_to_ptr = internal global i32 ptrtoint (i32* @ptr to i32) | 5 @ptr_to_ptr = internal global i32 ptrtoint (i32* @ptr to i32) |
6 | 6 |
7 @ptr = internal global i32 ptrtoint ([4 x i8]* @bytes to i32) | 7 @ptr = internal global i32 ptrtoint ([4 x i8]* @bytes to i32) |
8 | 8 |
9 declare i32 @bar(i32) | 9 declare i32 @bar(i32) |
10 | 10 |
11 define void @AllocCastSimple() { | 11 define void @AllocCastSimple() { |
12 %1 = alloca i8, i32 4, align 8 | 12 %1 = alloca i8, i32 4, align 8 |
13 %2 = ptrtoint i8* %1 to i32 | 13 %2 = ptrtoint i8* %1 to i32 |
14 %3 = bitcast [4 x i8]* @bytes to i32* | 14 %3 = bitcast [4 x i8]* @bytes to i32* |
15 store i32 %2, i32* %3, align 1 | 15 store i32 %2, i32* %3, align 1 |
16 ret void | 16 ret void |
17 } | 17 } |
18 | 18 |
19 define void @PhiBackwardRefs(i1) { | 19 define void @PhiBackwardRefs(i1) { |
20 %2 = alloca i8, i32 4, align 8 | 20 %2 = alloca i8, i32 4, align 8 |
21 %3 = alloca i8, i32 4, align 8 | 21 %3 = alloca i8, i32 4, align 8 |
22 br i1 %0, label %true, label %false | 22 br i1 %0, label %true, label %false |
23 | 23 |
24 true: ; preds = %1 | 24 true: ; preds = %1 |
25 %4 = bitcast i8* %2 to i32* | 25 %4 = bitcast i8* %2 to i32* |
26 %5 = load i32* %4 | 26 %5 = load i32, i32* %4 |
27 %6 = ptrtoint i8* %3 to i32 | 27 %6 = ptrtoint i8* %3 to i32 |
28 br label %merge | 28 br label %merge |
29 | 29 |
30 false: ; preds = %1 | 30 false: ; preds = %1 |
31 %7 = bitcast i8* %2 to i32* | 31 %7 = bitcast i8* %2 to i32* |
32 %8 = load i32* %7 | 32 %8 = load i32, i32* %7 |
33 %9 = ptrtoint i8* %3 to i32 | 33 %9 = ptrtoint i8* %3 to i32 |
34 br label %merge | 34 br label %merge |
35 | 35 |
36 merge: ; preds = %false, %true | 36 merge: ; preds = %false, %true |
37 %10 = phi i32 [ %6, %true ], [ %9, %false ] | 37 %10 = phi i32 [ %6, %true ], [ %9, %false ] |
38 %11 = phi i32 [ %5, %true ], [ %8, %false ] | 38 %11 = phi i32 [ %5, %true ], [ %8, %false ] |
39 ret void | 39 ret void |
40 } | 40 } |
41 | 41 |
42 ; ------------------------------------------------- | 42 ; ------------------------------------------------- |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 ; DRWD: <INST_BR abbrev='UNABBREVIATED' op0=3/> | 238 ; DRWD: <INST_BR abbrev='UNABBREVIATED' op0=3/> |
239 ; DRWD: <INST_LOAD abbrev=4 op0=3 op1=0 op2=0/> | 239 ; DRWD: <INST_LOAD abbrev=4 op0=3 op1=0 op2=0/> |
240 ; DRWD: <INST_BR abbrev='UNABBREVIATED' op0=3/> | 240 ; DRWD: <INST_BR abbrev='UNABBREVIATED' op0=3/> |
241 ; DRWD: <INST_PHI abbrev='UNABBREVIATED' op0=0 op1=6 op2=1 | 241 ; DRWD: <INST_PHI abbrev='UNABBREVIATED' op0=0 op1=6 op2=1 |
242 ; DRWD: op3=6 op4=2/> | 242 ; DRWD: op3=6 op4=2/> |
243 ; DRWD: <INST_PHI abbrev='UNABBREVIATED' op0=0 op1=6 op2=1 | 243 ; DRWD: <INST_PHI abbrev='UNABBREVIATED' op0=0 op1=6 op2=1 |
244 ; DRWD: op3=4 op4=2/> | 244 ; DRWD: op3=4 op4=2/> |
245 ; DRWD: <INST_RET abbrev=7/> | 245 ; DRWD: <INST_RET abbrev=7/> |
246 ; DRWD: </FUNCTION_BLOCK abbrev='END_BLOCK'> | 246 ; DRWD: </FUNCTION_BLOCK abbrev='END_BLOCK'> |
247 ; DRWD: </MODULE_BLOCK abbrev='END_BLOCK'> | 247 ; DRWD: </MODULE_BLOCK abbrev='END_BLOCK'> |
OLD | NEW |