Skip to content

Commit

Permalink
[AMDGPU] Fix missing IsExact flag when expanding vector binary oper…
Browse files Browse the repository at this point in the history
…ator
  • Loading branch information
shiltian committed Mar 26, 2024
1 parent 5e6e40f commit 57eba6f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1594,6 +1594,11 @@ bool AMDGPUCodeGenPrepareImpl::visitBinaryOperator(BinaryOperator &I) {
}
}

if (auto *NewEltI = dyn_cast<Instruction>(NewElt))
if (PossiblyExactOperator::isPossiblyExactOpcode(
NewEltI->getOpcode()))
NewEltI->setIsExact(I.isExact());

NewDiv = Builder.CreateInsertElement(NewDiv, NewElt, N);
}
} else {
Expand Down

0 comments on commit 57eba6f

Please sign in to comment.