[llvm] r365294 - [AMDGPU] Use a named predicate instead of a magic number.
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 8 00:04:58 PDT 2019
Author: foad
Date: Mon Jul 8 00:04:58 2019
New Revision: 365294
URL: http://llvm.org/viewvc/llvm-project?rev=365294&view=rev
Log:
[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
Modified:
llvm/trunk/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp
Modified: llvm/trunk/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp?rev=365294&r1=365293&r2=365294&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp (original)
+++ llvm/trunk/lib/Target/AMDGPU/AMDGPUAtomicOptimizer.cpp Mon Jul 8 00:04:58 2019
@@ -248,10 +248,9 @@ void AMDGPUAtomicOptimizer::optimizeAtom
// 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
More information about the llvm-commits
mailing list