[PATCH] D49600: AMDGPU/GlobalISel: Remove unnecessary legality constraint for G_EXTRACT

Tom Stellard via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 20 08:13:18 PDT 2018


tstellar created this revision.
tstellar added a reviewer: arsenm.
Herald added subscribers: t-tye, tpr, dstuttard, kristof.beyls, rovka, yaxunl, nhaehnle, wdng, kzhuravl.

We were marking G_EXTRACT operations unsupported if the output type
was larger than the input type.  I don't see how this could ever actually
happen, so I dropped the constraint.  Doing this makes it possible to
reuse the same legality code for G_INSERT.


Repository:
  rL LLVM

https://reviews.llvm.org/D49600

Files:
  lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp


Index: lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
===================================================================
--- lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
+++ lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
@@ -173,9 +173,6 @@
 
   // FIXME: Doesn't handle extract of illegal sizes.
   getActionDefinitionsBuilder(G_EXTRACT)
-    .unsupportedIf([=](const LegalityQuery &Query) {
-        return Query.Types[0].getSizeInBits() >= Query.Types[1].getSizeInBits();
-      })
     .legalIf([=](const LegalityQuery &Query) {
         const LLT &Ty0 = Query.Types[0];
         const LLT &Ty1 = Query.Types[1];


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49600.156489.patch
Type: text/x-patch
Size: 605 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180720/8bed9f6e/attachment.bin>


More information about the llvm-commits mailing list