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

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 9 08:48:15 PST 2018


RKSimon added inline comments.


================
Comment at: lib/Target/X86/X86InstrInfo.cpp:864
     if (Src == Src2) {
       // ADD16rr killed %reg1028, %reg1028
       // just a single insert_subreg.
----------------
ADD8rr/ADD16rr


================
Comment at: lib/Target/X86/X86InstrInfo.h:592
+      unsigned MIOpc, MachineFunction::iterator &MFI, MachineInstr &MI,
+      LiveVariables *LV, bool Is16BitOp = true) const;
 
----------------
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);
```


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

https://reviews.llvm.org/D55494





More information about the llvm-commits mailing list