[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 19:24:50 +0000 (21:24 +0200)
commit5780611d7e044ef56c4214df2c236ef5e15545ab
tree31f0599583f0d0513c41aebc6e07a07c2e16e9db
parentd9f5d7b959de36085944d4a99a73f3053f953796
[InstCombine] Don't try converting opaque pointer bitcast to GEP

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]