aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib
diff options
context:
space:
mode:
authorDavid Green <david.green@arm.com>2024-11-17 08:25:53 +0000
committerDavid Green <david.green@arm.com>2024-11-17 08:25:53 +0000
commit49b29368f72c493e61506b4203e7852f55e17062 (patch)
treebbf635ecbe015bc3a47aff04592e29200c7a858e /llvm/lib
parent5b1b6a62b8bd986adc711d0c0be5b6a8182be263 (diff)
downloadllvm-49b29368f72c493e61506b4203e7852f55e17062.zip
llvm-49b29368f72c493e61506b4203e7852f55e17062.tar.gz
llvm-49b29368f72c493e61506b4203e7852f55e17062.tar.bz2
[AArch64][GlobalISel] Expand handling of phi operations
Like other operations, non-power-2 vectors are widened to a power-2, larger vectors with i128 elements are scalarized and smaller vectors are widened to be at least 64bit.
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp b/llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
index d42ecc1..baa4230 100644
--- a/llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
+++ b/llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
@@ -109,11 +109,12 @@ AArch64LegalizerInfo::AArch64LegalizerInfo(const AArch64Subtarget &ST)
.legalFor({p0, s16, s32, s64})
.legalFor(PackedVectorAllTypeList)
.widenScalarToNextPow2(0)
+ .moreElementsToNextPow2(0)
+ .scalarizeIf(scalarOrEltWiderThan(0, 64), 0)
.clampScalar(0, s16, s64)
- // Maximum: sN * k = 128
- .clampMaxNumElements(0, s8, 16)
- .clampMaxNumElements(0, s16, 8)
- .clampMaxNumElements(0, s32, 4)
+ .clampNumElements(0, v8s8, v16s8)
+ .clampNumElements(0, v4s16, v8s16)
+ .clampNumElements(0, v2s32, v4s32)
.clampMaxNumElements(0, s64, 2)
.clampMaxNumElements(0, p0, 2);