[InstCombine] add extra use constraint for shl-zext fold
authorSanjay Patel <spatel@rotateright.com>
Mon, 5 Aug 2019 16:04:07 +0000 (16:04 +0000)
committerSanjay Patel <spatel@rotateright.com>
Mon, 5 Aug 2019 16:04:07 +0000 (16:04 +0000)
commit1a29823b9c9a61ad4eb83e11886279c0b8680931
tree451abe7f154ac565a0e5ce03c7ce1ad647dc514d
parent392239296993090fd49d7a665e933ffc52e2068a
[InstCombine] add extra use constraint for shl-zext fold

As the test shows, we can end up with more instructions than
we started with if we don't include the extra-use check.

llvm-svn: 367880
llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
llvm/test/Transforms/InstCombine/shift.ll