Jack Carter | e035f65 | 2012-07-16 15:14:51 +0000 | [diff] [blame^] | 1 | ; RUN: llc -march=mips64el -filetype=obj -mcpu=mips64r2 %s -o - | llvm-objdump -disassemble -triple mips64el - | FileCheck %s |
| 2 | |
| 3 | |
| 4 | define i64 @f3(i64 %a0) nounwind readnone { |
| 5 | entry: |
| 6 | ; CHECK: dsll ${{[0-9]+}}, ${{[0-9]+}}, 10 |
| 7 | %shl = shl i64 %a0, 10 |
| 8 | ret i64 %shl |
| 9 | } |
| 10 | |
| 11 | define i64 @f4(i64 %a0) nounwind readnone { |
| 12 | entry: |
| 13 | ; CHECK: dsra ${{[0-9]+}}, ${{[0-9]+}}, 10 |
| 14 | %shr = ashr i64 %a0, 10 |
| 15 | ret i64 %shr |
| 16 | } |
| 17 | |
| 18 | define i64 @f5(i64 %a0) nounwind readnone { |
| 19 | entry: |
| 20 | ; CHECK: dsrl ${{[0-9]+}}, ${{[0-9]+}}, 10 |
| 21 | %shr = lshr i64 %a0, 10 |
| 22 | ret i64 %shr |
| 23 | } |
| 24 | |
| 25 | define i64 @f6(i64 %a0) nounwind readnone { |
| 26 | entry: |
| 27 | ; CHECK: dsll32 ${{[0-9]+}}, ${{[0-9]+}}, 8 |
| 28 | %shl = shl i64 %a0, 40 |
| 29 | ret i64 %shl |
| 30 | } |
| 31 | |
| 32 | define i64 @f7(i64 %a0) nounwind readnone { |
| 33 | entry: |
| 34 | ; CHECK: dsra32 ${{[0-9]+}}, ${{[0-9]+}}, 8 |
| 35 | %shr = ashr i64 %a0, 40 |
| 36 | ret i64 %shr |
| 37 | } |
| 38 | |
| 39 | define i64 @f8(i64 %a0) nounwind readnone { |
| 40 | entry: |
| 41 | ; CHECK: dsrl32 ${{[0-9]+}}, ${{[0-9]+}}, 8 |
| 42 | %shr = lshr i64 %a0, 40 |
| 43 | ret i64 %shr |
| 44 | } |
| 45 | |