From e87e1c6cdd893cf7481029acb030d90cbd4b3e87 Mon Sep 17 00:00:00 2001 From: Justin Lebar Date: Tue, 22 Mar 2016 22:08:01 +0000 Subject: [PATCH] [NVVM] Remove noduplicate attribute from synchronizing intrinsics. Summary: I've completed my audit of all the code that looks at noduplicate and added handling of convergent where appropriate, so we no longer need noduplicate on these intrinsics. Reviewers: jholewinski Subscribers: llvm-commits, jholewinski Differential Revision: http://reviews.llvm.org/D18168 llvm-svn: 264107 --- llvm/include/llvm/IR/IntrinsicsNVVM.td | 14 +++++--------- llvm/test/Feature/intrinsic-noduplicate.ll | 4 ++-- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/llvm/include/llvm/IR/IntrinsicsNVVM.td b/llvm/include/llvm/IR/IntrinsicsNVVM.td index b0de7ba..e3c6970 100644 --- a/llvm/include/llvm/IR/IntrinsicsNVVM.td +++ b/llvm/include/llvm/IR/IntrinsicsNVVM.td @@ -729,20 +729,16 @@ def llvm_anyi64ptr_ty : LLVMAnyPointerType; // (space)i64* [IntrReadWriteArgMem, NoCapture<0>]>; // Bar.Sync -// -// TODO: Remove NoDuplicate here after fixing up LLVM to handle convergent -// properly. See discussion in http://reviews.llvm.org/D16941 and -// http://reviews.llvm.org/D12246. def int_cuda_syncthreads : GCCBuiltin<"__syncthreads">, - Intrinsic<[], [], [IntrNoDuplicate, IntrConvergent]>; + Intrinsic<[], [], [IntrConvergent]>; def int_nvvm_barrier0 : GCCBuiltin<"__nvvm_bar0">, - Intrinsic<[], [], [IntrNoDuplicate, IntrConvergent]>; + Intrinsic<[], [], [IntrConvergent]>; def int_nvvm_barrier0_popc : GCCBuiltin<"__nvvm_bar0_popc">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoDuplicate, IntrConvergent]>; + Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrConvergent]>; def int_nvvm_barrier0_and : GCCBuiltin<"__nvvm_bar0_and">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoDuplicate, IntrConvergent]>; + Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrConvergent]>; def int_nvvm_barrier0_or : GCCBuiltin<"__nvvm_bar0_or">, - Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrNoDuplicate, IntrConvergent]>; + Intrinsic<[llvm_i32_ty], [llvm_i32_ty], [IntrConvergent]>; // Membar def int_nvvm_membar_cta : GCCBuiltin<"__nvvm_membar_cta">, diff --git a/llvm/test/Feature/intrinsic-noduplicate.ll b/llvm/test/Feature/intrinsic-noduplicate.ll index 1ffe6ac..3700262 100644 --- a/llvm/test/Feature/intrinsic-noduplicate.ll +++ b/llvm/test/Feature/intrinsic-noduplicate.ll @@ -1,9 +1,9 @@ ; RUN: llvm-as < %s | llvm-dis | FileCheck %s -; Make sure LLVM knows about the convergent and noduplicate attributes on the +; Make sure LLVM knows about the convergent attribute on the ; llvm.cuda.syncthreads intrinsic. declare void @llvm.cuda.syncthreads() ; CHECK: declare void @llvm.cuda.syncthreads() #[[ATTRNUM:[0-9]+]] -; CHECK: attributes #[[ATTRNUM]] = { convergent noduplicate nounwind } +; CHECK: attributes #[[ATTRNUM]] = { convergent nounwind } -- 2.7.4