Skip to content

Commit

Permalink
AMDGPU/GlobalISel: Reorder G_CONSTANT legality rules
Browse files Browse the repository at this point in the history
The legal cases should be the first rules.
  • Loading branch information
arsenm committed Jul 26, 2020
1 parent bcf5184 commit 7c09c17
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
Expand Up @@ -525,9 +525,9 @@ AMDGPULegalizerInfo::AMDGPULegalizerInfo(const GCNSubtarget &ST_,
getActionDefinitionsBuilder(G_CONSTANT)
.legalFor({S1, S32, S64, S16, GlobalPtr,
LocalPtr, ConstantPtr, PrivatePtr, FlatPtr })
.legalIf(isPointer(0))
.clampScalar(0, S32, S64)
.widenScalarToNextPow2(0)
.legalIf(isPointer(0));
.widenScalarToNextPow2(0);

getActionDefinitionsBuilder(G_FCONSTANT)
.legalFor({S32, S64, S16})
Expand Down

0 comments on commit 7c09c17

Please sign in to comment.