Reapply [InstCombine] Don't try converting opaque pointer bitcast to GEP
authorNikita Popov <nikita.ppv@gmail.com>
Mon, 21 Jun 2021 18:35:30 +0000 (20:35 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Mon, 21 Jun 2021 20:15:56 +0000 (22:15 +0200)
commit39796e1ad02a45b09ac3ef9e3dc1906f28804a91
tree18e4c9d5d296802b9a839a346a9e38c3ed65e681
parentd9cf8291e7ef26317c13ed9a4e9bd88855166d5d
Reapply [InstCombine] Don't try converting opaque pointer bitcast to GEP

Reapplied without changes -- this was reverted together with an
underlying patch.

-----

Bitcasts having opaque pointer source or result type cannot be
converted into a zero-index GEP, GEP source and result types
always have the same opaque-ness.
llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
llvm/test/Transforms/InstCombine/opaque-ptr.ll [new file with mode: 0644]