Skip to content

Commit

Permalink
[NVPTX] shfl.sync is introduced in PTX 6.0
Browse files Browse the repository at this point in the history
PTX ISA spec, s9.7.8.6. Data Movement and Conversion Instructions:
shfl.sync

PTX ISA Notes
Introduced in PTX ISA version 6.0.

Target ISA Notes
Requires sm_30 or higher.

Differential Revision: https://reviews.llvm.org/D123039
  • Loading branch information
asavonic committed Apr 14, 2022
1 parent 369adba commit 230f326
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion llvm/lib/Target/NVPTX/NVPTXIntrinsics.td
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ foreach sync = [false, true] in {
foreach threadmask_imm = THREADMASK_INFO<sync>.ret in {
def : SHFL_INSTR<sync, mode, regclass, return_pred,
offset_imm, mask_imm, threadmask_imm>,
Requires<!if(sync, [hasSM30], [hasSM30, hasSHFL])>;
Requires<!if(sync, [hasSM30, hasPTX60], [hasSM30, hasSHFL])>;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/NVPTX/shfl-sync-p.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: llc < %s -march=nvptx64 -mcpu=sm_30 | FileCheck %s
; RUN: llc < %s -march=nvptx64 -mcpu=sm_30 -mattr=+ptx60 | FileCheck %s

declare {i32, i1} @llvm.nvvm.shfl.sync.down.i32p(i32, i32, i32, i32)
declare {float, i1} @llvm.nvvm.shfl.sync.down.f32p(i32, float, i32, i32)
Expand Down
2 changes: 1 addition & 1 deletion llvm/test/CodeGen/NVPTX/shfl-sync.ll
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
; RUN: llc < %s -march=nvptx64 -mcpu=sm_30 | FileCheck %s
; RUN: llc < %s -march=nvptx64 -mcpu=sm_30 -mattr=+ptx60 | FileCheck %s

declare i32 @llvm.nvvm.shfl.sync.down.i32(i32, i32, i32, i32)
declare float @llvm.nvvm.shfl.sync.down.f32(float, i32, i32, i32)
Expand Down

0 comments on commit 230f326

Please sign in to comment.