[InstCombine] visitBitCast(): do not crash on weird `bitcast <1 x i8*> to i8*`
authorRoman Lebedev <lebedev.ri@gmail.com>
Wed, 24 Jun 2020 18:12:09 +0000 (21:12 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Wed, 24 Jun 2020 21:58:53 +0000 (00:58 +0300)
commit381054a989ebd0b585fee46f2a01a7c5de10acf7
tree3dccf20e545e4f745706f0eb30257d04b09175c0
parent1e2691fe238b9b47dd3fa2c7a8874826ead45760
[InstCombine] visitBitCast(): do not crash on weird `bitcast <1 x i8*> to i8*`

Even if we know that RHS of a bitcast is a pointer,
we can't assume LHS is, because it might be
a single-element vector of pointer.
llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
llvm/test/Transforms/InstCombine/bitcast.ll