[InstCombine] peek through bitcasted vector/array pointer GEP operand
authorSanjay Patel <spatel@rotateright.com>
Wed, 18 Apr 2018 00:36:40 +0000 (00:36 +0000)
committerSanjay Patel <spatel@rotateright.com>
Wed, 18 Apr 2018 00:36:40 +0000 (00:36 +0000)
commitaea15131dbaeae56ab2b084a25f4e184dcfeede3
treea4c83a36d981d9b8515b378a9c37cf24f846b09b
parent37a9269cc75a03665ab78eeff4cead1509e1770d
[InstCombine] peek through bitcasted vector/array pointer GEP operand

The bitcast may be interfering with other combines or vectorization
as shown in PR16739:
https://bugs.llvm.org/show_bug.cgi?id=16739

Most pointer-related optimizations are probably able to look through
this bitcast, but removing the bitcast shrinks the IR, so it's at
least a size savings.

Differential Revision: https://reviews.llvm.org/D44833

llvm-svn: 330237
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
llvm/test/Transforms/InstCombine/gep-vector.ll