aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2025-03-13 09:58:46 +0700
committerGitHub <noreply@github.com>2025-03-13 09:58:46 +0700
commit95ab95fd10b2593afedcd53ba653381f35852ebc (patch)
tree6b393927f8170a4c95c08cbac51d9e86cfc78307 /llvm/lib
parenteea7d32bd262bb5f61790c42ebaa147aa26c3979 (diff)
downloadllvm-95ab95fd10b2593afedcd53ba653381f35852ebc.zip
llvm-95ab95fd10b2593afedcd53ba653381f35852ebc.tar.gz
llvm-95ab95fd10b2593afedcd53ba653381f35852ebc.tar.bz2
AMDGPU: Make rcp intrinsic propagate poison (#130913)
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp b/llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
index ef07681..6f65563 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
@@ -487,6 +487,8 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const {
switch (IID) {
case Intrinsic::amdgcn_rcp: {
Value *Src = II.getArgOperand(0);
+ if (isa<PoisonValue>(Src))
+ return IC.replaceInstUsesWith(II, Src);
// TODO: Move to ConstantFolding/InstSimplify?
if (isa<UndefValue>(Src)) {