Skip to content

Commit 02cb7c9

Browse files
committed
[AArch64][GlobalISel] Libcall i128 srem/urem and scalarize more vector types.
This better handles i128 scalar and vector types, and allows some of the other odd-sized-vectors to successfully lower under GISel.
1 parent 93a9406 commit 02cb7c9

File tree

2 files changed

+899
-456
lines changed

2 files changed

+899
-456
lines changed

llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,12 +196,12 @@ AArch64LegalizerInfo::AArch64LegalizerInfo(const AArch64Subtarget &ST)
196196

197197
getActionDefinitionsBuilder({G_SREM, G_UREM, G_SDIVREM, G_UDIVREM})
198198
.lowerFor({s8, s16, s32, s64, v2s64, v4s32, v2s32})
199+
.libcallFor({s128})
199200
.widenScalarOrEltToNextPow2(0)
200-
.clampScalarOrElt(0, s32, s64)
201+
.minScalarOrElt(0, s32)
201202
.clampNumElements(0, v2s32, v4s32)
202203
.clampNumElements(0, v2s64, v2s64)
203-
.moreElementsToNextPow2(0);
204-
204+
.scalarize(0);
205205

206206
getActionDefinitionsBuilder({G_SMULO, G_UMULO})
207207
.widenScalarToNextPow2(0, /*Min = */ 32)

0 commit comments

Comments
 (0)