]> granicus.if.org Git - llvm/commit
[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)
commit5c6e37cfc139383e87a3a07c325bb4189c84be48
treeb2e612947db5ba2f0217ff2ba2eebbb025c76e4d
parent8f6e6a59983df96724541ae17e9ddcef06b85a27
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367880 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineShifts.cpp
test/Transforms/InstCombine/shift.ll