[PATCH] D59066: [TargetLowering] improve the default expansion of uaddsat/usubsat

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 12 12:35:10 PDT 2019


nikic added a comment.

@spatel D59174 <https://reviews.llvm.org/D59174> is not AArch64 specific and covers what this patch does, but only for the case where VSELECT is expanded. An alternative would be to add a combine for `vselect zero_or_neg_one, neg_one, x -> zero_or_neg_one | x` and `vselect zero_or_neg_one, 0, x -> ~zero_or_neg_one & x`, though it's arguable whether the latter is an improvement in general.

Also okay with what this patch does, but the other test changes from D59174 <https://reviews.llvm.org/D59174> show that the pattern can also occur in other cases, so we might want to handle it more generally.


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

https://reviews.llvm.org/D59066





More information about the llvm-commits mailing list