blob: bc3e813220dbb075be04e4e6396b5e2b86586868 [file] [log] [blame]
Colin LeMahieub8575b12015-06-13 21:46:39 +00001; RUN: llc -march=hexagon < %s | FileCheck %s
Jyotsna Verma15957b12013-03-26 15:43:57 +00002
3define i32 @foo(i32 %a, i32 %b) nounwind readnone {
4; CHECK: lsl
5; CHECK: aslh
6entry:
7 %shl1 = shl i32 16, %a
8 %shl2 = shl i32 %b, 16
9 %ret = mul i32 %shl1, %shl2
10 ret i32 %ret
11}
12
13define i32 @bar(i32 %a, i32 %b) nounwind readnone {
14; CHECK: asrh
15; CHECK: lsr
16entry:
17 %shl1 = ashr i32 16, %a
18 %shl2 = ashr i32 %b, 16
19 %ret = mul i32 %shl1, %shl2
20 ret i32 %ret
21}