[PATCH] D64201: [AMDGPU] Use a named predicate instead of a magic number.

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 8 00:04:47 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL365294: [AMDGPU] Use a named predicate instead of a magic number. (authored by foad, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D64201?vs=208014&id=208320#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64201/new/

https://reviews.llvm.org/D64201

Files:
  llvm/trunk/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp


Index: llvm/trunk/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp
===================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp
@@ -248,10 +248,9 @@
 
   // We need to know how many lanes are active within the wavefront, and we do
   // this by doing a ballot of active lanes.
-  CallInst *const Ballot =
-      B.CreateIntrinsic(Intrinsic::amdgcn_icmp,
-                        {B.getInt64Ty(), B.getInt32Ty()},
-                        {B.getInt32(1), B.getInt32(0), B.getInt32(33)});
+  CallInst *const Ballot = B.CreateIntrinsic(
+      Intrinsic::amdgcn_icmp, {B.getInt64Ty(), B.getInt32Ty()},
+      {B.getInt32(1), B.getInt32(0), B.getInt32(CmpInst::ICMP_NE)});
 
   // We need to know how many lanes are active within the wavefront that are
   // below us. If we counted each lane linearly starting from 0, a lane is


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64201.208320.patch
Type: text/x-patch
Size: 945 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190708/68c6e405/attachment.bin>


More information about the llvm-commits mailing list