diff options
author | Jay Foad <jay.foad@gmail.com> | 2019-07-08 07:04:58 +0000 |
---|---|---|
committer | Jay Foad <jay.foad@gmail.com> | 2019-07-08 07:04:58 +0000 |
commit | 38902350ef4a994bf47e2a248faaca9a93adb64e (patch) | |
tree | 82419d42920721bcb2874adc4630cb96a9ec4920 | |
parent | 1deca50ab1479d4721a9c01a6c5b82a39258abe5 (diff) | |
download | bcm5719-llvm-38902350ef4a994bf47e2a248faaca9a93adb64e.tar.gz bcm5719-llvm-38902350ef4a994bf47e2a248faaca9a93adb64e.zip |
[AMDGPU] Use a named predicate instead of a magic number.
Reviewers: arsenm
Reviewed By: arsenm
Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D64201
llvm-svn: 365294
-rw-r--r-- | llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp b/llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp index 1c503c29d55..810861503be 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp @@ -248,10 +248,9 @@ void AMDGPUAtomicOptimizer::optimizeAtomic(Instruction &I, // 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 |