[PATCH] D152730: [ConstraintElim] Add A < B if A is an increasing phi for A != B.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 7 09:32:41 PDT 2023


fhahn updated this revision to Diff 538175.
fhahn marked 11 inline comments as done.
fhahn added a comment.

Address latest comments, thanks!

In D152730#4480152 <https://reviews.llvm.org/D152730#4480152>, @nikic wrote:

>> This patch adds additional logic to add additional facts for A != B, if
>> A is a monotonically increasing induction phi. The motivating use case
>> for this is removing checks when using iterators with hardened libc++,
>> e.g. https://godbolt.org/z/zhKEP37vG.
>
> Looks like on trunk this doesn't emit bounds checks in the first place...

I think that's because the macro name changed in be02f912d6b9b515a1d1b30cf06dfff1c085ea34 <https://reviews.llvm.org/rGbe02f912d6b9b515a1d1b30cf06dfff1c085ea34>  . Here's an updated link: https://godbolt.org/z/qfqq9E3nK


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152730/new/

https://reviews.llvm.org/D152730

Files:
  llvm/lib/Transforms/Scalar/ConstraintElimination.cpp
  llvm/test/Other/new-pm-defaults.ll
  llvm/test/Other/new-pm-lto-defaults.ll
  llvm/test/Other/new-pm-thinlto-postlink-defaults.ll
  llvm/test/Other/new-pm-thinlto-prelink-defaults.ll
  llvm/test/Transforms/ConstraintElimination/analysis-invalidation.ll
  llvm/test/Transforms/ConstraintElimination/and-implied-by-operands.ll
  llvm/test/Transforms/ConstraintElimination/monotonic-pointer-phis-constant-upper-offset.ll
  llvm/test/Transforms/ConstraintElimination/monotonic-pointer-phis-custom-datalayout.ll
  llvm/test/Transforms/ConstraintElimination/monotonic-pointer-phis-early-exits.ll
  llvm/test/Transforms/ConstraintElimination/monotonic-pointer-phis-struct-types.ll
  llvm/test/Transforms/ConstraintElimination/monotonic-pointer-phis.ll
  llvm/test/Transforms/PhaseOrdering/iterator-with-runtime-check.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152730.538175.patch
Type: text/x-patch
Size: 36476 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230707/a5a45100/attachment-0001.bin>


More information about the llvm-commits mailing list