Skip to content

Commit a651b43

Browse files
- Moved MRI def after if condition for hasSME()
1 parent 65e937d commit a651b43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1098,7 +1098,6 @@ bool AArch64RegisterInfo::getRegAllocationHints(
10981098
Register VirtReg, ArrayRef<MCPhysReg> Order,
10991099
SmallVectorImpl<MCPhysReg> &Hints, const MachineFunction &MF,
11001100
const VirtRegMap *VRM, const LiveRegMatrix *Matrix) const {
1101-
const MachineRegisterInfo &MRI = MF.getRegInfo();
11021101

11031102
auto &ST = MF.getSubtarget<AArch64Subtarget>();
11041103
if (!ST.hasSME() || !ST.isStreaming())
@@ -1113,6 +1112,7 @@ bool AArch64RegisterInfo::getRegAllocationHints(
11131112
// FORM_TRANSPOSED_REG_TUPLE pseudo, we want to favour reducing copy
11141113
// instructions over reducing the number of clobbered callee-save registers,
11151114
// so we add the strided registers as a hint.
1115+
const MachineRegisterInfo &MRI = MF.getRegInfo();
11161116
unsigned RegID = MRI.getRegClass(VirtReg)->getID();
11171117
if (RegID == AArch64::ZPR2StridedOrContiguousRegClassID ||
11181118
RegID == AArch64::ZPR4StridedOrContiguousRegClassID) {

0 commit comments

Comments
 (0)