[PATCH] D55494: [x86] allow 8-bit adds to be promoted by convertToThreeAddress() to form LEA

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 10 11:31:34 PST 2018


spatel added inline comments.


================
Comment at: lib/Target/X86/X86InstrInfo.h:592
+      unsigned MIOpc, MachineFunction::iterator &MFI, MachineInstr &MI,
+      LiveVariables *LV, bool Is16BitOp = true) const;
 
----------------
RKSimon wrote:
> Would it cause too much code bloat to remove this default bool value? Or remove the argument and drive it off the MIOpc?
> ```
> bool Is16BitOp = !(MIOpc == X86::ADD8rr || MIOpc == X86::ADD8ri);
> ```
Removing the argument looks better. I'll add an assert to make sure we actually have a 16-bit op here if it's not one of the 8-bit add opcodes.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55494/new/

https://reviews.llvm.org/D55494





More information about the llvm-commits mailing list