Skip to content

Commit

Permalink
[AMDGPU] Stop using LegacyLegalizerInfo. NFCI.
Browse files Browse the repository at this point in the history
Differential Revision: https://reviews.llvm.org/D103684
  • Loading branch information
jayfoad committed Jun 23, 2021
1 parent 157473a commit dfb8c08
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -501,11 +501,8 @@ AMDGPULegalizerInfo::AMDGPULegalizerInfo(const GCNSubtarget &ST_,

const LLT MinScalarFPTy = ST.has16BitInsts() ? S16 : S32;

auto &LegacyInfo = getLegacyLegalizerInfo();
LegacyInfo.setAction({G_BRCOND, S1},
LegacyLegalizeActions::Legal); // VCC branches
LegacyInfo.setAction({G_BRCOND, S32},
LegacyLegalizeActions::Legal); // SCC branches
// s1 for VCC branches, s32 for SCC branches.
getActionDefinitionsBuilder(G_BRCOND).legalFor({S1, S32});

// TODO: All multiples of 32, vectors of pointers, all v2s16 pairs, more
// elements for v3s16
Expand Down Expand Up @@ -653,8 +650,7 @@ AMDGPULegalizerInfo::AMDGPULegalizerInfo(const GCNSubtarget &ST_,
.widenScalarToNextPow2(0, 32)
.clampMaxNumElements(0, S32, 16);

LegacyInfo.setAction({G_FRAME_INDEX, PrivatePtr},
LegacyLegalizeActions::Legal);
getActionDefinitionsBuilder(G_FRAME_INDEX).legalFor({PrivatePtr});

// If the amount is divergent, we have to do a wave reduction to get the
// maximum value, so this is expanded during RegBankSelect.
Expand All @@ -664,7 +660,7 @@ AMDGPULegalizerInfo::AMDGPULegalizerInfo(const GCNSubtarget &ST_,
getActionDefinitionsBuilder(G_GLOBAL_VALUE)
.customIf(typeIsNot(0, PrivatePtr));

LegacyInfo.setAction({G_BLOCK_ADDR, CodePtr}, LegacyLegalizeActions::Legal);
getActionDefinitionsBuilder(G_BLOCK_ADDR).legalFor({CodePtr});

auto &FPOpActions = getActionDefinitionsBuilder(
{ G_FADD, G_FMUL, G_FMA, G_FCANONICALIZE})
Expand Down

0 comments on commit dfb8c08

Please sign in to comment.