[PATCH] D32277: Replace slow LEA instructions in X86
Zvi Rackover via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 8 05:35:55 PDT 2017
zvi accepted this revision.
zvi added a comment.
This revision is now accepted and ready to land.
LGTM with some minor comments.
Thanks, Lama!
================
Comment at: lib/Target/X86/X86FixupLEAs.cpp:308
+static inline int getADDrrFromLEA(int LEAOpcode) {
+ int ADDrrOpcode;
+ switch (LEAOpcode) {
----------------
This variable can be dropped if the case blocks will be terminated with returns. e.g. case X86::LEA16r:: return X86::ADD16rr;
================
Comment at: lib/Target/X86/X86FixupLEAs.cpp:327
+static inline int getADDriFromLEA(int LEAOpcode, const MachineOperand &Offset) {
+ int ADDriOpcode;
+ bool IsInt8 = Offset.isImm() && isInt<8>(Offset.getImm());
----------------
Same as above
https://reviews.llvm.org/D32277
More information about the llvm-commits
mailing list