[PATCH] D102391: [AMDGPU][GlobalISel] Legalize G_ABS

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 20 03:58:11 PDT 2021


foad added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp:977
+
+    getActionDefinitionsBuilder(G_ABS)
+      .legalFor({S32, S16})
----------------
Merge this with the G_SMIN, G_SMAX, G_UMIN, G_UMAX handling above, which is slightly better because it will widen e.g. s8 to s16 and s24 to s32, instead of lowering them.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp:1000
+
+    getActionDefinitionsBuilder(G_ABS)
+      .legalFor({S32})
----------------
Same here, mege it with the slightly better G_SMIN, G_SMAX, G_UMIN, G_UMAX handling above.


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

https://reviews.llvm.org/D102391



More information about the llvm-commits mailing list