1 ; RUN: llc < %s -march=nvptx -mcpu=sm_20 | FileCheck --check-prefix=SM20 %s
2 ; RUN: llc < %s -march=nvptx -mcpu=sm_35 | FileCheck --check-prefix=SM35 %s
5 declare i32 @llvm.nvvm.rotate.b32(i32, i32)
6 declare i64 @llvm.nvvm.rotate.b64(i64, i32)
7 declare i64 @llvm.nvvm.rotate.right.b64(i64, i32)
11 define i32 @rotate32(i32 %a, i32 %b) {
16 ; SM35: shf.l.wrap.b32
17 %val = tail call i32 @llvm.nvvm.rotate.b32(i32 %a, i32 %b)
23 define i64 @rotate64(i64 %a, i32 %b) {
28 ; SM35: shf.l.wrap.b32
29 ; SM35: shf.l.wrap.b32
30 %val = tail call i64 @llvm.nvvm.rotate.b64(i64 %a, i32 %b)
36 define i64 @rotateright64(i64 %a, i32 %b) {
41 ; SM35: shf.r.wrap.b32
42 ; SM35: shf.r.wrap.b32
43 %val = tail call i64 @llvm.nvvm.rotate.right.b64(i64 %a, i32 %b)
49 define i32 @rotl0(i32 %x) {
53 ; SM35: shf.l.wrap.b32