Skip to content

Commit

Permalink
[AArch64][GlobalISel] Libcall i128 srem/urem and scalarize more vecto…
Browse files Browse the repository at this point in the history
…r types.

This better handles i128 scalar and vector types, and allows some of the other
odd-sized-vectors to successfully lower under GISel.
  • Loading branch information
davemgreen authored and dmpolukhin committed Sep 2, 2024
1 parent 77c86d0 commit 2fd8f85
Show file tree
Hide file tree
Showing 2 changed files with 899 additions and 456 deletions.
6 changes: 3 additions & 3 deletions llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,12 @@ AArch64LegalizerInfo::AArch64LegalizerInfo(const AArch64Subtarget &ST)

getActionDefinitionsBuilder({G_SREM, G_UREM, G_SDIVREM, G_UDIVREM})
.lowerFor({s8, s16, s32, s64, v2s64, v4s32, v2s32})
.libcallFor({s128})
.widenScalarOrEltToNextPow2(0)
.clampScalarOrElt(0, s32, s64)
.minScalarOrElt(0, s32)
.clampNumElements(0, v2s32, v4s32)
.clampNumElements(0, v2s64, v2s64)
.moreElementsToNextPow2(0);

.scalarize(0);

getActionDefinitionsBuilder({G_SMULO, G_UMULO})
.widenScalarToNextPow2(0, /*Min = */ 32)
Expand Down
Loading

0 comments on commit 2fd8f85

Please sign in to comment.