[InstCombine] Host inversion out of ashr's value operand (PR48995)
authorRoman Lebedev <lebedev.ri@gmail.com>
Tue, 2 Feb 2021 13:59:47 +0000 (16:59 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Tue, 2 Feb 2021 14:56:43 +0000 (17:56 +0300)
commit485c4b552b71aff21fc27ce958c2d8ea4cebba99
tree47b51e4bbe6ece57c07875de2dde3285401834a3
parente6a061ed9f94218197d87959066d5c6dd1f51f79
[InstCombine] Host inversion out of ashr's value operand (PR48995)

This is a yet another hint that we will eventually need InstCombineInverter,
which would consistently sink inversions, but but for that we'll need
to consistently hoist inversions where possible, so let's do that here.

Example of a proof: https://alive2.llvm.org/ce/z/78SbDq

See https://bugs.llvm.org/show_bug.cgi?id=48995
llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
llvm/test/Transforms/InstCombine/hoist-not-from-ashr-operand.ll