[all-commits] [llvm/llvm-project] 08ad9a: [InstSimplify] Strip offsets once in computePointe...

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Feb 21 14:22:03 PST 2022


  Branch: refs/heads/release/14.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 08ad9ae10f327e3a511f1df7423f508103df1525
      https://github.com/llvm/llvm-project/commit/08ad9ae10f327e3a511f1df7423f508103df1525
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-02-21 (Mon, 21 Feb 2022)

  Changed paths:
    M llvm/lib/Analysis/InstructionSimplify.cpp

  Log Message:
  -----------
  [InstSimplify] Strip offsets once in computePointerICmp()

Instead of doing an inbounds strip first and another non-inbounds
strip afterward for equality comparisons, directly do a single
inbounds or non-inbounds strip based on whether we have an equality
predicate or not.

This is NFC-ish in that the alloca equality codepath is the only
part that sees additional non-inbounds offsets now, and for that
codepath it doesn't matter whether or not the GEP is inbounds, as
it does a stronger check itself. InstCombine would infer inbounds
for such GEPs.

(cherry picked from commit f35af77573d9e80bf6e61b3fdd20fe55191e962f)




More information about the All-commits mailing list