[PATCH] D68643: [Codegen] Alter the default promotion for add_sat and sub_sat
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 8 13:15:01 PDT 2019
nikic accepted this revision.
nikic added a comment.
This revision is now accepted and ready to land.
LGTM
> This still uses the existing promotion when the promoted add/sub_sat is legal. In many situations (but not all) it would probably be better to just perform the new promotion.
I guess at least for the unsigned case, it would be reasonable to use the shift+sat expansion only if both the sat is legal *and* min/max is not legal. The umax+sub expansion at least is clearly better than usubsat + 3 shifts.
But that's probably better left for a followup patch.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68643/new/
https://reviews.llvm.org/D68643
More information about the llvm-commits
mailing list