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