[PATCH] D109228: [AMDGPU][GlobalISel] Legalize G_MUL for non-standard types

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 6 07:12:54 PDT 2021


foad added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h:305
+/// True iff the specified type index is a scalar whose size is not a multiple
+/// of 32.
+LegalityPredicate sizeNotMultipleOf(unsigned TypeIdx, unsigned Size);
----------------
Update comment.


================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h:364
+/// Widen the scalar type or vector element type for the given type index to the
+/// next multiple of 32.
+LegalizeMutation widenScalarOrEltToNextMultiple32(unsigned TypeIdx, unsigned Min = 0);
----------------
Update comments to remove 32.


================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h:365
+/// next multiple of 32.
+LegalizeMutation widenScalarOrEltToNextMultiple32(unsigned TypeIdx, unsigned Min = 0);
+
----------------
I would suggest to add Size as a parameter here also, instead of hardcoding 32. Also remove Min unless/until there is a need for it?


================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h:847
 
+  LegalizeRuleSet &widenScalarToNextMultiple32(unsigned TypeIdx,
+                                               unsigned MinSize = 0) {
----------------
Add Size as a parameter and remove MinSize?


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

https://reviews.llvm.org/D109228



More information about the llvm-commits mailing list