stripAndAccumulateConstantOffsets used to walk through every bitcast operand. If the operand was not a pointer (e.g. a same-sized byte type such as b64 reinterpreted as ptr), the walk could continue and violate the invariant that the stripped value remains ptr or ptr-vector. Align with stripPointerCastsAndOffsets: only look through bitcasts whose source type is a pointer or pointer vector; keep addrspacecast as its own case. This commit is needed in PR #177908, and fixes issue https://github.com/llvm/llvm-project/issues/203695. Assisted by Cursor