[llvm] [AMDGPU] Constant folding of llvm.amdgcn.trig.preop (PR #98562)
Changpeng Fang via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 17 11:41:15 PDT 2024
================
@@ -1102,6 +1102,81 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const {
break;
}
+ case Intrinsic::amdgcn_trig_preop: {
+ // The intrinsic is declared with name mangling, but currently the
+ // instruction only exists for f64
+ if (!II.getType()->isDoubleTy())
+ break;
+
+ Value *Src = II.getArgOperand(0);
+ Value *Segment = II.getArgOperand(1);
+ if (isa<PoisonValue>(Src))
----------------
changpeng wrote:
Should be.
https://github.com/llvm/llvm-project/pull/98562
More information about the llvm-commits
mailing list