[ValueTracking] Simplify llvm::isPointerOffset()
authorArthur Eubanks <aeubanks@google.com>
Thu, 24 Feb 2022 23:30:23 +0000 (15:30 -0800)
committerArthur Eubanks <aeubanks@google.com>
Mon, 14 Mar 2022 16:32:36 +0000 (09:32 -0700)
commit55cf09ae2600066045ad9f9d81b330bc4d52b7e4
tree8bd3f07e155e9c24385b061bb31a2e9e71894b7b
parentf6484bd3b04ce5f00ff314ac88431990240866bc
[ValueTracking] Simplify llvm::isPointerOffset()

We still need the code after stripAndAccumulateConstantOffsets() since
it doesn't handle GEPs of scalable types and non-constant but identical
indexes.

Differential Revision: https://reviews.llvm.org/D120523
llvm/lib/Analysis/ValueTracking.cpp
llvm/test/Transforms/MemCpyOpt/opaque-ptr.ll