Brian Gaeke | 8e0a6bf | 2002-10-31 23:05:22 +0000 | [diff] [blame] | 1 | ; test shifts |
Misha Brukman | 297372c | 2002-12-13 05:44:21 +0000 | [diff] [blame] | 2 | int %main() { |
Chris Lattner | 8e4a914 | 2003-01-13 00:57:49 +0000 | [diff] [blame] | 3 | %shamt = add ubyte 0, 1 |
| 4 | |
| 5 | ; Left shifts... |
| 6 | %t1 = shl int 1, ubyte %shamt |
| 7 | %t2 = shl int 1, ubyte 4 |
| 8 | |
| 9 | %t1 = shl uint 1, ubyte %shamt |
| 10 | %t2 = shl uint 1, ubyte 5 |
| 11 | |
| 12 | ;%t1 = shl long 1, ubyte %shamt |
| 13 | %t2 = shl long 1, ubyte 4 |
| 14 | |
| 15 | ;%t1 = shl ulong 1, ubyte %shamt |
| 16 | %t2 = shl ulong 1, ubyte 5 |
| 17 | |
| 18 | ; Right shifts... |
| 19 | %t1 = shr int 1, ubyte %shamt |
| 20 | %t2 = shr int 1, ubyte 4 |
| 21 | |
| 22 | %t1 = shr uint 1, ubyte %shamt |
| 23 | %t2 = shr uint 1, ubyte 5 |
| 24 | |
| 25 | ;%t1 = shr long 1, ubyte %shamt |
Chris Lattner | e4a0133 | 2003-06-01 01:57:44 +0000 | [diff] [blame] | 26 | %t1 = shr long 1, ubyte 4 |
| 27 | %t2 = shr long 1, ubyte %shamt |
| 28 | %t3 = shl long 1, ubyte 4 |
| 29 | %t4 = shl long 1, ubyte %shamt |
Chris Lattner | 8e4a914 | 2003-01-13 00:57:49 +0000 | [diff] [blame] | 30 | |
| 31 | ;%t1 = shr ulong 1, ubyte %shamt |
Chris Lattner | e4a0133 | 2003-06-01 01:57:44 +0000 | [diff] [blame] | 32 | %t1 = shr ulong 1, ubyte 5 |
| 33 | %t2 = shr ulong 1, ubyte %shamt |
| 34 | %t3 = shl ulong 1, ubyte 5 |
| 35 | %t4 = shl ulong 1, ubyte %shamt |
Misha Brukman | 297372c | 2002-12-13 05:44:21 +0000 | [diff] [blame] | 36 | ret int 0 |
Brian Gaeke | 8e0a6bf | 2002-10-31 23:05:22 +0000 | [diff] [blame] | 37 | } |