aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/PTX/shl.ll
blob: 6e72c9221325541487964833e085479260621b89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
; RUN: llc < %s -march=ptx32 | FileCheck %s

define ptx_device i32 @t1(i32 %x, i32 %y) {
; CHECK: shl.b32 r0, r1, r2
	%z = shl i32 %x, %y
; CHECK: ret;
	ret i32 %z
}

define ptx_device i32 @t2(i32 %x) {
; CHECK: shl.b32 r0, r1, 3
	%z = shl i32 %x, 3
; CHECK: ret;
	ret i32 %z
}

define ptx_device i32 @t3(i32 %x) {
; CHECK: shl.b32 r0, 3, r1
	%z = shl i32 3, %x
; CHECK: ret;
	ret i32 %z
}