[InstCombine] Strip bitcasts in GEP diff fold
authorNikita Popov <npopov@redhat.com>
Tue, 24 May 2022 14:08:21 +0000 (16:08 +0200)
committerNikita Popov <npopov@redhat.com>
Tue, 24 May 2022 14:12:01 +0000 (16:12 +0200)
commite6e0eb3bc89d054889c1c663ccf600581ed77c7e
tree7310ea941ecb6cca34af6dcf2f4197340b7c812d
parent3eab6c5911415ce1f9b72738025f8f5051b55c34
[InstCombine] Strip bitcasts in GEP diff fold

Bitcasts were stripped in one case, but not the other. Of course,
this no longer really matters with opaque pointers, but as I went
through the trouble of tracking this down, we may as well remove
one typed vs opaque pointer optimization discrepancy.
llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp
llvm/test/Transforms/InstCombine/getelementptr.ll
llvm/test/Transforms/InstCombine/sub-gep.ll