[PATCH] D151878: [GlobalIsel][X86] Update legalization of G_ADD/G_SUB
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 1 10:25:05 PDT 2023
arsenm added a comment.
> I'm not certain if the legalizer API has a better way we can do this?
I'm not super happy with the legalize rules API. I think it's over-constraining. In particular I don't see the point of having separate fewer/more actions. We could just have one ChangeType/ChangeElement action.
The clamping is also really annoying in the common case where you don't want intermediate non-power-of-2s as you've noticed. Some of the existing rule orderings are also working around missing paths in the legalizer, some of which are fixed. For example if you clamp a non-power-of-2 operation, the requested type ends up being the upper bound of the range and fails for implementations that only handle evenly divisible cases
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D151878/new/
https://reviews.llvm.org/D151878
More information about the llvm-commits
mailing list