[Reassociate] Guard `add`-like `or` conversion into an `add` with profitability check
authorRoman Lebedev <lebedev.ri@gmail.com>
Wed, 4 Nov 2020 11:33:11 +0000 (14:33 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Wed, 4 Nov 2020 13:10:34 +0000 (16:10 +0300)
commit93f3d7f7b3a902ad9e90ef0d9bf147582a2cf620
treee36de0d5ea71f61f8a97656c9ff4ef648b74ca31
parent85ff2705cdea60e3cf8fc49af7588c78638ca04f
[Reassociate] Guard `add`-like `or` conversion into an `add` with profitability check

This is slightly better compile-time wise,
since we avoid potentially-costly knownbits analysis that will
ultimately not allow us to actually do anything with said `add`.
llvm/lib/Transforms/Scalar/Reassociate.cpp
llvm/test/Transforms/Reassociate/add-like-or.ll