[llvm] [WIP] Consider datalayout sentinel pointer value for isKnownNonZero check (PR #91769)

via llvm-commits llvm-commits at lists.llvm.org
Fri May 17 02:24:18 PDT 2024


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff 64d4ade3bb7d0d8cc87a777f4964e68f2f25edf9 24dbbe4fb2a22894d7480bb4aad00e68cf513380 -- llvm/lib/Analysis/ValueTracking.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp
index 978b142819..d890ae83d1 100644
--- a/llvm/lib/Analysis/ValueTracking.cpp
+++ b/llvm/lib/Analysis/ValueTracking.cpp
@@ -3099,9 +3099,9 @@ bool isKnownNonZero(const Value *V, const APInt &DemandedElts,
 
   if (PointerType *PtrTy = dyn_cast<PointerType>(Ty)) {
     const DataLayout &DL = Q.DL;
-     if (DL.isSentinelValueDefined()) {
+    if (DL.isSentinelValueDefined()) {
       unsigned AddrSpace = PtrTy->getPointerAddressSpace();
-      
+
       return (DL.getSentinelPointerValue(AddrSpace) != 0);
     }
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/91769


More information about the llvm-commits mailing list