[PATCH] D55807: [X86] Don't allow optimizeCompareInstr to replace a CMP with BEXTR if the sign flag is used.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 21 10:57:17 PST 2018


RKSimon added a comment.

At some point we're probably going to have to properly tag what state each flag bit is in after an instruction - I think @andreadb is keen on this for llvm-mca as well to account for different cpus splitting the eflags into different partial registers.



================
Comment at: lib/Target/X86/X86InstrInfo.cpp:3457
 /// Check whether the definition can be converted
 /// to remove a comparison against zero.
+inline static bool isDefConvertible(const MachineInstr &MI, bool &NoSignFlag) {
----------------
Update comment.


================
Comment at: lib/Target/X86/X86InstrInfo.cpp:3562
+  case X86::BEXTR32rr: case X86::BEXTR64rr:
+  case X86::BEXTR32rm: case X86::BEXTR64rm:
+  case X86::BEXTRI32ri:  case X86::BEXTRI32mi:
----------------
Align the indentation.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D55807





More information about the llvm-commits mailing list