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

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue Feb 15 03:04:40 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f35af77573d9e80bf6e61b3fdd20fe55191e962f
      https://github.com/llvm/llvm-project/commit/f35af77573d9e80bf6e61b3fdd20fe55191e962f
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-02-15 (Tue, 15 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.




More information about the All-commits mailing list