[InstCombine] morph an existing instruction instead of creating a new one
authorSanjay Patel <spatel@rotateright.com>
Wed, 12 Apr 2017 15:11:33 +0000 (15:11 +0000)
committerSanjay Patel <spatel@rotateright.com>
Wed, 12 Apr 2017 15:11:33 +0000 (15:11 +0000)
commit33439f982bd6650c8b42574ade840983962e28a9
tree992857407bc702cdf7a31b2de0880a13862d6d4d
parent7184c44d66fdbe5876cf5c70f73cd1a76ef9628a
[InstCombine] morph an existing instruction instead of creating a new one

One potential way to make InstCombine (very slightly?) faster is to recycle instructions
when possible instead of creating new ones. It's not explicitly stated AFAIK, but we don't
consider this an "InstSimplify". We could, however, make a new layer to house transforms
like this if that makes InstCombine more manageable (just throwing out an idea; not sure
how much opportunity is actually here).

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

llvm-svn: 300067
llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
llvm/test/Transforms/InstCombine/select-cmp-br.ll
llvm/test/Transforms/LoopVectorize/if-conversion.ll
llvm/test/Transforms/SimplifyCFG/merge-cond-stores.ll