[InstSimplify] Handle selects of GEPs with 0 offset
authorGeorge Burgess IV <george.burgess.iv@gmail.com>
Mon, 1 May 2017 23:12:08 +0000 (23:12 +0000)
committerGeorge Burgess IV <george.burgess.iv@gmail.com>
Mon, 1 May 2017 23:12:08 +0000 (23:12 +0000)
commit6935aefdf0fdfd2641ebb27dd3b1aa6e5e2fe4ab
tree343373de422e077249551d387193c708200f1441
parent8d196c88a6eaa12239a6fdb45f4d1a28be7192d4
[InstSimplify] Handle selects of GEPs with 0 offset

In particular (since it wouldn't fit nicely in the summary):
(select (icmp eq V 0) P (getelementptr P V)) -> (getelementptr P V)

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

llvm-svn: 301880
llvm/lib/Analysis/InstructionSimplify.cpp
llvm/test/Transforms/InstSimplify/select.ll