[llvm] b6183a5 - [NVPTX] Fix barrier.ll LIT test

Andrew Savonichev via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 14 07:08:18 PDT 2022


Author: Andrew Savonichev
Date: 2022-04-14T17:07:53+03:00
New Revision: b6183a57a10b03bdad83e4bef02990673c155011

URL: https://github.com/llvm/llvm-project/commit/b6183a57a10b03bdad83e4bef02990673c155011
DIFF: https://github.com/llvm/llvm-project/commit/b6183a57a10b03bdad83e4bef02990673c155011.diff

LOG: [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

Added: 
    

Modified: 
    llvm/test/CodeGen/NVPTX/barrier.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/NVPTX/barrier.ll b/llvm/test/CodeGen/NVPTX/barrier.ll
index 2e80810d43aaf..b84575bb303bf 100644
--- a/llvm/test/CodeGen/NVPTX/barrier.ll
+++ b/llvm/test/CodeGen/NVPTX/barrier.ll
@@ -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)


        


More information about the llvm-commits mailing list