]> granicus.if.org Git - llvm/commitdiff
AMDGPU/GlobalISel: Remove unnecessary legality constraint for G_EXTRACT
authorTom Stellard <tstellar@redhat.com>
Tue, 24 Jul 2018 01:43:49 +0000 (01:43 +0000)
committerTom Stellard <tstellar@redhat.com>
Tue, 24 Jul 2018 01:43:49 +0000 (01:43 +0000)
Summary:
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.

Reviewers: arsenm

Reviewed By: arsenm

Subscribers: kzhuravl, wdng, nhaehnle, yaxunl, rovka, kristof.beyls, dstuttard, tpr, t-tye, llvm-commits

Differential Revision: https://reviews.llvm.org/D49600

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@337794 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp

index 2f357af3fc712d9561d5d62274f6e6dfd1e4d0fc..e06d2b5372f4aee75eff7129b8ba49c95b1f3554 100644 (file)
@@ -173,9 +173,6 @@ AMDGPULegalizerInfo::AMDGPULegalizerInfo(const GCNSubtarget &ST,
 
   // 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];