[llvm] [ConstraintElimination] Elide redundant bounds checks in canonical loops (PR #221028)
Alina Sbirlea via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 12 22:56:09 PDT 2026
================
@@ -556,6 +556,15 @@ static Decomposition decompose(Value *V, const ConstraintInfo &Info,
if (!Ty->isIntegerTy() || Ty->getIntegerBitWidth() > 64)
return V;
+ if (!IsSigned) {
+ Value *PtrOp;
+ if (match(V, m_PtrToInt(m_Value(PtrOp))) &&
+ DL.getTypeSizeInBits(Ty) ==
+ DL.getIndexTypeSizeInBits(PtrOp->getType())) {
+ return decompose(PtrOp, Info, IsSigned, DL);
+ }
----------------
alinas wrote:
Yes, I think you're right and it's not needed to match ptrtoint - still need to understand if I need to match ptrtoaddr.
https://github.com/llvm/llvm-project/pull/221028
More information about the llvm-commits
mailing list