================ @@ -984,7 +1041,7 @@ Value *InstCombinerImpl::SimplifyDemandedUseBits(Value *V, APInt DemandedMask, // If the client is only demanding bits that we know, return the known // constant. - if (DemandedMask.isSubsetOf(Known.Zero|Known.One)) + if (MaySimplifyAsConstant && DemandedMask.isSubsetOf(Known.Zero | Known.One)) ---------------- goldsteinn wrote:
Ill add that as a todo. Although maybe indicative we want to the flag to be based on the exact intrin as opposed to `isPointer` as different intrins may have different preference. For `@llvm.ptrmask` for example. we can easily represent the most common constant (`null`) by just zeroing the mask so there isn't much benefit to constant return. But for other intrins might be different. https://github.com/llvm/llvm-project/pull/67166 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits