[PATCH] D87555: [DivRemPairs] Add an initial case for hoisting to a common predecessor.

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 12 00:42:58 PDT 2020


lebedev.ri added a comment.

In D87555#2269363 <https://reviews.llvm.org/D87555#2269363>, @craig.topper wrote:

> In D87555#2269355 <https://reviews.llvm.org/D87555#2269355>, @lebedev.ri wrote:
>
>> Can we use `DominatorTree::findNearestCommonDominator()`?
>> If not, please add a negative test, where it's unsafe to do so.
>
> The nearest common dominator could put the division on a path that it wasn't going to execute on right? Isn't that not just possibly unsafe but also possibly unprofitable?

Yep, that's why i'm asking for a negative test - we then could hoist it past the check for divisor being `0`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87555/new/

https://reviews.llvm.org/D87555



More information about the llvm-commits mailing list