Skip to content

Commit cafdddb

Browse files
committed
Address review comments
1 parent 245a456 commit cafdddb

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2914,15 +2914,11 @@ bool AArch64InstructionSelector::select(MachineInstr &I) {
29142914
}
29152915

29162916
if (OpFlags & AArch64II::MO_GOT) {
2917-
bool GOTIsSigned = MF.getInfo<AArch64FunctionInfo>()->hasELFSignedGOT();
2918-
I.setDesc(TII.get(GOTIsSigned ? AArch64::LOADgotAUTH : AArch64::LOADgot));
2917+
bool IsGOTSigned = MF.getInfo<AArch64FunctionInfo>()->hasELFSignedGOT();
2918+
I.setDesc(TII.get(IsGOTSigned ? AArch64::LOADgotAUTH : AArch64::LOADgot));
29192919
I.getOperand(1).setTargetFlags(OpFlags);
2920-
if (GOTIsSigned) {
2921-
MachineInstrBuilder MIB(MF, I);
2922-
MIB.addDef(AArch64::X16, RegState::Implicit);
2923-
MIB.addDef(AArch64::X17, RegState::Implicit);
2924-
MIB.addDef(AArch64::NZCV, RegState::Implicit);
2925-
}
2920+
if (IsGOTSigned)
2921+
I.addImplicitDefUseOperands(MF);
29262922
} else if (TM.getCodeModel() == CodeModel::Large &&
29272923
!TM.isPositionIndependent()) {
29282924
// Materialize the global using movz/movk instructions.

0 commit comments

Comments
 (0)