[llvm] [AArch64][GISel] Support SVE with 128-bit min-size for G_LOAD and G_STORE (PR #92130)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Tue May 21 15:02:29 PDT 2024
================
@@ -652,17 +652,17 @@ bool GIMatchTableExecutor::executeMatchTable(
MachineMemOperand *MMO =
*(State.MIs[InsnID]->memoperands_begin() + MMOIdx);
- unsigned Size = MRI.getType(MO.getReg()).getSizeInBits();
+ const auto Size = MRI.getType(MO.getReg()).getSizeInBits();
if (MatcherOpcode == GIM_CheckMemorySizeEqualToLLT &&
- MMO->getSizeInBits().getValue() != Size) {
+ MMO->getSizeInBits() != Size) {
if (handleReject() == RejectAndGiveUp)
return false;
} else if (MatcherOpcode == GIM_CheckMemorySizeLessThanLLT &&
- MMO->getSizeInBits().getValue() >= Size) {
+ MMO->getSizeInBits().getValue() >= Size.getKnownMinValue()) {
----------------
davemgreen wrote:
I believe these should either use TypeSize::isKnownGE or test that the types are equally scalable.
The Size in GIM_CheckMemorySizeEqualTo should maybe be scalable too, although as far as I understand none of that is used at the moment.
https://github.com/llvm/llvm-project/pull/92130
More information about the llvm-commits
mailing list