Chris Lattner | 9014781 | 2001-07-22 05:00:34 +0000 | [diff] [blame] | 1 | implementation |
| 2 | |
| 3 | ;; Emitting: void combinations(unsigned int, unsigned int*) |
| 4 | void "combinations"(uint %n, uint* %A) |
| 5 | begin |
| 6 | bb1: ;;<label> |
| 7 | %reg111 = shl uint %n, ubyte 2 ;;<uint> |
| 8 | %cast112 = cast uint %reg111 to uint* ;;<uint*> |
| 9 | %reg113 = add uint* %A, %cast112 ;;<uint*> |
| 10 | store uint 1, uint* %reg113 ;;<void> |
| 11 | store uint 1, uint* %A ;;<void> |
| 12 | %reg128 = shr uint %n, ubyte 1 ;;<uint>:(unsigned operands) |
| 13 | %cond105 = setgt uint 1, %reg128 ;;<bool>:(unsigned operands) |
| 14 | br bool %cond105, label %bb3, label %bb2 ;;<void> |
| 15 | |
| 16 | bb2: ;;<label> |
| 17 | %reg129 = phi uint [ %reg131, %bb2 ], [ 1, %bb1 ] ;;<uint> |
| 18 | %reg130 = phi uint [ %reg132, %bb2 ], [ 1, %bb1 ] ;;<uint> |
| 19 | %reg117 = sub uint %n, %reg130 ;;<uint> |
| 20 | %reg118 = add uint %reg117, 1 ;;<uint> |
| 21 | %reg119 = mul uint %reg129, %reg118 ;;<uint> |
| 22 | %reg131 = div uint %reg119, %reg130 ;;<uint>:(unsigned operands) |
| 23 | %reg120 = shl uint %reg130, ubyte 2 ;;<uint> |
| 24 | %cast121 = cast uint %reg120 to uint* ;;<uint*> |
| 25 | %reg122 = add uint* %A, %cast121 ;;<uint*> |
| 26 | %reg124 = shl uint %reg117, ubyte 2 ;;<uint> |
| 27 | %cast125 = cast uint %reg124 to uint* ;;<uint*> |
| 28 | %reg126 = add uint* %A, %cast125 ;;<uint*> |
| 29 | store uint %reg131, uint* %reg126 ;;<void> |
| 30 | store uint %reg131, uint* %reg122 ;;<void> |
| 31 | %reg132 = add uint %reg130, 1 ;;<uint> |
| 32 | %cond47 = setle uint %reg132, %reg128 ;;<bool>:(unsigned operands) |
| 33 | br bool %cond47, label %bb2, label %bb3 ;;<void> |
| 34 | |
| 35 | bb3: ;;<label> |
| 36 | ret void ;;<void> |
| 37 | end |
| 38 | |
| 39 | declare void "_Z12combinationsjPj" (uint, uint*) ;; Prototype for: void combinations(unsigned int, unsigned int*) |