2011-04-20 15:37:17 +00:00
|
|
|
; RUN: llc < %s -march=ptx32 | FileCheck %s
|
2010-12-06 04:00:03 +00:00
|
|
|
|
|
|
|
define ptx_device i32 @t1(i32 %x, i32 %y) {
|
2011-09-22 16:45:51 +00:00
|
|
|
; CHECK: shl.b32 %ret{{[0-9]+}}, %r{{[0-9]+}}, %r{{[0-9]+}}
|
2010-12-06 04:00:03 +00:00
|
|
|
%z = shl i32 %x, %y
|
|
|
|
; CHECK: ret;
|
|
|
|
ret i32 %z
|
|
|
|
}
|
|
|
|
|
|
|
|
define ptx_device i32 @t2(i32 %x) {
|
2011-09-22 16:45:51 +00:00
|
|
|
; CHECK: shl.b32 %ret{{[0-9]+}}, %r{{[0-9]+}}, 3
|
2010-12-06 04:00:03 +00:00
|
|
|
%z = shl i32 %x, 3
|
|
|
|
; CHECK: ret;
|
|
|
|
ret i32 %z
|
|
|
|
}
|
|
|
|
|
|
|
|
define ptx_device i32 @t3(i32 %x) {
|
2011-09-22 16:45:51 +00:00
|
|
|
; CHECK: shl.b32 %ret{{[0-9]+}}, 3, %r{{[0-9]+}}
|
2010-12-06 04:00:03 +00:00
|
|
|
%z = shl i32 3, %x
|
|
|
|
; CHECK: ret;
|
|
|
|
ret i32 %z
|
|
|
|
}
|