[PATCH] D32277: Replace slow LEA instructions in X86

Zvi Rackover via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 8 02:28:50 PDT 2017


zvi added inline comments.


================
Comment at: lib/Target/X86/X86FixupLEAs.cpp:312
+  int Opcode = MI.getOpcode();
+  const MachineOperand &Offset = MI.getOperand(4);
+  switch (Opcode) {
----------------
Sorry for not pointing this out earlier, but here is another index-magic case we can avoid by passing Offset to this function, this function can possibly be changed to

```
getADDFromLEA(int LEAOpcode, const MachineOperand &Offset, bool IsImm)
```


================
Comment at: lib/Target/X86/X86FixupLEAs.cpp:497
+      !TII->isSafeToClobberEFLAGS(*MFI, MI) ||
+      MI.getOperand(5).getReg() != X86::NoRegister)
+    return nullptr;
----------------
getOperand(5) - > Segment


https://reviews.llvm.org/D32277





More information about the llvm-commits mailing list