Colin LeMahieu | b8575b1 | 2015-06-13 21:46:39 +0000 | [diff] [blame] | 1 | ; RUN: llc -march=hexagon < %s | FileCheck %s |
Jyotsna Verma | 15957b1 | 2013-03-26 15:43:57 +0000 | [diff] [blame] | 2 | |
| 3 | define i32 @foo(i32 %a, i32 %b) nounwind readnone { |
| 4 | ; CHECK: lsl |
| 5 | ; CHECK: aslh |
| 6 | entry: |
| 7 | %shl1 = shl i32 16, %a |
| 8 | %shl2 = shl i32 %b, 16 |
| 9 | %ret = mul i32 %shl1, %shl2 |
| 10 | ret i32 %ret |
| 11 | } |
| 12 | |
| 13 | define i32 @bar(i32 %a, i32 %b) nounwind readnone { |
| 14 | ; CHECK: asrh |
| 15 | ; CHECK: lsr |
| 16 | entry: |
| 17 | %shl1 = ashr i32 16, %a |
| 18 | %shl2 = ashr i32 %b, 16 |
| 19 | %ret = mul i32 %shl1, %shl2 |
| 20 | ret i32 %ret |
| 21 | } |