[llvm] 58286f9 - Revert "[ConstraintElim] Treat ConstantPointerNull as constant offset 0."

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 22 13:57:19 PST 2023


Author: Florian Hahn
Date: 2023-11-22T21:56:06Z
New Revision: 58286f9c665ad4aa748779d559f2f296de704094

URL: https://github.com/llvm/llvm-project/commit/58286f9c665ad4aa748779d559f2f296de704094
DIFF: https://github.com/llvm/llvm-project/commit/58286f9c665ad4aa748779d559f2f296de704094.diff

LOG: Revert "[ConstraintElim] Treat ConstantPointerNull as constant offset 0."

This reverts commit 23628137ea9e7a2942d6a691ea74a7697564e65b.

Revert as this is causing some test failures.

Added: 
    

Modified: 
    llvm/lib/Transforms/Scalar/ConstraintElimination.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp b/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
index 2c83c4ad452fffa..7aadd810c1da387 100644
--- a/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
+++ b/llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
@@ -455,9 +455,6 @@ static Decomposition decompose(Value *V,
   if (Ty->isPointerTy() && !IsSigned) {
     if (auto *GEP = dyn_cast<GEPOperator>(V))
       return decomposeGEP(*GEP, Preconditions, IsSigned, DL);
-    if (isa<ConstantPointerNull>(V))
-      return int64_t(0);
-
     return V;
   }
 


        


More information about the llvm-commits mailing list