Skip to content

Commit 7631ba3

Browse files
add comment line for readfirstlane
1 parent f802149 commit 7631ba3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/Target/AMDGPU/AMDGPUUniformIntrinsicCombine.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ static bool optimizeUniformIntrinsic(IntrinsicInst &II,
5757
const UniformityInfo &UI,
5858
ValueMap<const Value *, bool> &Tracker) {
5959
llvm::Intrinsic::ID IID = II.getIntrinsicID();
60+
/// We deliberately do not simplify readfirstlane with a uniform argument, so
61+
/// that frontends can use it to force a copy to SGPR and thereby prevent the
62+
/// backend from generating unwanted waterfall loops.
6063
switch (IID) {
6164
case Intrinsic::amdgcn_permlane64:
6265
case Intrinsic::amdgcn_readlane: {

0 commit comments

Comments
 (0)