Bob Wilson | efe7d9a | 2010-09-10 05:15:04 +0000 | [diff] [blame^] | 1 | ; RUN: llc < %s -march=arm -mattr=+v6,+vfp2 | FileCheck %s |
Evan Cheng | 4be24ed | 2007-01-19 22:43:14 +0000 | [diff] [blame] | 2 | |
Reid Spencer | e3ff5ad | 2007-01-26 08:25:06 +0000 | [diff] [blame] | 3 | @quant_coef = external global [6 x [4 x [4 x i32]]] ; <[6 x [4 x [4 x i32]]]*> [#uses=1] |
| 4 | @dequant_coef = external global [6 x [4 x [4 x i32]]] ; <[6 x [4 x [4 x i32]]]*> [#uses=1] |
| 5 | @A = external global [4 x [4 x i32]] ; <[4 x [4 x i32]]*> [#uses=1] |
Evan Cheng | 4be24ed | 2007-01-19 22:43:14 +0000 | [diff] [blame] | 6 | |
Bob Wilson | efe7d9a | 2010-09-10 05:15:04 +0000 | [diff] [blame^] | 7 | ; CHECK: dct_luma_sp: |
Reid Spencer | e3ff5ad | 2007-01-26 08:25:06 +0000 | [diff] [blame] | 8 | define fastcc i32 @dct_luma_sp(i32 %block_x, i32 %block_y, i32* %coeff_cost) { |
Evan Cheng | 4be24ed | 2007-01-19 22:43:14 +0000 | [diff] [blame] | 9 | entry: |
Bob Wilson | efe7d9a | 2010-09-10 05:15:04 +0000 | [diff] [blame^] | 10 | ; Make sure to use base-updating stores for saving callee-saved registers. |
| 11 | ; CHECK-NOT: sub sp |
| 12 | ; CHECK: vstmdb sp! |
Evan Cheng | 4be24ed | 2007-01-19 22:43:14 +0000 | [diff] [blame] | 13 | %predicted_block = alloca [4 x [4 x i32]], align 4 ; <[4 x [4 x i32]]*> [#uses=1] |
| 14 | br label %cond_next489 |
| 15 | |
| 16 | cond_next489: ; preds = %cond_false, %bb471 |
| 17 | %j.7.in = load i8* null ; <i8> [#uses=1] |
| 18 | %i.8.in = load i8* null ; <i8> [#uses=1] |
| 19 | %i.8 = zext i8 %i.8.in to i32 ; <i32> [#uses=4] |
| 20 | %j.7 = zext i8 %j.7.in to i32 ; <i32> [#uses=4] |
| 21 | %tmp495 = getelementptr [4 x [4 x i32]]* %predicted_block, i32 0, i32 %i.8, i32 %j.7 ; <i32*> [#uses=2] |
| 22 | %tmp496 = load i32* %tmp495 ; <i32> [#uses=2] |
| 23 | %tmp502 = load i32* null ; <i32> [#uses=1] |
Reid Spencer | e3ff5ad | 2007-01-26 08:25:06 +0000 | [diff] [blame] | 24 | %tmp542 = getelementptr [6 x [4 x [4 x i32]]]* @quant_coef, i32 0, i32 0, i32 %i.8, i32 %j.7 ; <i32*> [#uses=1] |
Evan Cheng | 4be24ed | 2007-01-19 22:43:14 +0000 | [diff] [blame] | 25 | %tmp543 = load i32* %tmp542 ; <i32> [#uses=1] |
Reid Spencer | 832254e | 2007-02-02 02:16:23 +0000 | [diff] [blame] | 26 | %tmp548 = ashr i32 0, 0 ; <i32> [#uses=3] |
Evan Cheng | 4be24ed | 2007-01-19 22:43:14 +0000 | [diff] [blame] | 27 | %tmp561 = sub i32 0, %tmp496 ; <i32> [#uses=3] |
| 28 | %abscond563 = icmp sgt i32 %tmp561, -1 ; <i1> [#uses=1] |
| 29 | %abs564 = select i1 %abscond563, i32 %tmp561, i32 0 ; <i32> [#uses=1] |
| 30 | %tmp572 = mul i32 %abs564, %tmp543 ; <i32> [#uses=1] |
| 31 | %tmp574 = add i32 %tmp572, 0 ; <i32> [#uses=1] |
Reid Spencer | 832254e | 2007-02-02 02:16:23 +0000 | [diff] [blame] | 32 | %tmp576 = ashr i32 %tmp574, 0 ; <i32> [#uses=7] |
Evan Cheng | 4be24ed | 2007-01-19 22:43:14 +0000 | [diff] [blame] | 33 | %tmp579 = icmp eq i32 %tmp548, %tmp576 ; <i1> [#uses=1] |
| 34 | br i1 %tmp579, label %bb712, label %cond_next589 |
| 35 | |
| 36 | cond_next589: ; preds = %cond_next489 |
Reid Spencer | e3ff5ad | 2007-01-26 08:25:06 +0000 | [diff] [blame] | 37 | %tmp605 = getelementptr [6 x [4 x [4 x i32]]]* @dequant_coef, i32 0, i32 0, i32 %i.8, i32 %j.7 ; <i32*> [#uses=1] |
Evan Cheng | 4be24ed | 2007-01-19 22:43:14 +0000 | [diff] [blame] | 38 | %tmp606 = load i32* %tmp605 ; <i32> [#uses=1] |
| 39 | %tmp612 = load i32* null ; <i32> [#uses=1] |
| 40 | %tmp629 = load i32* null ; <i32> [#uses=1] |
Reid Spencer | 9085043 | 2007-01-30 16:16:01 +0000 | [diff] [blame] | 41 | %tmp629a = sitofp i32 %tmp629 to double ; <double> [#uses=1] |
Dan Gohman | ae3a0be | 2009-06-04 22:49:04 +0000 | [diff] [blame] | 42 | %tmp631 = fmul double %tmp629a, 0.000000e+00 ; <double> [#uses=1] |
| 43 | %tmp632 = fadd double 0.000000e+00, %tmp631 ; <double> [#uses=1] |
Reid Spencer | e3ff5ad | 2007-01-26 08:25:06 +0000 | [diff] [blame] | 44 | %tmp642 = call fastcc i32 @sign( i32 %tmp576, i32 %tmp561 ) ; <i32> [#uses=1] |
Evan Cheng | 4be24ed | 2007-01-19 22:43:14 +0000 | [diff] [blame] | 45 | %tmp650 = mul i32 %tmp606, %tmp642 ; <i32> [#uses=1] |
| 46 | %tmp656 = mul i32 %tmp650, %tmp612 ; <i32> [#uses=1] |
Reid Spencer | 832254e | 2007-02-02 02:16:23 +0000 | [diff] [blame] | 47 | %tmp658 = shl i32 %tmp656, 0 ; <i32> [#uses=1] |
| 48 | %tmp659 = ashr i32 %tmp658, 6 ; <i32> [#uses=1] |
Evan Cheng | 4be24ed | 2007-01-19 22:43:14 +0000 | [diff] [blame] | 49 | %tmp660 = sub i32 0, %tmp659 ; <i32> [#uses=1] |
| 50 | %tmp666 = sub i32 %tmp660, %tmp496 ; <i32> [#uses=1] |
Reid Spencer | 9085043 | 2007-01-30 16:16:01 +0000 | [diff] [blame] | 51 | %tmp667 = sitofp i32 %tmp666 to double ; <double> [#uses=2] |
Reid Spencer | e3ff5ad | 2007-01-26 08:25:06 +0000 | [diff] [blame] | 52 | call void @levrun_linfo_inter( i32 %tmp576, i32 0, i32* null, i32* null ) |
Dan Gohman | ae3a0be | 2009-06-04 22:49:04 +0000 | [diff] [blame] | 53 | %tmp671 = fmul double %tmp667, %tmp667 ; <double> [#uses=1] |
| 54 | %tmp675 = fadd double %tmp671, 0.000000e+00 ; <double> [#uses=1] |
Evan Cheng | 4be24ed | 2007-01-19 22:43:14 +0000 | [diff] [blame] | 55 | %tmp678 = fcmp oeq double %tmp632, %tmp675 ; <i1> [#uses=1] |
| 56 | br i1 %tmp678, label %cond_true679, label %cond_false693 |
| 57 | |
| 58 | cond_true679: ; preds = %cond_next589 |
| 59 | %abscond681 = icmp sgt i32 %tmp548, -1 ; <i1> [#uses=1] |
| 60 | %abs682 = select i1 %abscond681, i32 %tmp548, i32 0 ; <i32> [#uses=1] |
| 61 | %abscond684 = icmp sgt i32 %tmp576, -1 ; <i1> [#uses=1] |
| 62 | %abs685 = select i1 %abscond684, i32 %tmp576, i32 0 ; <i32> [#uses=1] |
| 63 | %tmp686 = icmp slt i32 %abs682, %abs685 ; <i1> [#uses=1] |
| 64 | br i1 %tmp686, label %cond_next702, label %cond_false689 |
| 65 | |
| 66 | cond_false689: ; preds = %cond_true679 |
| 67 | %tmp739 = icmp eq i32 %tmp576, 0 ; <i1> [#uses=1] |
| 68 | br i1 %tmp579, label %bb737, label %cond_false708 |
| 69 | |
| 70 | cond_false693: ; preds = %cond_next589 |
| 71 | ret i32 0 |
| 72 | |
| 73 | cond_next702: ; preds = %cond_true679 |
| 74 | ret i32 0 |
| 75 | |
| 76 | cond_false708: ; preds = %cond_false689 |
| 77 | ret i32 0 |
| 78 | |
| 79 | bb712: ; preds = %cond_next489 |
| 80 | ret i32 0 |
| 81 | |
| 82 | bb737: ; preds = %cond_false689 |
| 83 | br i1 %tmp739, label %cond_next791, label %cond_true740 |
| 84 | |
| 85 | cond_true740: ; preds = %bb737 |
Reid Spencer | e3ff5ad | 2007-01-26 08:25:06 +0000 | [diff] [blame] | 86 | %tmp761 = call fastcc i32 @sign( i32 %tmp576, i32 0 ) ; <i32> [#uses=1] |
Evan Cheng | 4be24ed | 2007-01-19 22:43:14 +0000 | [diff] [blame] | 87 | %tmp780 = load i32* null ; <i32> [#uses=1] |
Reid Spencer | e3ff5ad | 2007-01-26 08:25:06 +0000 | [diff] [blame] | 88 | %tmp785 = getelementptr [4 x [4 x i32]]* @A, i32 0, i32 %i.8, i32 %j.7 ; <i32*> [#uses=1] |
Evan Cheng | 4be24ed | 2007-01-19 22:43:14 +0000 | [diff] [blame] | 89 | %tmp786 = load i32* %tmp785 ; <i32> [#uses=1] |
| 90 | %tmp781 = mul i32 %tmp780, %tmp761 ; <i32> [#uses=1] |
| 91 | %tmp787 = mul i32 %tmp781, %tmp786 ; <i32> [#uses=1] |
Reid Spencer | 832254e | 2007-02-02 02:16:23 +0000 | [diff] [blame] | 92 | %tmp789 = shl i32 %tmp787, 0 ; <i32> [#uses=1] |
| 93 | %tmp790 = ashr i32 %tmp789, 6 ; <i32> [#uses=1] |
Evan Cheng | 4be24ed | 2007-01-19 22:43:14 +0000 | [diff] [blame] | 94 | br label %cond_next791 |
| 95 | |
| 96 | cond_next791: ; preds = %cond_true740, %bb737 |
| 97 | %ilev.1 = phi i32 [ %tmp790, %cond_true740 ], [ 0, %bb737 ] ; <i32> [#uses=1] |
| 98 | %tmp796 = load i32* %tmp495 ; <i32> [#uses=1] |
| 99 | %tmp798 = add i32 %tmp796, %ilev.1 ; <i32> [#uses=1] |
| 100 | %tmp812 = mul i32 0, %tmp502 ; <i32> [#uses=0] |
Reid Spencer | e3ff5ad | 2007-01-26 08:25:06 +0000 | [diff] [blame] | 101 | %tmp818 = call fastcc i32 @sign( i32 0, i32 %tmp798 ) ; <i32> [#uses=0] |
Evan Cheng | 4be24ed | 2007-01-19 22:43:14 +0000 | [diff] [blame] | 102 | unreachable |
| 103 | } |
| 104 | |
Reid Spencer | e3ff5ad | 2007-01-26 08:25:06 +0000 | [diff] [blame] | 105 | declare i32 @sign(i32, i32) |
Evan Cheng | 4be24ed | 2007-01-19 22:43:14 +0000 | [diff] [blame] | 106 | |
Reid Spencer | e3ff5ad | 2007-01-26 08:25:06 +0000 | [diff] [blame] | 107 | declare void @levrun_linfo_inter(i32, i32, i32*, i32*) |