[PATCH] D87555: [DivRemPairs] Add an initial case for hoisting to a common predecessor.
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 13 06:04:23 PDT 2020
spatel added a comment.
In D87555#2270191 <https://reviews.llvm.org/D87555#2270191>, @spatel wrote:
> I'm not seeing why we need the guaranteed-to-execute checks with the proposed instruction movement. In general, div/rem are special because of their UB problems, but in this case we have:
>
> /// We can largely ignore the normal safety and cost constraints on speculation
> /// of these ops when we find a matching pair. This is because we are already
> /// guaranteed that any exceptions and most cost are already incurred by the
> /// first member of the pair.
>
> In other words, this is similar to hoisting a normal math binop once we find the other member of the pair.
Ah, never mind. I see it now. We are moving both div and rem.
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