Skip to content

Commit

Permalink
[AArch64][GlobalISel] Scalarize i128/fp128 vector loads/stores.
Browse files Browse the repository at this point in the history
Similar to other operations, we should scalarize these to allow the individual
elements to legalize.
  • Loading branch information
davemgreen committed Oct 8, 2024
1 parent 58ef1eb commit a11509c
Show file tree
Hide file tree
Showing 5 changed files with 553 additions and 322 deletions.
6 changes: 4 additions & 2 deletions llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,8 @@ AArch64LegalizerInfo::AArch64LegalizerInfo(const AArch64Subtarget &ST)
return std::pair(0, LLT::scalar(VecTy.getSizeInBits()));
})
.customIf(IsPtrVecPred)
.scalarizeIf(typeInSet(0, {v2s16, v2s8}), 0);
.scalarizeIf(typeInSet(0, {v2s16, v2s8}), 0)
.scalarizeIf(scalarOrEltWiderThan(0, 64), 0);

StoreActions
.customIf([=](const LegalityQuery &Query) {
Expand Down Expand Up @@ -463,7 +464,8 @@ AArch64LegalizerInfo::AArch64LegalizerInfo(const AArch64Subtarget &ST)
return std::pair(0, LLT::scalar(VecTy.getSizeInBits()));
})
.customIf(IsPtrVecPred)
.scalarizeIf(typeInSet(0, {v2s16, v2s8}), 0);
.scalarizeIf(typeInSet(0, {v2s16, v2s8}), 0)
.scalarizeIf(scalarOrEltWiderThan(0, 64), 0);

getActionDefinitionsBuilder(G_INDEXED_STORE)
// Idx 0 == Ptr, Idx 1 == Val
Expand Down
Loading

0 comments on commit a11509c

Please sign in to comment.