[PATCH] D24938: [x86] Rewrite getAddressFromInstr helper function

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 27 01:35:52 PDT 2016


ABataev added a subscriber: ABataev.

================
Comment at: lib/Target/X86/X86InstrBuilder.h:114-118
@@ -113,4 +113,7 @@
+  const MachineOperand &Op3 = MI->getOperand(Operand + 3);
+  if (Op3.isGlobal()) {
+    AM.GV = Op3.getGlobal();
   } else {
-    AM.Disp = Op.getImm();
+    AM.Disp = Op3.getImm();
   }
   return AM;
----------------
Do not enclose single line substatements into braces


https://reviews.llvm.org/D24938





More information about the llvm-commits mailing list