[all-commits] [llvm/llvm-project] 841311: [X86] Use X86ISD::SUB instead of X86ISD::CMP in so...

topperc via All-commits all-commits at lists.llvm.org
Mon Feb 3 21:01:59 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 8413116bf10402eef12f556cb9d80b08faeb9890
      https://github.com/llvm/llvm-project/commit/8413116bf10402eef12f556cb9d80b08faeb9890
  Author: Craig Topper <craig.topper at gmail.com>
  Date:   2020-02-03 (Mon, 03 Feb 2020)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp

  Log Message:
  -----------
  [X86] Use X86ISD::SUB instead of X86ISD::CMP in some places.

Our normal lowering for ISD::SETCC uses X86ISD::SUB to enable
CSE unless the RHS is 0. optimizeCompareInstr called by the peephole
pass can turn subs with unused results into cmps to clean this up.

This commit makes other places that create X86ISD::CMP have the
same behavior.




More information about the All-commits mailing list