[NVPTX] Fix barrier.ll LIT test

The second parameter should be a multiple of the warp size (32).

PTX ISA spec, s9.7.12.1. Parallel Synchronization and Communication
Instructions: bar, barrier

barrier.sync{.aligned}      a{, b};

Operand b specifies the number of threads participating in the
barrier. If no thread count is specified, all threads in the CTA
participate in the barrier. When specifying a thread count, the value
must be a multiple of the warp size.

Differential Revision: https://reviews.llvm.org/D123470
This commit is contained in:
Andrew Savonichev 2022-04-10 22:33:48 +03:00
parent 32949401a8
commit b6183a57a1

View file

@ -11,12 +11,12 @@ define void @barrier_sync(i32 %id, i32 %cnt) {
; CHECK: barrier.sync [[ID]], [[CNT]];
call void @llvm.nvvm.barrier.sync.cnt(i32 %id, i32 %cnt)
; CHECK: barrier.sync [[ID]], 2;
call void @llvm.nvvm.barrier.sync.cnt(i32 %id, i32 2)
; CHECK: barrier.sync [[ID]], 32;
call void @llvm.nvvm.barrier.sync.cnt(i32 %id, i32 32)
; CHECK: barrier.sync 3, [[CNT]];
call void @llvm.nvvm.barrier.sync.cnt(i32 3, i32 %cnt)
; CHECK: barrier.sync 4, 5;
call void @llvm.nvvm.barrier.sync.cnt(i32 4, i32 5)
; CHECK: barrier.sync 4, 64;
call void @llvm.nvvm.barrier.sync.cnt(i32 4, i32 64)
; CHECK: barrier.sync [[ID]];
call void @llvm.nvvm.barrier.sync(i32 %id)