]> granicus.if.org Git - llvm/commit
[InstCombine] Shift amount reassociation in bittest: relax one-use check when shiftin...
authorRoman Lebedev <lebedev.ri@gmail.com>
Sat, 10 Aug 2019 19:28:54 +0000 (19:28 +0000)
committerRoman Lebedev <lebedev.ri@gmail.com>
Sat, 10 Aug 2019 19:28:54 +0000 (19:28 +0000)
commit80815a1a9000d0a3457691434a54d9281f429ad2
treead3d2bc29bda799ccb6b1ba76565bc0f25e3eb46
parent2a686e81e517d69f5eee88fc592fa988952f81d6
[InstCombine] Shift amount reassociation in bittest: relax one-use check when shifting constant

If one of the values being shifted is a constant, since the new shift
amount is known-constant, the new shift will end up being constant-folded
so, we don't need that one-use restriction then.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368519 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstCombineCompares.cpp
test/Transforms/InstCombine/shift-amount-reassociation-in-bittest.ll