Skip to content

Commit fadf3e7

Browse files
committed
[AMDGPU][GlobalISel] Update legalizer for G_ABS, G_SMIN, G_SMAX, G_UMIN, G_UMAX
There is no need to increase the size of odd sized vectors if they are going to be scalarized by a different rule. Patch by: Acim Maravic Differential Revision: https://reviews.llvm.org/D155865
1 parent e6e9a87 commit fadf3e7

File tree

6 files changed

+507
-29
lines changed

6 files changed

+507
-29
lines changed

llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1220,7 +1220,6 @@ AMDGPULegalizerInfo::AMDGPULegalizerInfo(const GCNSubtarget &ST_,
12201220
if (ST.hasVOP3PInsts()) {
12211221
getActionDefinitionsBuilder({G_SMIN, G_SMAX, G_UMIN, G_UMAX, G_ABS})
12221222
.legalFor({S32, S16, V2S16})
1223-
.moreElementsIf(isSmallOddVector(0), oneMoreElement(0))
12241223
.clampMaxNumElements(0, S16, 2)
12251224
.minScalar(0, S16)
12261225
.widenScalarToNextPow2(0)

0 commit comments

Comments
 (0)