aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2025-03-13 10:07:45 +0700
committerGitHub <noreply@github.com>2025-03-13 10:07:45 +0700
commit0a78bd67b311e418d44f3975b9fd9f62cdbe56c6 (patch)
tree06c0e93d253ae579bab2518d8f44362f070c419b /llvm/lib
parent4d8070e9560269494654bd21a2b0c342f4bdae48 (diff)
downloadllvm-0a78bd67b311e418d44f3975b9fd9f62cdbe56c6.zip
llvm-0a78bd67b311e418d44f3975b9fd9f62cdbe56c6.tar.gz
llvm-0a78bd67b311e418d44f3975b9fd9f62cdbe56c6.tar.bz2
AMDGPU: Make frexp_exp and frexp_mant intrinsics propagate poison (#130915)
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp b/llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
index 5314738..bf53018 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp
@@ -636,6 +636,9 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const {
return IC.replaceInstUsesWith(II, ConstantInt::get(II.getType(), Exp));
}
+ if (isa<PoisonValue>(Src))
+ return IC.replaceInstUsesWith(II, PoisonValue::get(II.getType()));
+
if (isa<UndefValue>(Src)) {
return IC.replaceInstUsesWith(II, UndefValue::get(II.getType()));
}