1 ; RUN: llc < %s -march=nvptx64 | FileCheck %s
2 ; RUN: %if ptxas %{ llc < %s -march=nvptx64 | %ptxas-verify %}
4 declare i64 @llvm.nvvm.rotate.b64(i64, i32)
5 declare i64 @llvm.nvvm.rotate.right.b64(i64, i32)
8 define i64 @rotate64(i64 %a, i32 %b) {
9 ; CHECK: shl.b64 [[LHS:%.*]], [[RD1:%.*]], 3;
10 ; CHECK: shr.b64 [[RHS:%.*]], [[RD1]], 61;
11 ; CHECK: add.u64 [[RD2:%.*]], [[LHS]], [[RHS]];
13 %val = tail call i64 @llvm.nvvm.rotate.b64(i64 %a, i32 3)
17 ; CHECK: rotateright64
18 define i64 @rotateright64(i64 %a, i32 %b) {
19 ; CHECK: shl.b64 [[LHS:%.*]], [[RD1:%.*]], 61;
20 ; CHECK: shr.b64 [[RHS:%.*]], [[RD1]], 3;
21 ; CHECK: add.u64 [[RD2:%.*]], [[LHS]], [[RHS]];
23 %val = tail call i64 @llvm.nvvm.rotate.right.b64(i64 %a, i32 3)