================
@@ -2277,28 +2277,40 @@ void AArch64AsmPrinter::LowerLOADgotAUTH(const 
MachineInstr &MI) {
   const MachineOperand &GAMO = MI.getOperand(1);
   assert(GAMO.getOffset() == 0);
 
-  MachineOperand GAHiOp(GAMO);
-  MachineOperand GALoOp(GAMO);
-  GAHiOp.addTargetFlag(AArch64II::MO_PAGE);
-  GALoOp.addTargetFlag(AArch64II::MO_PAGEOFF | AArch64II::MO_NC);
+  if (MI.getParent()->getParent()->getTarget().getCodeModel() ==
+      CodeModel::Tiny) {
----------------
ilovepi wrote:

```suggestion
  if (MI.getMF()->getTarget().getCodeModel() == CodeModel::Tiny) {
```
Not sure if there's an easier way to get to the target from MI off the top of 
my head, but you can get the MachineFunction w/o going through `getParent`

https://github.com/llvm/llvm-project/pull/113812
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to