[llvm] [WIP] Consider datalayout sentinel pointer value for isKnownNonZero check (PR #91769)
Rana Pratap Reddy via llvm-commits
llvm-commits at lists.llvm.org
Fri May 17 02:23:39 PDT 2024
================
@@ -3098,6 +3098,15 @@ bool isKnownNonZero(const Value *V, const APInt &DemandedElts,
// Check for pointer simplifications.
if (PointerType *PtrTy = dyn_cast<PointerType>(Ty)) {
+ const DataLayout &DL = Q.DL;
+ if (DL.isSentinelValueDefined() && PtrTy) {
----------------
ranapratap55 wrote:
> Fold to return of boolean expression
> PtrTy check is redundant
removed PtrTy check and updated fold to return.
https://github.com/llvm/llvm-project/pull/91769
More information about the llvm-commits
mailing list