[InstCombine] add one-use check to cast+select narrowing transform
authorSanjay Patel <spatel@rotateright.com>
Fri, 3 Jul 2020 15:52:52 +0000 (11:52 -0400)
committerSanjay Patel <spatel@rotateright.com>
Fri, 3 Jul 2020 15:54:09 +0000 (11:54 -0400)
commit63774642af1efb127c6e3eafdd44eadc54647141
treea02eb3a74a980bbf2263ba99b995e61c23678421
parent0cd0ae1f29ddaeaed8a9ada513d98f352bc97b46
[InstCombine] add one-use check to cast+select narrowing transform

Prevent increasing the instruction count.
llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
llvm/test/Transforms/InstCombine/select-bitext.ll
llvm/test/Transforms/InstCombine/select-ctlz-to-cttz.ll