[PATCH] D73051: [GlobalISel][AMDGPU] Saturating add/subtract
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 20 13:32:17 PST 2020
arsenm added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp:4532
+
+ if (isSupported({TargetOpcode::G_UMIN, {Ty, Ty}})) {
+ // uadd.sat(a, b) -> a + umin(~a, b)
----------------
I think it would also be beneficial to implement this in terms of two helper functions for the two different expansions. That way it's more flexible if a target wants to contextually use different strategies in a custom lowering
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D73051/new/
https://reviews.llvm.org/D73051
More information about the llvm-commits
mailing list