Skip to content

[AArch64] Add immediate range checks for more MTE instructions #119216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2555,6 +2555,14 @@ unsigned AArch64InstrInfo::getLoadStoreImmIdx(unsigned Opc) {
case AArch64::ST4H_IMM:
case AArch64::ST4W_IMM:
case AArch64::STGPi:
case AArch64::STGPreIndex:
case AArch64::STZGPreIndex:
case AArch64::ST2GPreIndex:
case AArch64::STZ2GPreIndex:
case AArch64::STGPostIndex:
case AArch64::STZGPostIndex:
case AArch64::ST2GPostIndex:
case AArch64::STZ2GPostIndex:
case AArch64::STNPDi:
case AArch64::STNPQi:
case AArch64::STNPSi:
Expand Down Expand Up @@ -2598,6 +2606,8 @@ unsigned AArch64InstrInfo::getLoadStoreImmIdx(unsigned Opc) {
case AArch64::LDPWpre:
case AArch64::LDPXpost:
case AArch64::LDPXpre:
case AArch64::STGPpre:
case AArch64::STGPpost:
case AArch64::STPDpost:
case AArch64::STPDpre:
case AArch64::STPQpost:
Expand Down Expand Up @@ -4167,7 +4177,11 @@ bool AArch64InstrInfo::getMemOpInfo(unsigned Opcode, TypeSize &Scale,
break;
case AArch64::LDG:
case AArch64::STGi:
case AArch64::STGPreIndex:
case AArch64::STGPostIndex:
case AArch64::STZGi:
case AArch64::STZGPreIndex:
case AArch64::STZGPostIndex:
Scale = TypeSize::getFixed(16);
Width = TypeSize::getFixed(16);
MinOffset = -256;
Expand Down Expand Up @@ -4334,13 +4348,19 @@ bool AArch64InstrInfo::getMemOpInfo(unsigned Opcode, TypeSize &Scale,
MaxOffset = 7;
break;
case AArch64::ST2Gi:
case AArch64::ST2GPreIndex:
case AArch64::ST2GPostIndex:
case AArch64::STZ2Gi:
case AArch64::STZ2GPreIndex:
case AArch64::STZ2GPostIndex:
Scale = TypeSize::getFixed(16);
Width = TypeSize::getFixed(32);
MinOffset = -256;
MaxOffset = 255;
break;
case AArch64::STGPi:
case AArch64::STGPpost:
case AArch64::STGPpre:
Scale = TypeSize::getFixed(16);
Width = TypeSize::getFixed(16);
MinOffset = -64;
Expand Down
Loading