[PATCH] D45315: [X86] Improve unsigned saturation downconvert detection.
Artur Gainullin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 30 12:16:09 PDT 2018
ArturGainullin added a comment.
(truncate (smin (smax (x, C1), C2)) to dest_type)
is equivalent to
(truncate (umin (smax(x, C1), unsigned_max_of_dest_type)) to dest_type)
that is why I don't need to create any node and just return smax.
But in case of
(truncate (smax (smin (x, C2), C1)) to dest_type)
which is also equivalent to
(truncate (umin (smax(x, C1), unsigned_max_of_dest_type)) to dest_type)
I need to create new smax node and return it.
Repository:
rL LLVM
https://reviews.llvm.org/D45315
More information about the llvm-commits
mailing list