[PATCH] D63060: [InstCombine] usub.sat(a, b) + b => umax(a, b) (PR42178)
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 9 08:27:54 PDT 2019
nikic added a comment.
In D63060#1535594 <https://reviews.llvm.org/D63060#1535594>, @lebedev.ri wrote:
> In D63060#1535589 <https://reviews.llvm.org/D63060#1535589>, @nikic wrote:
>
> > @lebedev.ri That looks like a bug in alive, `usub_sat i8 undef, 0x10` is not undef (we fold to zero).
>
>
> Humm, that could explain part of the issue, but is that somewhere in langref?
It's not explicitly mentioned, but rather a direct consequence of undef semantics: For usub_sat i8 undef, 0x10 to be undef, the following proposition would have to hold: For any X in i8 there exists an Y in i8 such that X == usub_sat Y, 0x10. However, for X = 0xff there is no such Y.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63060/new/
https://reviews.llvm.org/D63060
More information about the llvm-commits
mailing list