================ @@ -548,6 +548,8 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const { case Intrinsic::amdgcn_sqrt: case Intrinsic::amdgcn_rsq: { Value *Src = II.getArgOperand(0); + if (isa<PoisonValue>(Src)) + return IC.replaceInstUsesWith(II, Src); ---------------- arsenm wrote:
We've done this for a while for FP ops. I think the reasoning is that if the original value could have been a signaling nan or denormal, that would go through canonicalization. We're still guaranteeing a canonical value by returning a qnan (although technically we don't guarantee this for generic math ops, but I guess we can maintain it for target intrinsics) https://github.com/llvm/llvm-project/pull/130914 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits