[PATCH] D84533: AMDGPU/GlobalISel: Legalize s33 G_ADD, G_SUB and G_MUL
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 24 11:04:24 PDT 2020
arsenm added a comment.
I’ve been avoiding doing this since it’s really a workaround for narrowScalar not understanding what to do. Would it make more sense for narrow scalar to widen to the next multiple of 32 itself?
In D84533#2172336 <https://reviews.llvm.org/D84533#2172336>, @Petar.Avramovic wrote:
> > Would it make more sense for narrow scalar to widen to the next multiple of 32 itself?
>
> Probably yes, at least for add, sub and mul. It could calculate required scalar size and call widenScalar instead on reporting UnableToLegalize.
> I am not so sure if this would be correct in general, maybe some opcodes prefer next-power-of-2 instead of multiple of NarrowSize?
This isn't a general property of widenScalar itself, but the add/sub/mul handling knows it can produce the requested size by widening, those implementations can be responsible for inserting an extend to the intermediate size it requires
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84533/new/
https://reviews.llvm.org/D84533
More information about the llvm-commits
mailing list